arXiv:2610.38983cs.MSOct 2026

Manuscript Offprint

arXiv:2610.38983

Beyond atol and rtol: Sound Test Oracles for Low-Precision GPU Kernels

Xinyi Shi

XINYI SHI, Duke University, USA

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 numeracle, 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, numeracle 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 numeracle's 50. Historical replays expose accuracy faults in eight change pairs without rejecting their matched corrected controls; a ninth change concerns rounding parity.

CCS Concepts: • Software and its engineering → Software testing and debugging; • Mathematics of computing → Mathematical software.

Additional Key Words and Phrases: test oracles, floating-point arithmetic, rounding-error analysis, GPU kernels, low precision, mutation testing

1 Introduction

Hand-written GPU kernels implement normalization, activation, attention and loss operations in libraries such as Liger-Kernel [Hsu et al. 2024], vLLM [Kwon et al. 2023] and Unsloth. Written in Triton [Tillet et al. 2019] or CUDA, they combine low-precision storage with higher-precision intermediates and approximate math intrinsics.

Reduction order and rounding positions change a correct kernel's output. Tests therefore accept differences up to atol + rtol|ref|, usually against a PyTorch reference [Barr et al. 2015]. These hand-picked tolerances can both hide faults and reject correct outputs. A vLLM Mamba2 test used atol = rtol = 0.5 before its memory-offset and test-coverage fix [vLLM contributors 2025b]; Liger's bf16 SwiGLU MLP test uses atol = 10⁴ [Liger-Kernel contributors 2026b]. Conversely, PyTorch's defaults flag 24% of correct Liger runs in our study, often because the low-precision reference is less accurate than the kernel (Section 2.3).

Allowable error depends on computation and input: a sum's error scales with term magnitudes despite cancellation, and normalization can amplify errors when row statistics are small. Both depend on the precision plan: intermediate rounding positions, formats and block scales. A tolerance covering the hardest inputs can sacrifice sensitivity elsewhere. Tuned baselines expose this trade-off across input families, shapes and row statistics (Section 7.4).

A reference program and precision plan specify an implementation class, fixing numerical obligations but leaving reduction order open. The analysis derives its input-specific acceptance region. Under an explicit zero-mean error model, probabilistic rounding analysis tightens linear-algebra bounds from worst-case nu to √n u scaling [Higham and Mary 2019]. A whole-program oracle must compose bounds through tensor operations, track rounding events shared by broadcasting

Author's Contact Information: Xinyi Shi, Duke University, Durham, North Carolina, USA.

Xinyi Shi

and reuse, model quantizers and non-RN hardware accumulators [Fasi et al. 2021], and account for the final output grid.

We present numoracle, an executable analysis of precision-annotated tensor references. Shadow tensors propagate float64 reference values, separating deterministically bounded residuals from modeled random errors; axis keys and event provenance preserve shared-error dependence across tensor operations. Per-element error-bound and rounding-interval checks judge kernel outputs. The latter can reject incorrect stores admitted by the symmetric bound, adding detections on individual inputs but no additional killed mutant in the main campaign. The per-call false-alarm claim assumes the rounding, hardware, domain and implementation contracts in Section 3.3; probability is over model executions, not repeated deterministic GPU runs. Fixed-input mode removes the zero-mean assumption but retains the other numerical contracts.

We evaluate 13 Triton operators in bf16, fp16 and fp32 on an RTX PRO 6000 Blackwell and an A100. Correct-kernel and variant campaigns had no false alarms; under input shift, finite-range checks identify uncertifiable inputs (Section 7.2). Reruns confirmed LayerNorm and SSD checks with the final implementation. On the RTX PRO 6000, numoracle killed 116/124 effective mutants, versus 59–83 for fixed oracles. Historical-bug replays test whether fixes eliminate rejection; CPU emulations and targeted witnesses separately evaluate deeper compositions and dependence rules (Section 7). Our contributions are:

  • Problem. We specify kernel correctness by a class of implementations and derive input-specific acceptance regions, exhibiting inputs on which fixed tolerances lose sensitivity or raise false alarms (Sections 3 and 7.4).

  • Calculus. We give a dependence-aware probabilistic error calculus for whole low-precision tensor programs, with shared random components, provenance-ordered products, block-scaled quantizers and calibrated math-library profiles, and prove it sound under a stated rounding model (Sections 4 and 5).

  • Checks and limits. We introduce a rounding-interval check that detects sub-ulp faults, and state a single-run indistinguishability limit for oracles that accept every legal output (Section 5.3).

  • Tool and study. We implement numoracle and evaluate it on 13 Triton operators from three libraries on two GPUs, against 400 tuned tolerance configurations and with nine historical bugs (Sections 6 and 7). The library, references, mutants and raw data are in the artifact.

Prior work gives probabilistic GPU matrix-product checksum thresholds [Braun et al. 2014; Gao et al. 2026], calibrates tolerances from correct runs [Sarkar 2026b] and measures benchmark-checker blind spots [Du et al. 2026]. Our contribution composes acceptance regions, shared-error tracking and a call-level probability budget through tensor references (Section 9). Through broadcasting, products and nonlinear operations, our rules preserve the probability bound's conditions: shared events remain correlated, event order justifies tighter products, and residuals are conservatively bounded. This composition gives a call-level guarantee and converts pre-store bounds into output-grid intervals.