BRAMAC:用于FPGA上乘加运算的BRAM内计算架构
BRAMAC: Compute-in-BRAM Architectures for Multiply-Accumulate on FPGAs
AI总结:
本文提出BRAMAC架构,通过在BRAM虚拟阵列中采用混合位串行与位并行数据流实现乘加计算,在不影响主阵列读写的同时显著提升了FPGA上DNN推理的MAC吞吐量并实现加速。
摘要:
与全精度浮点相比,使用降低的整数精度进行深度神经网络(DNN)推理已被证明能在内存利用率和计算吞吐量方面取得显著提升,且几乎或完全没有精度损失。基于现代FPGA的DNN推理严重依赖片上块RAM(BRAM)进行模型存储,并依赖数字信号处理(DSP)单元来实现乘加(MAC)操作,这是DNN的基本原语。在本文中,我们通过提出BRAMAC(用于乘加的BRAM内计算架构)来增强现有的BRAM,使其也能计算MAC。BRAMAC在小型虚拟BRAM阵列中使用混合的位串行和位并行数据流,支持2补码的2至8位MAC。与以前的BRAM内计算架构不同,BRAMAC允许在虚拟BRAM阵列中进行计算的同时对主BRAM阵列进行读写访问,从而支持持久化和基于分块的DNN推理。我们探索了两种BRAMAC变体:BRAMAC-2SA(具有2个同步虚拟阵列)和BRAMAC-1DA(具有1个双倍速率虚拟阵列)。对于2位、4位和8位精度,BRAMAC-2SA/BRAMAC-1DA分别可使大型Arria-10 FPGA的峰值MAC吞吐量提升2.6倍/2.1倍、2.3倍/2.0倍和1.9倍/1.7倍,而FPGA核心面积仅增加6.8%/3.4%。通过将BRAMAC-2SA/BRAMAC-1DA添加到最先进的基于分块的DNN加速器中,在不同模型精度下,AlexNet和ResNet-34分别可平均实现2.05倍/1.7倍和1.33倍/1.52倍的加速。
英文摘要:
Deep neural network (DNN) inference using reduced integer precision has been shown to achieve significant improvements in memory utilization and compute throughput with little or no accuracy loss compared to full-precision floating-point. Modern FPGA-based DNN inference relies heavily on the on-chip block RAM (BRAM) for model storage and the digital signal processing (DSP) unit for implementing the multiply-accumulate (MAC) operation, a fundamental DNN primitive. In this paper, we enhance the existing BRAM to also compute MAC by proposing BRAMAC (Compute-in-$\underline{\text{BR}}$AM $\underline{\text{A}}$rchitectures for $\underline{\text{M}}$ultiply-$\underline{\text{Ac}}$cumulate). BRAMAC supports 2's complement 2- to 8-bit MAC in a small dummy BRAM array using a hybrid bit-serial & bit-parallel data flow. Unlike previous compute-in-BRAM architectures, BRAMAC allows read/write access to the main BRAM array while computing in the dummy BRAM array, enabling both persistent and tiling-based DNN inference. We explore two BRAMAC variants: BRAMAC-2SA (with 2 synchronous dummy arrays) and BRAMAC-1DA (with 1 double-pumped dummy array). BRAMAC-2SA/BRAMAC-1DA can boost the peak MAC throughput of a large Arria-10 FPGA by 2.6$\times$/2.1$\times$, 2.3$\times$/2.0$\times$, and 1.9$\times$/1.7$\times$ for 2-bit, 4-bit, and 8-bit precisions, respectively at the cost of 6.8%/3.4% increase in the FPGA core area. By adding BRAMAC-2SA/BRAMAC-1DA to a state-of-the-art tiling-based DNN accelerator, an average speedup of 2.05$\times$/1.7$\times$ and 1.33$\times$/1.52$\times$ can be achieved for AlexNet and ResNet-34, respectively across different model precisions.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。