arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2311.02758cs.AR
收藏

M4BRAM:FPGA块RAM中的混合精度矩阵-矩阵乘法

M4BRAM: Mixed-Precision Matrix-Matrix Multiplication in FPGA Block RAMs

Yuzong Chen, Jordan Dotzel, Mohamed S. Abdelfattah

AI总结:

针对混合精度DNN在FPGA上高效扩展性能难的问题,提出支持多精度配置、BRAM内数据复制且兼具存储功能的M4BRAM架构,可实现显著加速且精度损失极小。

摘要:

混合精度量化是一种广泛应用的深度神经网络(DNN)压缩方法。然而,在当前FPGA架构和传统加速器数据流下,高效扩展混合精度DNN的性能仍面临挑战。本文提出M4BRAM——一种新型块RAM(BRAM)内计算架构,可实现混合精度矩阵-矩阵乘法,以此增强FPGA加速混合精度DNN的能力。精度方面,M4BRAM支持多种混合精度DNN配置:权重精度可为2/4/8位,激活精度可在2至8位之间变化。数据流方面,M4BRAM采用新型BRAM内数据复制方案,实现高硬件利用率。此外,在M4BRAM计算过程中,其他FPGA资源可无缝访问其数据,无需单独的缓冲区。因此,与以往的BRAM内计算方案不同,M4BRAM可同时执行混合精度计算,并保持存储单元的完整功能,真正实现对FPGA现有计算资源的补充。实验表明,将M4BRAM加入到分块式DNN加速器中,在ImageNet分类任务的多种DNN上可实现平均2.16倍的加速,且精度损失可忽略不计(<0.5%)。与采用以往BRAM内计算架构的同类型分块加速器相比,M4BRAM在多种DNN上的平均性能提升1.43倍。

英文摘要:

Mixed-precision quantization is a popular approach for compressing deep neural networks (DNNs). However, it is challenging to scale the performance efficiently with mixed-precision DNNs given the current FPGA architecture and conventional accelerator dataflows. In this work, we enhance the FPGA's capability for accelerating mixed-precision DNNs by proposing M4BRAM, a novel compute-in-block RAM (BRAM) architecture that can compute mixed-precision matrix-matrix multiplication. On the precision side, M4BRAM supports a wide range of mixed-precision DNN configurations -- the weight precision can be 2/4/8 bits while the activation precision can vary from 2 to 8 bits. On the dataflow side, M4BRAM leverages a novel in-BRAM data duplication scheme to achieve high hardware utilization. Moreover, during M4BRAM computation, other FPGA resources can seamlessly access its data without the need for a separate buffer. Hence, unlike prior compute-in-BRAM proposals, M4BRAM can simultaneously perform mixed-precision computation and maintain full functionality as a memory unit to \textit{truly} complement the existing compute resources on FPGAs. Experiments show that adding M4BRAM to a tiled DNN accelerator can achieve an average speedup of 2.16$\times$ across various DNNs on the ImageNet classification task while incurring a negligible accuracy loss of $<$ 0.5%. Compared to the same tiled accelerator that employs a prior compute-in-BRAM architecture, M4BRAM delivers 1.43$\times$ higher performance on average across various DNNs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