TL;DR
FTTN (Feature-Targeted Testing) is a new diagnostic suite that uncovers the "hidden" numerical behaviors of NVIDIA and AMD matrix accelerators. By revealing undocumented differences in how these chips handle rounding, precision, and subnormal numbers, the researchers demonstrate that the same code can produce wildly different results across different GPUs—a major hurdle for scientific computing and AI reliability.
What Problem Does This Paper Address?
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."
The official documentation frequently omits critical numerical details: How many extra precision bits are held internally? Does the hardware support subnormal numbers (very small numbers near zero)? What is the specific rounding mode or the order of operations in a "block" fused-multiply-add (FMA)?
Without this information, a scientist moving code from an NVIDIA V100 to an AMD MI250X might find their simulation produces a different answer, but they won't know if it's a bug in their code or a fundamental difference in the hardware's "math." This paper aims to provide a rigorous way to detect these differences before they cause silent failures in critical applications.
Methods
The authors developed FTTN, a pipeline of micro-benchmarks designed to "interrogate" the hardware. Instead of running massive applications, FTTN uses carefully crafted mathematical edge cases based on the IEEE 754 floating-point standard.
Key novel approaches include:
- Orchestrated Testing: The tests are run in a specific sequence (a pipeline) where earlier results (like whether an extra bit exists) are used to refine later tests (like determining the specific rounding direction).
- Bit-Level Probing: By using specific values that trigger rounding at the very edge of a format's precision (the "unit in the last place" or ulp), the tests can detect if the hardware is keeping 0, 1, 2, or 3 extra bits of precision during internal calculations.
- FMA Width Detection: The tests determine the "block size" of the hardware's matrix units by shifting a single bit across a calculation until precision is lost, revealing the internal granularity of the accelerator.
Datasets
The paper does not use traditional ML datasets. Instead, it evaluates the FTTN suite across a "dataset" of modern GPU hardware and floating-point formats:
- Hardware: NVIDIA V100, A100, and H100 (Hopper); AMD MI100 and MI250X.
- Formats: FP16, BF16, TF32 (NVIDIA proprietary), FP32, and FP64.
- Benchmarks: The authors introduced a "discriminatory matrix-multiplication test"—a simple GEMM (General Matrix Multiply) designed specifically to exploit the hardware differences found by FTTN.
Key Insights and Ideas
- Hardware Evolution is Not Linear: NVIDIA GPUs have changed significantly across generations. The V100 has 0 extra precision bits for FP16, the A100 has 1, and the H100 has at least 2. This means "NVIDIA code" doesn't even behave the same way on different NVIDIA chips.
- AMD vs. NVIDIA Philosophy: AMD GPUs (MI100/MI250X) consistently use 3 extra bits for precise rounding, making them behave more like traditional CPUs. However, the MI250X surprisingly lacks subnormal number support for FP16 and BF16, which can lead to "division by zero" errors in code that works fine elsewhere.
- The "Aha!" Moment: The researchers designed a simple matrix test that produced three different answers on five platforms. V100, A100, and MI250X produced
0; MI100 produced255.875; and the H100 produced191.875. This proves that "correctness portability" is currently a myth for matrix accelerators.
Key Results
- Subnormal Support: All tested GPUs handle subnormals except for the AMD MI250X in FP16/BF16 modes.
- Rounding Modes: While most GPUs default to "Round to Nearest, Ties to Even" (RTN-TE) for output, their internal accumulation often uses "Truncate" (rounding toward zero), especially in older NVIDIA architectures.
- FMA Unit Width: FTTN revealed that the NVIDIA H100 has a massive FMA unit width (at least 16), significantly larger than the V100 (width of 4).
- Numerical Drift: The paper quantifies that errors aren't just in the 8th decimal place; hidden hardware features can cause results to differ by six orders of magnitude when porting code.
Limitations and Future Work
- Limited H100 Access: Due to restricted access to the latest H100 hardware, the authors couldn't fully determine its maximum FMA unit width or test beyond two extra bits.
- Symmetry Assumption: The tests assume the hardware behaves symmetrically (i.e., every "lane" in the matrix unit works the same way). If a manufacturer used different logic for different parts of the matrix, these tests might miss it.
- Future Directions: The authors plan to use formal methods (like the Z3 solver) to automatically generate even more complex "discriminatory" tests and expand the suite to cover other emerging accelerators like Google TPUs.
Summary updated