arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2512.07004cs.MScs.ARcs.NAmath.NA
收藏

NVIDIA Tensor Cores的精确模型

Accurate Models of NVIDIA Tensor Cores

School of Computer Science, University of Leeds(利兹大学计算机学院)

Faizan A. Khattak, Mantas Mikaitis

AI总结:

针对NVIDIA GPU中矩阵乘法器的非IEEE 754行为导致结果不可重现的问题,提出通过测试向量和半穷举验证构建V100、A100、H100和B200 GPU的低精度矩阵乘法器软件模型,实现位精确模拟。

摘要:

矩阵乘法是神经网络训练和推理中的基本运算。为了加速矩阵乘法,图形处理单元(GPU)在硬件中实现了该运算。由于相比基于软件的矩阵乘法具有更高的吞吐量,这些乘法器越来越多地被用于AI之外,以加速科学计算中的各种应用。然而,针对AI的矩阵乘法器目前不遵循IEEE 754浮点运算行为,不同供应商提供不同的数值特性。这导致在不同代GPU架构的矩阵乘加指令级别上产生不可重现的结果。为了研究矩阵乘法器的数值特性——如舍入行为、累加器宽度、归一化点、额外进位位等——通常构建测试向量。然而,这些向量可能无法区分不同的硬件模型,并且由于硬件可用性有限,它们在多个平台上的可靠性仍未得到充分测试。我们提出了软件模型,用于模拟V100、A100、H100和B200数据中心GPU中低精度和混合精度矩阵乘法器的内积行为,支持混合精度算法开发者感兴趣的大多数输入格式:8位、16位和19位浮点数。这些矩阵乘法器模型首先通过设计触发对实现中位级差异敏感的输出的测试向量来确定数值特征,然后通过模型与实际GPU矩阵乘法器之间的半穷举比较(随机输入向量$10^7$个值)进行近似,重复此过程直到模型达到位精确。

英文摘要:

Matrix multiplication is a fundamental operation in both training of neural networks and inference. To accelerate matrix multiplication, Graphical Processing Units (GPUs) provide it implemented in hardware. Due to the increased throughput over the software-based matrix multiplication, the multipliers are increasingly used outside of AI, to accelerate various applications in scientific computing. However, matrix multipliers targeted at AI are at present not compliant with IEEE 754 floating-point arithmetic behaviour, with different vendors offering different numerical features. This leads to non-reproducible results across different generations of GPU architectures, at the matrix multiply-accumulate instruction level. To study numerical characteristics of matrix multipliers - such as rounding behaviour, accumulator width, normalization points, extra carry bits, and others - test vectors are typically constructed. Yet, these vectors may or may not distinguish between different hardware models, and due to limited hardware availability, their reliability across many different platforms remains largely untested. We present software models for emulating the inner product behavior of low- and mixed-precision matrix multipliers in the V100, A100, H100 and B200 data center GPUs in most supported input formats of interest to mixed-precision algorithm developers: 8-, 16-, and 19-bit floating point. These matrix multiplier models are first approximated by determining the numerical features via test vectors designed to trigger outputs sensitive to bit level differences in the implementation, followed by semi-exhaustive comparison (randomised input vectors of $10^7$ values) between the models and the actual GPU matrix multipliers - this process is repeated until the model is bit accurate.

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

↑