Modern AI accelerators rely on matrix multiply-accumulate units (MMAUs), such as NVIDIA Tensor Cores and AMD Matrix Cores, to accelerate deep neural network workloads. MMAUs expose only instruction-level or API-level interfaces of matrix multiply-accumulate (MMA) operations, while leaving internal floating-point arithmetic behavior undocumented. Consequently, MMAUs across vendors and architectural generations often produce numerical discrepancies for identical inputs, and sometimes exhibit reduced numerical accuracy that can cause training instability. Diagnosing and understanding the root causes of these effects is challenging without white-box models of their arithmetic behavior. This paper proposes closed-loop feature probing (CLFP), a generic and systematic framework for constructing bit-accurate arithmetic behavior models of MMA operations. Based on this framework, we analyze all MMA instructions on ten GPU architectures spanning NVIDIA Volta through RTX Blackwell and AMD CDNA1 through CDNA3, and derive the first bit-accurate arithmetic models for these MMAUs. Our models explain previously observed cross-platform numerical discrepancies and accuracy issues, enable white-box numerical error analysis, reveal four types of precision bottlenecks and one type of numerical asymmetry, and inform software workarounds as well as design suggestions for future MMAUs. This work is open-source at https://github.com/microsoft/MMA-Sim
Figures & tables
Fig. 1: The closed-loop feature probing (CLFP) framework for modeling the arithmetic behavior of the MMA operation. The loop of Steps 4 (verification) and 5 (adding new tests and revising the model) ensures completeness and bit-accuracy.
Fig. 2: Examples of summation trees (left) and corresponding values of d(i,j)/v (right), where (i,j) denotes the input with pi=U , pj=−U , and all other summands set to v .
GPU
MMA-Sim
Human
Total
Step 1
5 minutes
0
0
5 minutes
Step 2
< 1 minute
0
0
< 1 minute
Step 3
< 1 minute
0
< 1 hour
< 1 hour
Step 4
5 minutes
1 hour*
0
1 hour
Step 5
< 1 minute
< 1 minute
4 hours
4 hours
Total
10-20 minutes
1-3 hours
1-9 hours
2-12 hours
TABLE I: Approximate time of running CLFP with 0-2 revision loops (typical). *MMA-Sim execution time has been reduced from 10-20 hours to 1 hour through optimization.
TABLE II: Categories of our bit-accurate models for GPU matrix multiply-accumulate units.
Architecture
Instruction
Model
Input Type
Output Type
Lmax
F
ρ
Volta
HMMA
ΦT-FDPA
FP16
FP32
4
23
RZ FP32
FP16
FP16
4
23
RNE FP16
Turing
HMMA
ΦT-FDPA
FP16
FP32
8
24
RZ FP32
FP16
FP16
8
24
RNE FP16
Ampere
DMMA
ΦFMA
FP64
FP64
1
N/A
Configurable
HMMA
ΦT-FDPA
TF32
FP32
4
24
RZ FP32
TABLE III: Models and parameters for all NVIDIA and AMD GPU MMA instructions. In addition, G=16 for all instructions modeled by ΦGST-FDPA .
Architecture
TF32/BF16 Instr.
FP16 Instr.
FP8 Instr.
Volta
N/A
0.0
N/A
Turing
N/A
−0.5
N/A
Ampere
−0.5
−0.5
N/A
Ada Lovelace
−0.5
−0.5
0.0
Hopper
−0.75
−0.75
0.0
Blackwell
−0.75
−0.75
−0.75
TABLE IV: The divergent results of different MMA instructions for the same input in Equation 10 . In addition, all FP64/FP32 instructions produce d0,0=−0.875 .
Elementary Op.
Error Source
Error Bound
FTZ-Add/Mul
Input FTZ
2−126 or 2−14
Add/Mul
0.5 ulp
Output FTZ
2−126
FMA, E-FDPA
Output rounding
0.5 ulp or 1 ulp
T-FDPA, others
Fused summation
(L+1)2emax−F
Output rounding
0.5 ulp or 1 ulp
TABLE V: Sources and upper bounds of numerical error.
Architectures and Instructions
Concerns
AMD CDNA2, FP16-input
Input FTZ
NVIDIA Ada Lovelace and Hopper, FP8-input
Small F
NVIDIA Ada Lovelace and Hopper, FP8-input
ρ=RZE8M13
All NVIDIA architectures, FP16-output
ρ=RNEFP16
AMD CDNA3, TF32/BF16/FP16/FP8-input
Asymmetry
TABLE VI: Concerns regarding numerical precision (top) and accuracy (bottom).
Fig. 3: Distributions of δRD , the numerical deviation of the AMD CDNA3 FP16 MMA instruction, which uses the “round down” (RD) mode internally, and δRZ , the numerical deviation of a hypothetical variant that replaces the internal RD operations with “round toward zero” (RZ) operations.
Large language model (LLM) outputs are expected to be reproducible under greedy decoding, yet in practice the same model, prompt, and software stack produce different outputs on different GPUs. The root cause is floating-point non-associativity combined with hardware-dependent kernel selection. Inference frameworks select different matrix-multiplication kernels on each architecture, with different parallel reduction orders and unspecified tensor-core arithmetic, and the resulting rounding differences can flip output tokens. Existing solutions have imperfect cross-architecture reproducibility and incur a significant performance penalty. We present a solution employing a set of fixed-configuration fused-upcast GEMM kernels that load 16-bit weights from memory, upcast them to FP32 in registers, and accumulate with IEEE-754 arithmetic in a reduction order that is a pure function of the problem shape and is therefore independent of the device, its SM count, or kernel scheduling. By fixing the floating-point reduction order as a function of problem shape alone, every GPU runs the same operation sequence, so cross-architecture reproducibility of the linear layers reduces to correct IEEE-754 arithmetic rather than to rounding differences staying below a tie-flip threshold. We confirm our solution's linear-layer outputs are bitwise identical across NVIDIA Ampere, Ada, and Hopper GPUs, while running 1.17 to 3.1× faster end-to-end than the state-of-the-art solution and cutting weight-memory traffic in half.
Liam Cooper, Shinnung Jeong, Hyeran Jeon +2
Georgia Institute of Technology · University of California, Merced
Apple's Metal 4.1 exposes a tensor compute path: the Metal Performance Primitives (MPP) matmul2d operation over cooperative_tensor fragments, whose interface is documented but whose hardware behavior is deliberately hidden. The specification states which data-type rows are supported, never whether they are hardware-accelerated, where the operation physically executes, what its accumulator width is, or how it partitions matrix fragments across threads. We present Rigel, an empirical characterization of this path on a single Apple M4 Max (a pre-neural-accelerator generation). Using a checksum-gated, provenance-tracked microbenchmark harness, Rigel recovers eleven facts the v4.1 specification hides or contradicts. The headline finding: the Metal 4.1 fp8 (E4M3) matmul2d is emulated, not accelerated: it sustains 0.94x the throughput of fp16 despite reading half the operand bytes, so on M4 it is a memory-footprint feature, not a performance feature. We further show, via a three-signal triangulation (throughput ceiling, comparison against simdgroup_matrix, and per-rail power attribution), that matmul2d executes entirely on the GPU shader cores with no dedicated matrix datapath and no evidence of Apple Neural Engine routing; that it accumulates in >=fp32; and we reconstruct the opaque 8x8 cooperative_tensor fragment layout Apple documents nowhere. Acting on the characterization, a hand-fused GEMM + bias + GELU kernel beats the decomposed path by +6.5-12.9% in the cache-resident regime. All findings are reproducible from committed MIT-licensed code and per-cell CSVs.
Running the same language model on different graphics processing unit (GPU) vendors can produce different logits, even when the model weights and inputs are the same. We analyze cross-vendor mismatch in two dense and two mixture-of-experts (MoE) models with five metric families, namely bitwise equality, logit differences, top-K consistency, token agreement, and task accuracy. We trace one source of the mismatch to accumulation order inside vendors' matrix instructions. Upcasting to FP32 reduces the dense model's logit error by 43% at three times the runtime, yet keeping only the MLPs in BF16 retains 94% of this gain at 1.3 times the runtime, so most of the cost of full upcasting buys little. In the MoE models, FP32 and FP16 both lower the probability error but raise the logit error and change expert selection, and FP16 fails in the dense model. An output-head low-rank adapter (LoRA) does not help either, since the final hidden state does not predict the mismatch. The mismatch also carries into training. With every seed fixed, a student distilled from a teacher running on AMD answers 431 MMLU questions differently from one distilled from the same teacher on NVIDIA. Under FP32 upcasting, bitwise equality barely changes while the output distributions move most of the way to the reference, so judging cross-vendor agreement by a single measure misreads both its cost and its gains. Code is available at https://github.com/crova-project/crova.
Erland Hilman Fuadi, Chong Tian, Xiaosong Ma +1
Mohamed bin Zayed University of Artificial Intelligence