[Paper Review] Automatic Compiler Based FPGA Accelerator for CNN Training
This paper presents an automatic, compiler-based FPGA accelerator for end-to-end CNN training using 16-bit fixed-point precision. It employs a customizable RTL compiler and optimized hardware libraries to generate FPGA-optimized accelerators for full training (forward, backward, and weight update), achieving up to 479 GOPS on an Intel Stratix 10 GX FPGA for CIFAR-10 networks with 2M parameters.
Training of convolutional neural networks (CNNs)on embedded platforms to support on-device learning is earning vital importance in recent days. Designing flexible training hard-ware is much more challenging than inference hardware, due to design complexity and large computation/memory requirement. In this work, we present an automatic compiler-based FPGA accelerator with 16-bit fixed-point precision for complete CNNtraining, including Forward Pass (FP), Backward Pass (BP) and Weight Update (WU). We implemented an optimized RTL library to perform training-specific tasks and developed an RTL compiler to automatically generate FPGA-synthesizable RTL based on user-defined constraints. We present a new cyclic weight storage/access scheme for on-chip BRAM and off-chip DRAMto efficiently implement non-transpose and transpose operations during FP and BP phases, respectively. Representative CNNs for CIFAR-10 dataset are implemented and trained on Intel Stratix 10-GX FPGA using proposed hardware architecture, demonstrating up to 479 GOPS performance.
Motivation & Objective
- Address the challenge of deploying flexible, energy-efficient CNN training on resource-constrained embedded platforms.
- Overcome the limitations of GPU-based training in terms of power efficiency and on-device learning capability.
- Design a fully automatic, FPGA-based accelerator that supports all phases of stochastic gradient descent (SGD) training for various CNN architectures.
- Enable efficient memory access and computation mapping for forward, backward, and weight update phases using a cyclic storage scheme.
- Achieve high throughput and energy efficiency while maintaining accuracy comparable to floating-point training.
Proposed method
- Developed a training-specific RTL module library with parameterized Verilog modules for forward, backward, and weight update operations.
- Built an RTL compiler that automatically generates FPGA-synthesizable RTL from high-level CNN configurations and design constraints.
- Implemented a cyclic weight storage/access scheme using on-chip BRAM and off-chip DRAM to efficiently handle non-transpose (forward) and transpose (backward) operations.
- Employed tiling and double buffering techniques to hide DRAM latency and reduce on-chip buffer usage.
- Used load balancing across MAC arrays to reduce logic latency in weight update layers by 4×.
- Designed a custom fixed-point training model in PyTorch to verify functional correctness of the FPGA implementation.

Experimental results
Research questions
- RQ1How can an FPGA-based accelerator be automatically generated to support full CNN training with varying network sizes?
- RQ2What memory access patterns and dataflow optimizations are most effective for minimizing latency in forward, backward, and weight update phases?
- RQ3How does the proposed cyclic storage scheme improve memory bandwidth utilization for transpose and non-transpose operations?
- RQ4What is the achievable throughput and energy efficiency of a fully automatic FPGA-based CNN training accelerator compared to GPU-based solutions?
- RQ5To what extent can fixed-point precision maintain model accuracy while enabling high-throughput training on FPGAs?
Key findings
- The FPGA accelerator achieved up to 479 GOPS of throughput for a 4X CIFAR-10 CNN model at 240 MHz on an Intel Stratix 10 GX FPGA.
- For batch size 40, the accelerator achieved 13.45 GOPS/W energy efficiency, outperforming the Titan XP GPU in energy efficiency for smaller batch sizes.
- Weight update layers consumed 51% of the total latency per batch iteration, primarily due to DRAM access for past gradients and weights.
- Double buffering reduced weight update layer latency by 11% by hiding memory access latency.
- The 1X CNN model achieved 73% CIFAR-10 accuracy after 50 epochs with a learning rate of 0.002 and batch size 40, matching floating-point baseline performance.
- The system demonstrated stable and reliable training with smaller batch sizes, which provide more up-to-date gradient estimates.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.