arXiv(opens in a new tab)cs.MSSep 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2609.04663

BF16 Component-Product Emulation of FP32 and FP64 GEMM on Intel AMX

Bing Cui, Yu Liu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Modern CPUs increasingly integrate high-throughput matrix engines optimized for low-precision AI workloads, while many scientific computing applications still rely on FP32 and FP64 GEMM to meet their numerical accuracy requirements. This mismatch motivates an algorithmic bridge that uses low-precision matrix products to emulate higher-precision GEMM. This paper presents a CPU-oriented method based on Intel Advanced Matrix Extensions (AMX) and BF16 matrix products. For FP32, each operand is decomposed into three BF16 components and six selected component products are evaluated, targeting FP32-level accuracy relative to oneMKL SGEMM without claiming elementwise or bitwise identity. For FP64 inputs within the supported BF16 exponent range, the method uses a simplified fixed six-slice Ozaki decomposition. Each retained BF16 product is first produced in FP32, then widened and accumulated in FP64. Four product-count settings retain 6, 10, 15, or 21 component products, exposing the accuracy-performance tradeoff relative to oneMKL DGEMM. The implementation combines precomputed packed component buffers, VNNI-packed BB panels, and an FP32 tile-resident operand-reuse schedule. On the tested square matrices, AMX-FP32 exceeds oneMKL SGEMM throughput. For AMX-FP64, low-product-count variants can exceed DGEMM at sufficiently large orders, while retaining more products improves accuracy at additional cost.

Keywords: Intel AMX, BF16, FP32 and FP64 GEMM, mixed-precision, high-performance computing

1 Introduction

The rapid expansion of artificial intelligence has reshaped the design of modern compute hardware. To meet the arithmetic demand of deep learning, processor vendors have devoted increasing silicon area and power budget to low-precision matrix engines. Formats such as FP16, BF16, FP8, and INT8 now deliver much higher peak throughput than conventional FP32 and, in particular, FP64 arithmetic on many architectures [1-3]. This trend creates a widening imbalance for high-performance computing (HPC). Many scientific applications, including computational fluid dynamics, climate simulation, electronic-structure calculations, and quantum chemistry, still depend on conventional FP32 and FP64 arithmetic for stability, convergence, and reproducibility. Yet general-purpose FP32/FP64 units serve a narrower market than AI-oriented matrix engines, and their performance growth is increasingly constrained by area and energy efficiency.

This imbalance motivates a central question: can the low-precision matrix throughput introduced for AI be used to accelerate high-precision scientific computing? Matrix multiplication is a natural place to ask this question. In machine learning, GEMM is the dominant dense linear-algebra

∗^{*}Correspondence to: liujerry06st@gmail.com primitive; in HPC, matrix products appear directly in dense solvers and indirectly in sparse solvers, spectral methods, tensor contractions, electronic-structure methods, and quantum-chemistry kernels. Modern AI-oriented matrix engines are tile-based: they exploit locality and parallelism by operating on small matrix blocks, and they deliver arithmetic density far beyond traditional scalar or vector units. However, their input formats are usually low precision, and native FP32/FP64 GEMM support is limited or absent. As a result, the hardware capability created for AI is not immediately usable by applications that require conventional FP32 or FP64 GEMM semantics.

The goal of this paper is to investigate an algorithmic path across this precision barrier on CPUs. The core idea is to represent a high-precision matrix product as a controlled collection of low-precision matrix products: each FP32 or FP64 operand is decomposed into several BF16 component matrices, selected component products are evaluated by a fast tile engine, and the partial results are reconstructed in a wider format. Intel Advanced Matrix Extensions (AMX) are the implementation vehicle studied here because they bring a dense tile matrix engine into a general-purpose CPU. AMX is therefore a means to explore the larger idea of using AI-style low-precision hardware to accelerate high-precision GEMM on CPU platforms.

High-precision emulation is not obtained by issuing additional low-precision GEMMs alone. Decomposition produces multiple component matrices and, in principle, a quadratic number of cross products. The most significant products must be selected according to their numerical contribution, while the final summation must preserve low-order information that would otherwise be lost in FP32 accumulation. On a CPU, conversion, packing, tile configuration, cache traffic, parallel scheduling, and final reconstruction can become comparable to the low-precision matrix operations themselves. A successful design must therefore couple numerical decomposition with the data movement and blocking structure of the CPU matrix engine.

This paper presents a BF16-based method for emulating FP32 and FP64 GEMM using Intel AMX. The AMX-FP32 path exploits the shared exponent range of BF16 and FP32 through a three-component BF16 residual decomposition and the six-product schedule suggested by Henry et al. [4], and evaluates whether the resulting kernel provides FP32-level accuracy relative to oneMKL SGEMM. The AMX-FP64 path applies a simplified, unscaled Ozaki decomposition to FP64 operands restricted to the BF16 exponent range. It fixes six BF16 slices per operand, reconstructs each selected component product in FP64, and varies the number of retained cross-products. The product count is a tunable accuracy-cost control: retaining more products typically improves agreement with oneMKL DGEMM but reduces the performance headroom available for acceleration.

References (32)