Beyond atol and rtol: Sound Test Oracles for Low-Precision GPU Kernels
Xinyi Shi
Abstract
Low-precision GPU kernels are commonly tested against a reference using hand-picked absolute and relative tolerances. Legitimate numerical error varies with the input, format and precision plan, so a fixed tolerance trades false alarms for missed faults. We present numoracle, which derives per-element acceptance regions from precision-annotated reference programs. Its calculus tracks shared rounding errors, provenance-ordered products, block-scaled quantizers and calibrated math-library errors. A rounding-interval check detects faulty stores that symmetric bounds can admit. Soundness is conditional on explicit rounding, hardware, domain and implementation assumptions; a fixed-input mode removes the zero-mean rounding assumption. We evaluate 13 Triton operators from Liger-Kernel, Unsloth and vLLM on two GPU generations. The main campaigns produce no false alarm on 33,960 correct-kernel and behavior-preserving-variant runs per GPU. Under input shift, the GPU campaigns record no false alarm while tuned tolerances flag up to 30% of correct runs; final-version reference checks identify inputs without complete finite-range certificates. On the RTX PRO 6000, numoracle kills 116 of 124 effective mutants, versus 59-83 for four fixed baselines. Among 400 tuned tolerance configurations, requiring at most 1% false alarms in every evaluated Liger input group permits at most 31 of 53 main-mutant kills, versus numoracle's 50. Historical replays expose accuracy faults in eight change pairs without rejecting their matched corrected controls; a ninth change concerns rounding parity.
Create a lesson
Related papers
Extensible Programmatic Specification of Finite Element Methods
Theadora Fields Collin, Oded Stein, Gilbert Bernstein et al.
The Rise of Low Precision Floating Point
Guy Lemieux, Michael L. Overton
survivalGPU: Scalable Survival Analysis for R and Python
Antoine Poirot-Bourdain, Alexis Van Straaten, Emmanuel Bacry et al.
diff-soup: GPU-native Differentiable Simulation and Inference for Large-scale Stiff Dynamical Systems
Samuel Degnan-Morgenstern, Martin Z. Bazant
py-ARGOS: A Python package for automatic, statistically principled discovery of ordinary differential equations from data
Yuzheng Zhang, Rui Carvalho
Native Rectangular Linear Assignment with Implicit Rejection: A Jonker-Volgenant Solver without Square Expansion
Ratha Siv