不对称瓷砖缓冲是否有益
Can Asymmetric Tile Buffering Be Beneficial?
AI总结:
本文提出不对称分块缓冲技术,通过解耦输入和输出分块维度,提升GEMM计算效率,在AMD XDNA2 AIE上实现4.54倍加速,创下单精度性能新纪录。
摘要:
通用矩阵乘法(GEMM)是现代AI工作负载的计算核心,其效率高度依赖于有效的分块策略。传统方法采用对称分块缓冲,其中输入$A$沿维度$M$的缓冲分块大小与输出$C$的分块大小相匹配。在本文中,我们引入了不对称分块缓冲(ATB),这是一种简单但强大的技术,将输入和输出操作数的缓冲分块维度解耦。我们首次证明,ATB既实用又极具益处。为了解释这种效果,我们开发了一个性能模型,结合了ATB的优点(更高的算术强度)和其开销(更高的内核切换成本),为如何选择有效的ATB分块因子提供了见解。作为案例研究,我们将ATB应用于AMD最新XDNA2 AI引擎(AIE),在混合精度BFP16--BF16 GEMM上实现了高达4.54倍的加速,从4.8到24.6 TFLOPS,为XDNA2 AIE树立了新的性能纪录。
英文摘要:
General matrix multiplication (GEMM) is the computational backbone of modern AI workloads, and its efficiency is critically dependent on effective tiling strategies. Conventional approaches employ symmetric tile buffering, where the buffered tile size of the input $A$ along the dimension $M$ matches the output tile size of $C$. In this paper, we introduce asymmetric tile buffering (ATB), a simple but powerful technique that decouples the buffered tile dimensions of the input and output operands. We show, for the first time, that ATB is both practical and highly beneficial. To explain this effect, we develop a performance model that incorporates both the benefits of ATB (higher arithmetic intensity) and its overheads (higher kernel switching costs), providing insight into how to select effective ATB tiling factors. As a case study, we apply ATB to AMD's latest XDNA2 AI Engine (AIE), achieving up to a 4.54x speedup, from 4.8 to 24.6 TFLOPS on mixed-precision BFP16--BF16 GEMM, establishing a new performance record for XDNA2 AIE.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。