iDSL - Intelligent Digital Systems Lab

(running an ONNX CNN model on an FPGA in as little as 15 minutes)

An automated toolflow that maps CNN models onto FPGA devices. It automates the whole design process, from a trained model to an FPGA accelerator, and optimises the architecture for the best performance of each model and FPGA pair.

  • Key strength: targets large, modern CNN models that may exceed on-chip memory, or that require int8 format per channel to maintain performance close to float32.
  • Flexible goals: targets both latency-oriented and throughput-oriented applications.
  • Number representations: 16-bit fixed point and int8 (per channel) are currently supported.

Getting startedHow it worksPublications

CNN model + FPGA→fpgaConvNetautomatic mapping and optimisation→FPGA accelerator
FPGAImage classificationInputgolden retriever 98.4%Semantic segmentationInputSegmentedSuper-resolutionLow-res input4× upscaled
Photos: CC0 (Wikimedia Commons).

Previous page: this is a restyled copy of the original fpgaConvNet website, which is still available at fpgaconvnet.com.

About

Developed by the Intelligent Digital Systems Lab at Imperial College London.

As machine learning has become a fundamental workload in today's digital systems, there has been increasing demand for highly efficient hardware to run these workloads. The work done at the Intelligent Digital Systems Lab at Imperial College London aims to address this demand with fpgaConvNet: a toolflow for designing Convolutional Neural Network (CNN) accelerators for FPGAs with state-of-the-art performance and efficiency.

FPGA devices have long been considered a highly performant and efficient platform, where a designer can exploit the highly configurable fine-grain building blocks to produce customised hardware. However, many current FPGA designs for AI applications do not exploit these features, opting for a monolithic accelerator approach with very little specialisation towards the particular workload.

With the fpgaConvNet toolflow, accelerator designs are customised to a specific CNN workload, mapping each operation in the CNN model to a dedicated hardware block. This leads to a deeply pipelined design with extremely high throughput and ultra low latency.

Toolflow

fpgaConvNet toolflow overview: ML model and FPGA platform go through the model parser, the fpgaConvNet optimiser and the HLS hardware generator to produce a bitstream
Open sourceThe model, HLS generator and optimiser are all available on GitHub.fpgaconvnet-modelfpgaconvnet-hlsfpgaconvnet-optimiserSAMO
fpgaconvnet-model diagram

fpgaconvnet-model

The fpgaConvNet framework operates on an intermediate representation that describes the hardware of a mapped ML model. This component takes ONNX files and creates the fpgaconvnet-ir used to generate hardware. The IR can also be used to generate high-level performance and resource models of the hardware, which is fundamental for rapid design space exploration.

License: GPL-3.0

fpgaconvnet-hls layout

fpgaconvnet-hls

Using a configuration generated by the fpgaconvnet-model tool, the corresponding hardware can be generated by fpgaconvnet-hls. This repository contains a selection of highly parametrised hardware building blocks for common CNN layers (convolution, pooling, ReLU and others). A dataflow architecture is generated by instantiating and connecting these building blocks according to the configuration file.

License: GPL-3.0

1013design points for LeNet, or about 89 centuries to evaluate them all

fpgaconvnet-optimiser and SAMO

The design space of streaming architectures is immense: even a seemingly small network such as LeNet has 1013 possible design points, which would take 89 centuries to evaluate one by one. The toolflow automates design point selection using optimisation solvers tailored to the problem. SAMO generalises the optimisation problem across streaming architectures, providing a toolflow for both FINN and HLS4ML, while fpgaconvnet-optimiser is specialised to the fpgaConvNet architecture and finds even better design points.

License: GPL-3.0 (fpgaconvnet-optimiser), MIT (SAMO)

Applications

The toolflow can be used to accelerate a number of applications, such as:

Image ClassificationObject DetectionHuman Action RecognitionImage SegmentationPose EstimationKey Word SpottingAnomaly Detection

