CHARM:基于通用ACAP架构的异构矩阵乘法加速器
CHARM: Composing Heterogeneous Accelerators for Matrix Multiply on Versal ACAP Architecture
摘要:
密集矩阵乘法(MM)是深度学习应用中使用最多的内核之一。为了应对这些应用的高计算需求,具有FPGA和专用ASIC加速器的异构架构已成为有前途的平台。例如,AMD/Xilinx Versal ACAP架构将通用CPU内核和可编程逻辑与针对AI/ML优化的AI Engine处理器相结合。凭借400个AIE,它为32位浮点数据提供了高达6.4 TFLOP的性能。然而,机器学习模型通常包含大型和小型MM操作。虽然大型MM操作可以跨多个核高效并行化,但小型MM操作通常不能。我们观察到,在Versal ACAP中的大型单片MM加速器上执行来自BERT自然语言处理模型的一些小MM层,实现了不到理论峰值性能的5%。因此,一个关键的问题出现了:我们如何设计加速器,以充分利用有限的通信带宽下的丰富的计算资源的应用程序与不同大小的多个MM层?我们确定了最大的系统吞吐量的瓶颈造成的不匹配的大规模计算资源的一个单片加速器和各种MM层的小尺寸的应用程序。为了解决这个问题,我们提出了CHARM框架组成多个不同的MM加速器架构,同时对不同的层在一个应用程序。我们在AMD Versal ACAP VCK 190评估板上为四种不同的应用程序部署了CHARM框架,包括BERT、ViT、NCF和MLP。实验结果表明,我们在BERT、ViT、NCF和MLP上分别获得了1.46 TFLOPs、1.61 TFLOPs、1.74 TFLOPs和2.94 TFLOPs的推理吞吐量,与单块加速器相比,分别获得了5.40倍、32.51倍、1.00倍和1.00倍的吞吐量增益。
英文摘要:
Dense matrix multiply (MM) serves as one of the most heavily used kernels in deep learning applications. To cope with the high computation demands of these applications, heterogeneous architectures featuring both FPGA and dedicated ASIC accelerators have emerged as promising platforms. For example, the AMD/Xilinx Versal ACAP architecture combines general-purpose CPU cores and programmable logic with AI Engine processors optimized for AI/ML. With 400 AIEs, it provides up to 6.4 TFLOPs performance for 32-bit floating-point data. However, machine learning models often contain both large and small MM operations. While large MM operations can be parallelized efficiently across many cores, small MM operations typically cannot. We observe that executing some small MM layers from the BERT natural language processing model on a large, monolithic MM accelerator in Versal ACAP achieved less than 5% of the theoretical peak performance. Therefore, one key question arises: How can we design accelerators to fully use the abundant computation resources under limited communication bandwidth for applications with multiple MM layers of diverse sizes? We identify the biggest system throughput bottleneck resulting from the mismatch of massive computation resources of one monolithic accelerator and the various MM layers of small sizes in the application. To resolve this problem, we propose the CHARM framework to compose multiple diverse MM accelerator architectures working concurrently towards different layers in one application. We deploy the CHARM framework for four different applications, including BERT, ViT, NCF, MLP, on the AMD Versal ACAP VCK190 evaluation board. Our experiments show that we achieve 1.46 TFLOPs, 1.61 TFLOPs, 1.74 TFLOPs, and 2.94 TFLOPs inference throughput for BERT, ViT, NCF and MLP, which obtain 5.40x, 32.51x, 1.00x and 1.00x throughput gains compared to one monolithic accelerator.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。