arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2402.09709eess.IV
收藏

ME-ViT:一种用于Vision Transformers的单次加载内存高效型FPGA加速器

ME-ViT: A Single-Load Memory-Efficient FPGA Accelerator for Vision Transformers

Kyle Marino, Pengmiao Zhang, Viktor Prasanna

AI总结:

本文提出ME-ViT,一种用于ViT推理的内存高效型FPGA加速器,通过单次加载策略和内存高效处理元素减少片外内存访问,在带宽和吞吐量上显著优于现有FPGA与GPU基准。

摘要:

Vision Transformers (ViTs) 已成为目标分类任务的最先进解决方案。然而,其计算需求和高参数量使其不适合实时推理,促使人们需要高效的硬件实现。现有的 ViT 硬件加速器存在频繁的片外内存访问问题,受限于内存带宽而制约了可实现的吞吐量。在计算通信比较高的设备中(例如带宽有限的边缘 FPGA),片外内存访问对整体吞吐量造成了严重的瓶颈。本工作提出了 ME-ViT,一种用于 ViT 推理的新型内存高效型 FPGA 加速器,可最小化内存流量。我们在设计 ME-ViT 时提出了一种单次加载策略:模型参数仅加载一次,中间结果存储在片上,且所有操作均在单一处理元素中实现。为实现这一目标,我们设计了一种内存高效型处理元素 (ME-PE),它通过复用多用途缓冲区,在同一架构上处理 ViT 推理的多个关键操作。我们还将 Softmax 和 LayerNorm 函数集成到 ME-PE 中,以最小化矩阵乘法之间的停顿。我们在大小为 32 和 16 的脉动阵列上评估了 ME-ViT,与 FPGA 上最先进的 ViT 加速器相比,在内存带宽方面分别实现了高达 9.22 倍和 17.89 倍的整体提升,并且在两种设计上均实现了每 DSP 吞吐量 2.16 倍的提升。与 GPU (FPGA) 基准相比,ME-ViT 实现了高达 4.00 倍 (1.03 倍) 的能效提升。ME-ViT 在 Xilinx Alveo U200 上最多可支持 5 个 ME-PE 实例化,与最先进的 FPGA 基准相比实现了 5.10 倍的吞吐量提升,与 GPU (FPGA) 基准相比实现了 5.85 倍 (1.51 倍) 的能效提升。

英文摘要:

Vision Transformers (ViTs) have emerged as a state-of-the-art solution for object classification tasks. However, their computational demands and high parameter count make them unsuitable for real-time inference, prompting the need for efficient hardware implementations. Existing hardware accelerators for ViTs suffer from frequent off-chip memory access, restricting the achievable throughput by memory bandwidth. In devices with a high compute-to-communication ratio (e.g., edge FPGAs with limited bandwidth), off-chip memory access imposes a severe bottleneck on overall throughput. This work proposes ME-ViT, a novel \underline{M}emory \underline{E}fficient FPGA accelerator for \underline{ViT} inference that minimizes memory traffic. We propose a \textit{single-load policy} in designing ME-ViT: model parameters are only loaded once, intermediate results are stored on-chip, and all operations are implemented in a single processing element. To achieve this goal, we design a memory-efficient processing element (ME-PE), which processes multiple key operations of ViT inference on the same architecture through the reuse of \textit{multi-purpose buffers}. We also integrate the Softmax and LayerNorm functions into the ME-PE, minimizing stalls between matrix multiplications. We evaluate ME-ViT on systolic array sizes of 32 and 16, achieving up to a 9.22$\times$ and 17.89$\times$ overall improvement in memory bandwidth, and a 2.16$\times$ improvement in throughput per DSP for both designs over state-of-the-art ViT accelerators on FPGA. ME-ViT achieves a power efficiency improvement of up to 4.00$\times$ (1.03$\times$) over a GPU (FPGA) baseline. ME-ViT enables up to 5 ME-PE instantiations on a Xilinx Alveo U200, achieving a 5.10$\times$ improvement in throughput over the state-of-the art FPGA baseline, and a 5.85$\times$ (1.51$\times$) improvement in power efficiency over the GPU (FPGA) baseline.

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

↑