fpgaConvNet: A Toolflow for Mapping Diverse Convolutional Neural Networks on Embedded FPGAs

Stylianos I. Venieris, Christos-Savvas BouganisarXiv 2017

Abstract

Deploying state-of-the-art Convolutional Neural Networks (ConvNets) on resource-constrained embedded devices presents significant challenges in balancing throughput and latency. This paper introduces fpgaConvNet, an automated end-to-end framework that maps diverse ConvNet architectures onto FPGAs by modeling them as Synchronous Dataflow (SDF) graphs. By formulating the mapping process as a multi-objective optimization problem, fpgaConvNet generates custom hardware designs that significantly outperform optimized embedded GPUs, achieving up to 6.65× better performance under strict power constraints.

Introduction

Modern AI applications, ranging from autonomous vehicles to drones, rely heavily on ConvNets. However, these applications often have conflicting requirements: high throughput for batch processing and ultra-low latency for real-time obstacle avoidance. While FPGAs offer the reconfigurability needed to meet these demands, the vast design space makes manual hardware optimization impractical. Furthermore, existing tools often struggle with "regular" network architectures like ResNet or DenseNet. fpgaConvNet addresses these issues by providing a systematic, automated toolflow for mapping both regular and irregular CNNs to FPGA hardware.

Methodology: SDF Modeling and Optimization

The core innovation of fpgaConvNet is the representation of ConvNet inference as a Synchronous Dataflow (SDF) graph. In this paradigm, nodes represent computational kernels (e.g., convolution, pooling), and edges represent data streams.

Mathematical Representation

The framework uses linear algebra to describe the system's behavior and resource requirements. Specifically, it employs a topology matrix ($\Gamma$) to represent the production and consumption rates of data between nodes and a workload matrix ($W$) to quantify the operations required for each layer.

SDF modeling of ConvNet layers using topology matrix $\Gamma$ and workload matrix $W$.

Hardware Transformations

To navigate the massive design space, fpgaConvNet applies four key transformations:

  1. Graph Partitioning: Dividing the network into sequential segments to optimize throughput.
  2. Coarse-grained Folding: Adjusting the number of parallel compute units per layer.
  3. Fine-grained Folding: Optimizing the internal logic of dot-product engines.
  4. Weights Reloading: A specialized strategy for latency-critical applications that minimizes reconfiguration overhead.

Benchmarking and Evaluation

The framework was evaluated against several industry-standard models, including regular networks (AlexNet, VGG16) and complex, irregular architectures (GoogLeNet, ResNet-152, and DenseNet-161). Notably, this work provides the first reported FPGA mapping for DenseNet-161.

The performance of fpgaConvNet on a Xilinx Zynq 7045 FPGA was compared to an NVIDIA Tegra X1 GPU, with both devices operating under a strict 5W power budget.

Key Results

The experimental results demonstrate the superiority of the fpgaConvNet-generated hardware over general-purpose parallel processors:

  • Throughput: fpgaConvNet achieved an average of 3.32× (up to 5.53×) higher throughput than the GPU.
  • Latency: For real-time applications (batch size 1), the FPGA designs outperformed the GPU by an average of 3.95× (up to 6.65×).
  • Power Efficiency: The FPGA implementations showed a 1.17× to 1.70× improvement in GOp/s/W compared to highly optimized TensorRT-based GPU implementations.

Discussion and Future Work

By treating ConvNet inference as a continuous data stream rather than isolated matrix operations, fpgaConvNet leverages powerful dataflow optimization techniques. Its ability to handle irregular dataflows, such as skip-connections in ResNet, ensures high efficiency even as neural network architectures continue to evolve.

While the current toolflow utilizes a Caffe front-end and 16-bit fixed-point arithmetic, future iterations could expand support to PyTorch/TensorFlow and explore more aggressive quantization schemes. Overall, fpgaConvNet provides a robust infrastructure for deploying increasingly complex deep learning models on embedded FPGA platforms.

Summary updated

BibTeX
@misc{venieris2017fpgaconvnet,
  author = {Stylianos I. Venieris and Christos-Savvas Bouganis},
  title = {{fpgaConvNet: A Toolflow for Mapping Diverse Convolutional Neural Networks on Embedded FPGAs}},
  year = {2017},
  eprint = {1711.08740},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1711.08740},
}
Figure