Skip to main content
QUICK REVIEW

[论文解读] Block Convolution: Towards Memory-Efficient Inference of Large-Scale CNNs on FPGA

Gang Li, Zejian Liu|arXiv (Cornell University)|May 19, 2021
Advanced Neural Network Applications参考文献 17被引用 4
一句话总结

该论文提出了一种硬件友好的卷积操作——块卷积(block convolution),通过将特征图分割为独立的空间块,消除了FPGA上CNN推理过程中中间特征图的片外传输。通过去除块边界依赖,实现了端到端的层融合,且片上缓冲区使用量极低,将片外内存传输减少超过99.9%,显著提升了内存受限FPGA上的能效和延迟表现,同时在ImageNet分类、COCO目标检测和超分辨率任务中保持了相近的精度。

ABSTRACT

Deep convolutional neural networks have achieved remarkable progress in recent years. However, the large volume of intermediate results generated during inference poses a significant challenge to the accelerator design for resource-constraint FPGA. Due to the limited on-chip storage, partial results of intermediate layers are frequently transferred back and forth between on-chip memory and off-chip DRAM, leading to a non-negligible increase in latency and energy consumption. In this paper, we propose block convolution, a hardware-friendly, simple, yet efficient convolution operation that can completely avoid the off-chip transfer of intermediate feature maps at run-time. The fundamental idea of block convolution is to eliminate the dependency of feature map tiles in the spatial dimension when spatial tiling is used, which is realized by splitting a feature map into independent blocks so that convolution can be performed separately on individual blocks. We conduct extensive experiments to demonstrate the efficacy of the proposed block convolution on both the algorithm side and the hardware side. Specifically, we evaluate block convolution on 1) VGG-16, ResNet-18, ResNet-50, and MobileNet-V1 for ImageNet classification task; 2) SSD, FPN for COCO object detection task, and 3) VDSR for Set5 single image super-resolution task. Experimental results demonstrate that comparable or higher accuracy can be achieved with block convolution. We also showcase two CNN accelerators via algorithm/hardware co-design based on block convolution on memory-limited FPGAs, and evaluation shows that both accelerators substantially outperform the baseline without off-chip transfer of intermediate feature maps.

研究动机与目标

  • 解决在内存受限FPGA上进行CNN推理时,因频繁片外内存访问导致的高延迟和高能耗问题。
  • 消除传统基于分块的CNN加速器中,空间块之间因数据依赖而强制重复传输中间特征图的问题。
  • 设计一种硬件友好的卷积操作,实现端到端的层融合,且不增加片上缓冲区需求。
  • 在多种CNN架构(包括VGG-16、ResNet、MobileNet、SSD、FPN和VDSR)上展示块卷积的广泛适用性和高效性。
  • 通过在Xilinx ZC706和Ultra96 MPSoC平台上的联合设计FPGA加速器,验证块卷积的性能提升效果。

提出的方法

  • 块卷积将输入特征图分割为独立的空间块,解耦块之间的计算依赖,消除因边界依赖而需进行片外数据传输的问题。
  • 该方法通过允许每个块从输入到输出端到端处理,无需将中间结果存储在片外,从而实现多层融合。
  • 该方法与现有硬件优化技术(如定点量化和FPGA上的流水线处理)兼容。
  • 采用高层次综合(HLS)联合设计硬件加速器以实现块卷积,片上缓冲区用于存储权重和中间结果,片外数据移动量极小。
  • 加速器仅使用单个缓冲区存储输入和输出块,消除了双缓冲机制和复杂的散列-聚集内存访问模式。
  • 在200MHz频率下,于Xilinx Ultra96 MPSoC和ZC706 SoC平台对设计进行评估,测量了资源利用率和片外传输量。

实验结果

研究问题

  • RQ1块卷积能否在FPGA-based CNN推理中完全消除中间特征图的片外传输?
  • RQ2块卷积在VGG-16、ResNet、MobileNet、SSD、FPN和VDSR等多样化CNN架构中对模型精度有何影响?
  • RQ3在资源受限的FPGA中,块卷积在多大程度上减少了片上缓冲区需求和片外内存带宽压力?
  • RQ4与采用传统分块技术的基线加速器相比,基于块卷积的加速器在延迟、能耗和资源使用方面表现如何?
  • RQ5在使用块卷积时,不同的分块模式和大小对精度和硬件效率有何影响?

主要发现

  • 块卷积将片外特征图传输量减少超过99.9%,在VDSR加速器中,从36.48 Gbits降至31.64 Mbits,显著降低能耗和带宽压力。
  • 块存储器(BRAM)使用量从432中的352减少至432中的264,证明了片上内存的显著节省。
  • 基线加速器采用传统分块技术需使用双缓冲和复杂内存访问模式,而块卷积方案则完全消除了这些机制的需求。
  • 在VDSR模型上,块卷积加速器实现了与基线相当的PSNR性能,精度损失小于1%,证实了精度损失极小。
  • 该方法在多种任务中均保持高精度:ImageNet分类(VGG-16、ResNet-18/50、MobileNet-V1)、COCO目标检测(SSD、FPN)和Set5超分辨率(VDSR),mAP/PSNR下降均不足1%。
  • 联合设计的加速器相比基线实现显著性能提升,得益于片外传输的消除和内存访问的简化,延迟和能耗均大幅降低。

更好的研究,从现在开始

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

无需绑定信用卡

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