Emulating DGEMM and ZGEMM with INT8 Matrix Engines on Intel Arc GPUs: Ozaki Scheme II on the Xe2 Architecture
Abstract
Double-precision matrix multiplication, real (DGEMM) and complex (ZGEMM), dominates the run time of dense linear algebra and electronic-structure codes. On affordable GPUs, however, FP64 throughput is a small and shrinking fraction of the throughput of the low-precision matrix engines. Ozaki scheme II closes this gap by reducing a floating-point matrix product to a handful of exact INT8 products followed by a Chinese-remainder reconstruction; the number of products sets the accuracy. We present what is, to our knowledge, the first implementation of Ozaki scheme II for Intel GPUs. Written in SYCL on top of oneMKL, it runs entirely on the device and exposes the full BLAS dgemm/zgemm interface. Making the scheme fast on the Xe2 (Battlemage) architecture required keeping FP64 arithmetic out of all memory-bound kernels, a branch-free residue computation, an FP32 evaluation of the CRT quotient with a proven safety margin, 16-bit limb arithmetic in the reconstruction, and work-arounds for performance cliffs of the vendor INT8 GEMM. On an Intel Arc Pro B60 (24 GB) the emulated DGEMM reaches 17.3, 12.1 and 9.3 TFLOP/s with , 12 and 16 moduli at , and up to 21.1 TFLOP/s overall, i.e. 12-28x the native FP64 DGEMM of the same board. The emulated ZGEMM, which uses the 3M form exactly in integer arithmetic, reaches up to 27.4 TFLOP/s and is 13.7-17.8x faster than native ZGEMM for at . With the results are correctly rounded for well-scaled inputs and, using an extended-width residue path (-24), also for inputs with wide exponent ranges, whereas native DGEMM rounds only 2-13% of the entries correctly. We also report worst-case accuracy, phase breakdowns, energy, an ablation study, a comparison with Ozaki scheme I, and a validated performance model.
Create a lesson
Metadata
- Categories
- cs.MS, cs.DC, cs.NA, math.NA
- Comments
- 21 pages, 5 figures, 17 tables. Code: https://github.com/MacraMacra/OS2-Xe
Related papers
Ozaki 2.5: Engineering the Deconstruction Path of fp64-Emulated Dense Matrix Multiplication on FP8 Tensor Cores
Shared title terminologycs.MSSatoshi Matsuoka
Providing Accuracy Guarantees for the Fixed-Point Emulation of Matrix Multiplication
Shared title terminologycs.MSCole Brower, Peter Caday, John Gunnels
A 55-Addition Rank-23 Scheme for 3×3 Matrix Multiplication via Exact Two-Sided Minimization
Shared title terminologycs.MSGreg Sidebottom
BF16 Component-Product Emulation of FP32 and FP64 GEMM on Intel AMX
Shared title terminologycs.MSBing Cui, Yu Liu
Improved Scaling for Fast Mode of Ozaki Scheme II
Shared title terminologycs.MSShota Kawakami, Daisuke Takahashi
51 Additions per Recursive Step for Rank-23 3×3 Matrix Multiplication, Machine-Checked over Arbitrary Rings
Shared title terminologycs.MSGreg Sidebottom