Results

ImageNet models on the AMD ZedBoard New result

These results were obtained using the AI-enhanced version of the fpgaConvNet tool and target the AMD ZedBoard. All models use the int8 number format. Latency is reported as time per image at batch size 1; throughput is reported in images per second with the batch size shown. CPU latency is measured on the board’s two-core Cortex-A9 using NEON kernels. Top-1 accuracy is reported on the full ImageNet dataset.

ImageNet model inference results on AMD ZedBoard
ModelImageNet top-1Optimised for latencyOptimised for throughputCortex-A9 CPU latencyFPGA speed-up vs CPU
Time per image; batch 1Images/s; batch size shownTime per image; NEON kernels; 2 coresLatency / throughput
ResNet-1868.77%106.8 ms/image
9.4 images/s (batch 1)
15.1 images/s (batch 100)752 ms/image7.0× / 11.4×
ResNet-5075.91%227.9 ms/image
4.4 images/s (batch 1)
6.91 images/s (batch 256)1752 ms/image7.7× / 12.1×
MobileNetV271.61%34.07 ms/image
29.4 images/s (batch 1)
42.4 images/s (batch 256)207 ms/image6.1× / 8.8×
MobileNetV3-Small65.52%19.35 ms/image
51.7 images/s (batch 1)
127.0 images/s (batch 256)56.5 ms/image2.9× / 7.2×
MobileNetV3-Large73.44%51.4 ms/image
19.5 images/s (batch 1)
19.5 images/s (batch 1)172 ms/image3.3× / 3.3×
ImageNet top-1 accuracy against FPGA time per image (latency-optimised, batch 1)
ImageNet top-1 accuracy against FPGA throughput (throughput-optimised; batch size as in the table)

MLPerf Tiny benchmark

The results in this table are from our submission to MLPerf Tiny's benchmark, as part of the round v1.1 results. The submission demonstrates the versatility of the fpgaConvNet toolflow by targeting a range of low-cost FPGAs, whilst achieving ultra low latency across these devices. The high performance comes from exploiting the reconfigurability of FPGAs, which allows the tool to create accelerator designs tailored to each task and device. fpgaConvNet showcases the potential of FPGA devices for TinyML applications: performance similar to that of ASICs is achieved while keeping the programmability of MCUs.

DeviceTaskLatencyLUTDSPBRAMFreq.
ZC706Image Classification0.15 ms108K564281187 MHz
Visual Wake Word0.72 ms133K564366200 MHz
ZedBoardImage Classification0.41 ms47K21193143 MHz
Visual Wake Word9.49 ms34K189123111 MHz
Keyword Spotting0.32 ms37K18897143 MHz
ZyBoImage Classification3.15 ms16K7836125 MHz
Keyword Spotting2.15 ms15K6016125 MHz
Cora-Z7Keyword Spotting4.21 ms13K5528143 MHz

Latest research results

The results in this table are from our recently published research papers. The results contain a mixture of modelled and measured results.

