构建了GPU矩阵乘累加单元的比特级精确模型,揭示数值差异根源。
Bit-Accurate Modeling of GPU Matrix Multiply-Accumulate Units: Demystifying Numerical Discrepancy and Accuracy
- 提出闭环特征探测框架,系统建模MMA单元浮点运算行为
- 首次获得10款GPU上MMA指令的比特级精确模型,覆盖多代架构
- 发现4类精度瓶颈和1种数值不对称设计,为软件优化提供依据
现代AI加速器依赖矩阵乘累加单元(MMAUs),如NVIDIA Tensor Cores和AMD Matrix Cores,以加速深度神经网络计算。这些MMAUs仅暴露指令级或API级的矩阵乘累加(MMA)接口,其内部浮点算术行为未公开。因此,不同厂商和架构代际的MMAUs对相同输入常产生数值差异,有时导致训练不稳定性。缺乏白盒模型使得诊断根因极为困难。本文提出闭环特征探测(CLFP)框架,系统构建完整的MMA算术行为模型。基于该框架,分析了从NVIDIA Volta到RTX Blackwell、AMD CDNA1到CDNA3共十款GPU架构的全部MMA指令,首次建立这些MMAUs的比特级精确模型。模型解释了跨平台数值差异与精度问题,支持白盒数值误差分析,揭示四类精度瓶颈设计和一种数值不对称设计,显著影响数值准确性,并提供软件缓解方案及未来MMAU设计指导。相关工作已开源:https://github.com/microsoft/MMA-Sim。
原文摘要 · Abstract (English)
Modern AI accelerators rely on matrix multiply-accumulate units (MMAUs), such as NVIDIA Tensor Cores and AMD Matrix Cores, to accelerate deep neural network workloads. MMAUs expose only instruction-level or API-level interfaces of matrix multiply-accumulate (MMA) operations, while leaving internal floating-point arithmetic behaviors undocumented. Consequently, MMAUs across vendors and architectural generations often produce numerical discrepancies for identical inputs, and sometimes exhibit reduced numerical accuracy that can cause training instability. Diagnosing and understanding the root causes of these effects is challenging without white-box models of their arithmetic behaviors. This paper proposes closed-loop feature probing (CLFP), a generic and systematic framework for constructing complete arithmetic behavior models of MMA operations. Based on this framework, we analyze all MMA instructions on ten GPU architectures spanning from NVIDIA Volta to RTX Blackwell and from AMD CDNA1 to CDNA3, and derive the first bit-accurate arithmetic models for these MMAUs. Our models explain previously observed cross-platform numerical discrepancies and accuracy issues, enable white-box numerical error analysis, reveal four precision bottleneck designs and one numerical asymmetry design that significantly affect numerical accuracy, and provide software workarounds as well as design guidance for future MMAUs. This work is open-source on https://github.com/microsoft/MMA-Sim .
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。