arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2606.29129cs.MScs.DCcs.NAmath.NA
收藏

Ozaki 方案 II 快速模式的改进缩放

Improved Scaling for Fast Mode of Ozaki Scheme II

University of Tsukuba(筑波大学);Center for Computational Sciences, University of Tsukuba(筑波大学计算科学中心)

Shota Kawakami, Daisuke Takahashi

AI总结:

针对 Ozaki 方案 II 快速模式中缩放公式缺乏尺度不变性导致精度下降或 CRT 恢复失败的问题,提出基于 CRT 唯一性条件的尺度不变缩放公式,在无额外开销下实现与精确模式相当的精度和快速模式的吞吐量。

摘要:

Ozaki 方案 II 基于中国剩余定理 (CRT) 使用低精度整数矩阵运算模拟高精度矩阵乘法。它首先缩放高精度矩阵以将其转换为整数矩阵。对于此缩放步骤,Ozaki 方案 II 提供两种模式:精确模式,使用 INT8 矩阵乘法估计缩放因子;快速模式,以较低计算成本应用柯西-施瓦茨不等式。我们表明现有公式缺乏尺度不变性;将输入矩阵乘以常数会改变缩放步骤中整数矩阵的有效位宽,导致精度下降或 CRT 恢复失败。为解决此问题,我们提出一种通过柯西-施瓦茨不等式从 CRT 唯一性条件导出的修订缩放公式。所提公式具有尺度不变性,保证始终满足 CRT 唯一性条件,且相比原始快速模式不引入额外开销。在 NVIDIA GH200 GPU 上的实验表明,所提方法在保持与快速模式相当的吞吐量的同时,实现了与精确模式相当的精度。在精度-吞吐量权衡中,所提方法克服了快速模式的精度限制和精确模式的吞吐量约束,提供了优越的精度和性能。

英文摘要:

Ozaki scheme II emulates high-precision matrix multiplication using low-precision integer matrix operations based on the Chinese remainder theorem (CRT). It first scales the high-precision matrices to convert them into integer matrices. For this scaling step, Ozaki scheme II provides two modes: accurate mode, which uses INT8 matrix multiplication to estimate scaling factors, and fast mode, which applies the Cauchy--Schwarz inequality at lower computational cost. We show that the existing formula lacks scale invariance; multiplying the input matrices by a constant changes the effective bit width of the integer matrices in the scaling step, causing accuracy degradation or CRT recovery failure. To address this, we propose a revised scaling formula derived from the CRT uniqueness condition via the Cauchy--Schwarz inequality. The proposed formula is scale-invariant by construction, guarantees that the CRT uniqueness condition is always satisfied, and introduces no additional overhead over the original fast mode. Experiments on an NVIDIA GH200 GPU show that the proposed method achieves accuracy comparable to that of accurate mode while maintaining throughput comparable to that of fast mode. In the accuracy--throughput trade-off, the proposed method overcomes the accuracy limitation of fast mode and the throughput constraint of accurate mode, offering a superior accuracy and performance.

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

↑