YearTaskNetworkAccuracyLatencyThroughputDeviceLUTDSPBRAM18kURAMFreq.Paper
2024CamVidUNet71.75%-16.96fps (2206GOP/s)VCU1525993k60193715864200MHzarXiv
2024CamVidUNet71.75%-21.21fps (2758GOP/s)U2001040k60623654864250MHzarXiv
2024CamVidUNet71.75%-1.28fps (166GOP/s)ZCU102213k14611368-200MHzarXiv
2024COCOYOLOv8n35.10%-184.27fps (808GOP/s)VCU118543k50611813431250MHzarXiv
2024UCF101X3D-M96.29%-13.44fps (86GOP/s)ZCU102235k932857-200MHzarXiv
2024BraTS2020UNet3D85.34%-1.75fps (1595GOP/s)U200289k56772980528250MHzarXiv
2024ImageNetResNet1870.3%27.0ms-ZC70638k1501709-200MHzarXiv
2024ImageNetResNet1870.5%7.0ms-ZCU102127k12512318-200MHzarXiv
2024ImageNetResNet1870.0%1.3ms-U50704k58172490576250MHzarXiv
2024ImageNetResNet5076.0%3.4ms-U50867k38072698640250MHzarXiv
2024ImageNetResNet5076.0%1.8ms-U2501714k78044025967250MHzarXiv
2024ImageNetMobileNetV265.6%4.8ms-ZC706219k3911084-200MHzarXiv
2024ImageNetMobileNetV265.7%2.3ms-ZCU102273k12221428-200MHzarXiv
2023COCOYOLOv3-Tiny33.9%14.3ms418.9GOP/sVCU110127k17804181-220MHzarXiv
2023COCOYOLOv3-Tiny33.9%6.8ms875.7GOP/sVCU118431k6687429690255MHzarXiv
2023COCOYOLOv5s56.2%46.4ms392.0GOP/sVCU110602k17943776-200MHzarXiv
2023COCOYOLOv5s56.2%14.9ms1219.8GOP/sVCU118117k5077405233270MHzarXiv
2023COCOYOLOv8s61%122.8ms248.2GOP/sVCU110629k17675565-200MHzarXiv
2023COCOYOLOv8s61%24.5ms1244GOP/sVCU1181023k68151322713240MHzarXiv

Publications

