NN2FPGA: Optimizing CNN Inference on FPGAs With Binary Integer Programming
Open Access
- 27 November 2024
- journal article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems
- Vol. 44 (5) , 1807-1818
Abstract
Skip connections have emerged as a key component of modern convolutional neural networks (CNNs) for computer vision tasks, allowing for the creation of more accurate and deeper models by addressing the vanishing gradient problem. However, the existing implementations of field-programmable gate array (FPGA)-based accelerators for ResNets and MobileNetV2 often experience decreased performance and increased computational latency due to the implementation of skip blocks. This paper presents a novel framework for developing deep learning models on FPGAs that focuses on skip connections, with a unique approach to reduce buffering overhead. This results in a more efficient utilization of resources in the implementation of the skip layer. The nn2fpga compiler follows a thorough set of high-level synthesis (HLS) design principles and optimization strategies, exploiting in novel ways standard techniques to effectively map skip connection-based networks into static dataflow accelerators. To maximize throughput and efficiently use the available resources, our compiler employs a fast and effective design space exploration method based on a binary integer programming model which accurately assigns FPGA resources to the network layers, to maximize global throughput under resource constraints and then minimize resources for the achieved maximum throughput. Experimental results on the CIFAR-10 and ImageNet datasets demonstrate substantial gains in throughput (3× to 7× on past HLS-based work) for ResNet8, ResNet20, and MobileNetV2 models deployed on various Xilinx FPGA boards. Notably, MobileNetV2 deployed on the ZCU102 achieves a throughput of 2115 FPS, representing even a 10% speedup over a state-of-the-art highly optimized manual RTL implementation, showing that HLS can actually improve over manual design, thanks to the faster exploration of the design space.Keywords
Funding Information
- Key Digital Technologies Joint Undertaking under the REBECCA Project (101097224)
- European Union, Greece, Germany, Netherlands, Spain, Italy, Sweden, Turkey, Lithuania, and Switzerland
- Spoke 1 on Future HPC of the Italian Research Center on High-Performance Computing, Big Data and Quantum Computing
- MUR Mission 4—Next Generation EU
- European Union - Next Generation EU under the Italian National Recovery and Resilience Plan (NRRP), Mission 4, Component 2, Investment 1.3 (CUP E13C22001870001)
- “Telecommunications of the Future” (PE00000001)
- Program “RESTART”
This publication has 25 references indexed in Scilit:
- An Exploration of State-of-the-Art Automation Frameworks for FPGA-Based DNN AccelerationIEEE Access, 2023
- Efficient Hardware Architectures for Accelerating Deep Neural Networks: SurveyIEEE Access, 2022
- Convolutional neural network implementations using Vitis AI2022
- Pruning and quantization for deep neural network acceleration: A surveyNeurocomputing, 2021
- Memory-Efficient Dataflow Inference for Deep CNNs on FPGA2020
- Binary neural networks: A surveyPattern Recognition, 2020
- Breaking High-Resolution CNN Bandwidth Barriers With Enhanced Depth-First ExecutionIEEE Journal on Emerging and Selected Topics in Circuits and Systems, 2019
- Quantization and Training of Neural Networks for Efficient Integer-Arithmetic-Only Inference2018
- The MNIST Database of Handwritten Digit Images for Machine Learning Research [Best of the Web]IEEE Signal Processing Magazine, 2012
- An Introduction To The Theory Of Numbers2008