Skip to main content
QUICK REVIEW

[论文解读] Automated flow for compressing convolution neural networks for efficient edge-computation with FPGA

Farhan Shafiq, Takato Yamada|arXiv (Cornell University)|Dec 18, 2017
Advanced Neural Network Applications参考文献 7被引用 3
一句话总结

本文提出了一种自动化、端到端的流程,用于在基于FPGA的边缘设备上压缩和部署二值化卷积神经网络(CNN)。该方法将权重量化为1比特,激活值量化为2比特,通过高层次综合(HLS)生成优化的C代码和FPGA加速器,并在Cyclone-V FPGA SoC上部署YOLOv2时实现了相对于移动CPU的11.5倍加速,全流程合成时间少于一小时。

ABSTRACT

Deep convolutional neural networks (CNN) based solutions are the current state- of-the-art for computer vision tasks. Due to the large size of these models, they are typically run on clusters of CPUs or GPUs. However, power requirements and cost budgets can be a major hindrance in adoption of CNN for IoT applications. Recent research highlights that CNN contain significant redundancy in their structure and can be quantized to lower bit-width parameters and activations, while maintaining acceptable accuracy. Low bit-width and especially single bit-width (binary) CNN are particularly suitable for mobile applications based on FPGA implementation, due to the bitwise logic operations involved in binarized CNN. Moreover, the transition to lower bit-widths opens new avenues for performance optimizations and model improvement. In this paper, we present an automatic flow from trained TensorFlow models to FPGA system on chip implementation of binarized CNN. This flow involves quantization of model parameters and activations, generation of network and model in embedded-C, followed by automatic generation of the FPGA accelerator for binary convolutions. The automated flow is demonstrated through implementation of binarized "YOLOV2" on the low cost, low power Cyclone- V FPGA device. Experiments on object detection using binarized YOLOV2 demonstrate significant performance benefit in terms of model size and inference speed on FPGA as compared to CPU and mobile CPU platforms. Furthermore, the entire automated flow from trained models to FPGA synthesis can be completed within one hour.

研究动机与目标

  • 解决在能效和成本受限的边缘设备上部署大型、高功耗深度CNN的挑战。
  • 通过自动化量化和硬件生成,减小低功耗FPGA上CNN的模型尺寸和推理延迟。
  • 通过优化数据排序和内存访问模式,实现二值化CNN在FPGA上的高效加速。
  • 开发从训练好的TensorFlow模型到FPGA可综合硬件加速器的全自动流水线,用于边缘推理。

提出的方法

  • 将训练好的TensorFlow模型量化为1比特权重和2比特激活值,首层和末层除外。
  • 解析TensorFlow协议缓冲格式的量化模型,并应用图级变换,将浮点运算替换为位级等效运算。
  • 为量化网络生成紧凑、自包含的嵌入式C代码,支持芯片内高效执行。
  • 通过高层次综合(HLS)自动生成针对模型计算和内存需求定制的FPGA加速器。
  • 实现深度优先数据排序策略,以提升内存访问连续性并减少本地RAM中的位掩码开销。
  • 支持核间并行处理,以提高吞吐量,并在卷积操作期间改善突发内存性能。

实验结果

研究问题

  • RQ1自动化流程能否显著减小低功耗FPGA上二值化CNN的模型尺寸和推理延迟?
  • RQ2深度优先数据排序策略在提升FPGA二值化CNN加速器内存访问效率和降低硬件复杂度方面效果如何?
  • RQ3在二值化CNN推理方面,FPGA加速在速度和能效方面相较于移动CPU和通用CPU的性能优势有多大?
  • RQ4从训练好的TensorFlow模型到合成FPGA加速器的端到端时间成本是多少,且需最少的人工干预?

主要发现

  • 所提出的自动化流程可在约一小时内将训练好的TensorFlow模型转换为完全合成的FPGA加速器。
  • 压缩后的二值化YOLOv2模型大小缩减至8.26 MB(比原始255.82 MB模型小32倍)。
  • FPGA加速的二值化卷积相比移动CPU实现11.5倍加速,相比高端桌面CPU(Core i7-6800K)实现1.21倍加速。
  • FPGA-SoC上的总推理时间比移动CPU快5.34倍,但仍比Core i7 CPU慢1.78倍。
  • 深度优先数据排序策略实现了更高效的位打包,减少了对多次内存访问和掩码操作的需求。
  • 核间并行处理与优化的内存访问相结合,显著提升了突发内存性能,并使FPGA上的内存写入电路更简洁。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。