Since the initial conception of the fpgaConvNet toolflow, many research projects have contributed to and used the framework. Its core development has led to innovations in streaming architecture design and in design space exploration, which in turn has enabled novel contributions in several application domains and broadened the scope of the toolflow. The growing list of research outcomes follows.

  1. HASS: Hardware-Aware Sparsity Search for Dataflow DNN Accelerator

    FPL 2024

    Zhewen Yu, Sudarshan Sreeram, Krish Agrawal, Junyi Wu, Alexander Montgomerie-Corcoran, Cheng Zhang, Jianyi Cheng, Christos-Savvas Bouganis, Yiren Zhao

    Exploits weight and activation sparsity together with the hardware design space of dataflow accelerators, where the large design space makes approaches built for non-dataflow accelerators inapplicable. fpgaConvNet is used for prototyping.

  2. SMOF: Streaming Modern CNNs on FPGAs with Smart Off-Chip

    FCCM 2024

    Petros Toupas, Zhewen Yu, Christos-Savvas Bouganis and Dimitrios Tzovaras

    Partially offloading both weights and activations to off-chip memory without penalising the computation pipeline.

  3. AutoWS: Automate Weights Streaming in Layer-wise Pipelined DNN Accelerators

    DATE 2024

    Zhewen Yu and Christos-Savvas Bouganis

    A memory management methodology for balancing the allocation of weights both on-chip and off-chip.

  4. SATAY: A Streaming Architecture Toolflow for Accelerating YOLO Models on FPGA Devices

    FPT 2023

    Alexander Montgomerie-Corcoran, Petros Toupas, Zhewen Yu, and Christos-Savvas Bouganis

    Design space optimisations and hardware support for state-of-the-art object detection models.

  5. Mixed-TD: Efficient Neural Network Accelerator with Layer-Specific Tensor Decomposition

    FPL 2023

    Zhewen Yu, and Christos-Savvas Bouganis

    Tensor Decomposition methods for approximating CNN parameters and improving accelerator performance.

  6. fpgaHART: A toolflow for throughput-oriented acceleration of 3D CNNs for HAR onto FPGAs

    FPL 2023

    Petros Toupas, Christos-Savvas Bouganis, Dimitrios Tzovaras

    Optimising and mapping state-of-the-art 3D-CNN models for human action recognition (HAR) while aiming for throughput-oriented designs.

  7. PASS: Exploiting Post-Activation Sparsity in Streaming Architectures for CNN Acceleration

    FPL 2023

    Alexander Montgomerie-Corcoran*, Zhewen Yu*, Jianyi Cheng, Christos-Savvas Bouganis

    this work addresses the challenges associated with exploiting post-activation sparsity for performance gains in streaming CNN accelerators.

  8. FMM-X3D: FPGA-based modelling and mapping of X3D for Human Action Recognition

    ASAP 2023

    Petros Toupas, Christos-Savvas Bouganis, Dimitrios Tzovaras

    This study bridges the gap between recent developments in computer vision on videos and their deployment and applications on FPGAs by optimising and mapping a state-of-the-art 3D-CNN model (X3D) for human action recognition (HAR).

  9. ATHEENA: A Toolflow for Hardware Early-Exit Network Automation

    FCCM 2023

    Benjamin Biggs, Christos-Savvas Bouganis, George A. Constantinides

    ATHEENA looks into using early exit networks with fpgaConvNet, and the challenges associated with handling early exit branches.

  10. HARFLOW3D: A Latency-Oriented 3D-CNN Accelerator Toolflow for HAR on FPGA Devices

    FCCM 2023

    Petros Toupas*, Alexander Montgomerie-Corcoran*, Christos-Savvas Bouganis, Dimitrios Tzovaras

    A new architecture based off of the design principles of fpgaConvNet is developed in this work, but has the benefit of runtime parameter reconfiguration. This makes it suitable for low-latency applications as it avoids the need to do full bitstream reconfiguration, which is necessary for Human Action Recognition (HAR).

  11. SAMO: Optimised Mapping of Convolutional Neural Networks to Streaming Architectures

    FPL 2022

    Alexander Montgomerie-Corcoran*, Zhewen Yu* and Christos-Savvas Bouganis

    This work builds on the capabilities of fpgaConvNet's design space exploration, by proposing two optimisers (simulated annealing and rule-based), as well as expanding the scope to other FPGA-based ML accelerator frameworks, namely FINN and HLS4ML.

  12. StreamSVD: Low-rank Approximation and Streaming Accelerator Co-design

    FPT 2021

    Zhewen Yu and Christos-Savvas Bouganis

    This work looks into methods of compressing ML models by using Singular Value Decomposition (SVD) to reduce the number of weight parameters required. fpgaConvNet was used to show how this method benefits ML accelerators.

  13. DEF: Differential Encoding of Featuremaps for Low Power Convolutional Neural Network Accelerators

    ASP-DAC 2021

    Alexander Montgomerie-Corcoran and Christos-Savvas Bouganis

    In this paper, a novel coding scheme is introduced which exploits the properties of feature maps to reduce the activity along off-chip memory data busses, leading to lower system power consumption.

  14. Power-Aware FPGA Mapping of Convolutional Neural Networks

    FPT 2019

    Alexander Montgomerie-Corcoran and Christos-Savvas Bouganis

    This work explores the power consumption aspect of fpgaConvNet, producing high-level models of how design choices affect the power consumption of the accelerator.

  15. fpgaConvNet: Mapping Regular and Irregular Convolutional Neural Networks on FPGAs

    TNNLS 2018

    Stylianos I. Venieris and Christos-Savvas Bouganis

  16. Latency-Driven Design for FPGA-based Convolutional Neural Networks

    FPL 2017

    Stylianos I. Venieris and Christos-Savvas Bouganis

  17. fpgaConvNet: A Framework for Mapping Convolutional Neural Networks on FPGAs

    FCCM 2016

    Stylianos I. Venieris and Christos-Savvas Bouganis

Visualisation

An interactive visualisation shows the optimiser at work. Moving the slider steps through the optimisation: the performance graph tracks throughput and latency across steps, and the resources and hardware block diagram update for the chosen design point. The demonstration uses LeNet targeting a ZedBoard.

Open the visualiser

The original fpgaConvNet website was designed by Alexander Montgomerie-Corcoran.