NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

FTTN: Feature-Targeted Testing for Numerical Properties of NVIDIA & AMD Matrix Accelerators

Xinyi Li, Ang Li, Bo Fang, Katarzyna Swirydowicz, Ignacio Laguna, Ganesh Gopalakrishnan · OpenReview

Abstract

NVIDIA Tensor Cores and AMD Matrix Cores (together called Matrix Accelerators) are of growing interest in high-performance computing and machine learning owing to their high performance. Unfortunately, their numerical behaviors are not publicly documented, including the number of extra precision bits maintained, the accumulation order of addition, and predictable subnormal number handling during computations. This makes it impossible to reliably port codes across these differing accelerators. This paper contributes a collection of Feature Targeted Tests for Numerical Properties (FTTN) that help determine these features across five floating-point formats, four rounding modes, and additional properties that highlight the rounding behaviors and preservation of extra precision bits. To show the practical relevance of FTTN, we design a simple matrix-multiplication test designed with insights gathered from our feature-tests. We executed this very simple test on five platforms, producing different answers: V100, A100, and MI250X produced 0, MI100 produced 255.875, and Hopper H100 produced 191.875. Our matrix multiplication tests employ patterns found in iterative refinement-based algorithms, highlighting the need to check for significant result variability when porting code across GPUs.

Introduction

In the race for performance, hardware vendors have introduced specialized units like NVIDIA’s Tensor Cores and AMD’s Matrix Cores. While these accelerators are incredibly fast for AI and high-performance computing (HPC), they are often "black boxes." Official documentation frequently omits critical numerical details: the number of internal extra precision bits, support for subnormal numbers, specific rounding modes, and the order of operations in block fused-multiply-add (FMA) units.

Without this information, scientists moving code between hardware generations or vendors (e.g., from an NVIDIA V100 to an AMD MI250X) may encounter inconsistent results without knowing if the discrepancy stems from a software bug or fundamental hardware differences. FTTN provides a rigorous diagnostic suite to detect these differences before they cause silent failures in critical applications.

Methodology: The FTTN Pipeline

The FTTN suite utilizes a pipeline of micro-benchmarks designed to interrogate hardware using mathematical edge cases based on the IEEE 754 floating-point standard. Unlike traditional application-level benchmarks, FTTN employs orchestrated testing where earlier results inform subsequent tests.

The FTTN diagnostic pipeline, illustrating the sequential logic used to determine rounding modes, FMA properties, and accumulation order.

Key technical approaches include:

  • Bit-Level Probing: By using specific values that trigger rounding at the "unit in the last place" (ulp), the tests detect if hardware maintains 0, 1, 2, or 3 extra bits of precision during internal calculations.
  • FMA Width Detection: The tests determine the internal granularity of matrix units by shifting a single bit across a calculation until precision is lost, revealing the "block size" of the hardware's FMA unit.
  • Rounding Mode Identification: The suite identifies whether the hardware uses "Round to Nearest, Ties to Even" (RTN-TE) or simpler methods like truncation (rounding toward zero).
Bit-level alignment examples showing how the number of extra bits (1, 2, or 3) leads to different hexadecimal results during internal accumulation.

Key Findings and Hardware Comparisons

Evaluation across modern GPU hardware (NVIDIA V100, A100, H100; AMD MI100, MI250X) revealed significant undocumented variability:

  1. Generational Evolution: NVIDIA hardware behavior is not static. The V100 maintains 0 extra precision bits for FP16, while the A100 maintains 1, and the H100 maintains at least 2. This implies that code may behave differently even when staying within the same vendor's ecosystem.
  2. AMD vs. NVIDIA Philosophy: AMD GPUs consistently utilize 3 extra bits for precise rounding, aligning more closely with traditional CPU behavior. However, the MI250X lacks subnormal support for FP16 and BF16, which can lead to unexpected "division by zero" errors in code that functions correctly on NVIDIA hardware.
  3. FMA Unit Width: FTTN revealed that the NVIDIA H100 features a massive FMA unit width (at least 16), significantly larger than the V100’s width of 4.

Practical Impact: The GEMM Test

To demonstrate the real-world implications of these findings, the researchers designed a "discriminatory matrix-multiplication test." This simple GEMM (General Matrix Multiply) was designed to exploit the specific hardware differences uncovered by FTTN. When executed on five different platforms, the test produced three distinct results:

  • V100, A100, MI250X: 0
  • MI100: 255.875
  • H100 (Hopper): 191.875

This result quantifies the "numerical drift" that can occur during porting, proving that "correctness portability" is currently a myth for matrix accelerators.

Conclusion

FTTN uncovers the hidden numerical behaviors of modern matrix accelerators, highlighting that errors are not merely confined to the 8th decimal place but can cause results to differ by orders of magnitude. Future work includes expanding the suite to cover emerging accelerators like Google TPUs and using formal methods to automatically generate more complex discriminatory tests.

Summary updated

BibTeX
@inproceedings{li2024fttn,
  author = {Xinyi Li and Ang Li and Bo Fang and Katarzyna Swirydowicz and Ignacio Laguna and Ganesh Gopalakrishnan},
  title = {{FTTN: Feature-Targeted Testing for Numerical Properties of NVIDIA \& AMD Matrix Accelerators}},
  booktitle = {CCGrid},
  year = {2024},
  doi = {10.1109/ccgrid59990.2024.00014},
}

Loading related content...

Figure