arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2508.00441cs.PFcs.ARcs.MS
收藏

不使用FP64算术的DGEMM——利用FP64模拟和FP8张量核心结合Ozaki方案

DGEMM without FP64 Arithmetic - Using FP64 Emulation and FP8 Tensor Cores with Ozaki Scheme

Information Technology Center, Nagoya University(名古屋大学信息技术中心)

Daichi Mukunoki

AI总结:

本研究针对AI硬件趋势转向FP8低精度浮点运算的现状,重新审视Ozaki方案,探索使用FP8张量核心及整数算术模拟FP64,并引入内积维度分块加速FP16实现,在NVIDIA RTX Blackwell GPU上验证了有效性。

摘要:

随着AI计算需求的快速增长,越来越多的硬件被开发出来,以高效执行此类工作负载所需的低精度矩阵乘法。然而,由于精度要求,这些操作通常不能直接应用于科学计算。Ozaki方案——由Ozaki等人于2012年提出的一种精确矩阵乘法方法——使得利用低精度矩阵乘法单元(如FP16张量核心)实现FP64矩阵乘法(DGEMM)成为可能。该方法此后被扩展以利用整数算术,相比基于浮点数的实现,提供了更低的计算成本。事实上,在配备为AI工作负载设计的快速INT8张量核心的GPU上,它已实现了比硬件FP64操作更高的性能。然而,近期面向AI的处理器趋势已转向提升低精度浮点运算(如FP8)的性能,而非整数运算。受此趋势启发,本研究重新审视了Ozaki方案中低精度浮点运算的使用。具体而言,我们探索了FP8张量核心的使用。此外,对于支持非常慢或根本不支持硬件FP64操作的处理器,我们还考虑了基于整数算术的FP64算术模拟。这完全消除了硬件FP64指令。进一步,我们探索了在内积维度上使用分块来加速基于FP16的实现。我们通过在NVIDIA RTX Blackwell架构GPU上评估性能,证明了这些方法的有效性。

英文摘要:

As the demand for AI computation rapidly increases, more hardware is being developed to efficiently perform the low-precision matrix multiplications required by such workloads. However, these operations are generally not directly applicable to scientific computations due to accuracy requirements. The Ozaki scheme - an accurate matrix multiplication method proposed by Ozaki et al. in 2012 - enables FP64 matrix multiplication (DGEMM) using low-precision matrix multiplication units, such as FP16 Tensor Cores. This approach has since been extended to utilize integer arithmetic, offering lower computational cost compared to floating-point-based implementations. In fact, it has achieved higher performance than hardware FP64 operations on GPUs equipped with fast INT8 Tensor Cores designed for AI workloads. However, recent AI-oriented processors trends have shifted toward improving the performance of low-precision floating-point operations, such as FP8, rather than integer operations. Motivated by this shift, this study revisits the use of low-precision floating-point operations in the Ozaki scheme. Specifically, we explore the use of FP8 Tensor Cores. In addition, for processors that support very slow or no hardware-based FP64 operations, we also consider FP64 arithmetic emulation based on integer arithmetic. This completely eliminates hardware FP64 instructions. Furthermore, we explore the use of blocking in the inner-product dimension to accelerate FP16-based implementations. We demonstrate the effectiveness of these methods by evaluating the performance on an NVIDIA RTX Blackwell architecture GPU.

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

↑