Providing Accuracy Guarantees for the Fixed-Point Emulation of Matrix Multiplication
Abstract
Fixed-point methods such as Ozaki-II emulate double-precision matrix multiplication (GEMM) on fast low-precision hardware. Software that chooses the mantissa bit count automatically is numerically safe when the emulated product keeps the error guarantee of the floating-point GEMM it replaces. We analyze the worst-case and average-case error of fixed-point and floating-point dot products, define exponent span capacities that determine the extra mantissa bits an input requires, and approximate them with a low-precision GEMM. We prove that 53 bits plus such a capacity and a small constant preserve the classical worst-case error bound for a floating-point dot product, and we demonstrate this guarantee in software on several test cases. In a developer build of cuBLAS on an NVIDIA B200, each implemented bit-count rule earns grade~A on Test~2c of ``Grading the BLAS'' at every size and exponent range tested, falling back to double precision at the widest ranges; in exact arithmetic, the bound holds on every adversarial and random input tested.
Create a lesson
Metadata
- Categories
- cs.MS, cs.DC
- Comments
- We plan to submit to TOMS, but have not done so
Related papers
Ozaki 2.5: Engineering the Deconstruction Path of fp64-Emulated Dense Matrix Multiplication on FP8 Tensor Cores
Shared title terminologycs.MSSatoshi Matsuoka
A 55-Addition Rank-23 Scheme for 3×3 Matrix Multiplication via Exact Two-Sided Minimization
Shared title terminologycs.MSGreg Sidebottom
Emulating DGEMM and ZGEMM with INT8 Matrix Engines on Intel Arc GPUs: Ozaki Scheme II on the Xe2 Architecture
Shared title terminologycs.MSRostislavs Rostovskis, Aleksandrs Platonenko
51 Additions per Recursive Step for Rank-23 3×3 Matrix Multiplication, Machine-Checked over Arbitrary Rings
Shared title terminologycs.MSGreg Sidebottom
A New Sparse Matrix Vector Multiplication GPU Algorithm Designed for Finite Element Problems
Shared title terminologycs.MSJonathan Wong, Ellen Kuhl, Eric Darve
Portable Extended-Precision Floating-Point Arithmetic for Scientific Computing Kernels
Shared title terminologycs.MSManas Vishal