Numerical Correctness Gates: Golden Outputs, Tolerances & Determinism
How accelerator CI decides that a model computes the right thing: golden references (CPU fp64/fp32, the previous hardware generation), atol/rtol and ULP tolerances that scale with the math, bf16, fp8 and MX formats, accumulation-order nondeterminism and deterministic modes, end-to-end gates on loss curves, evals and logits, localizing drift layer by layer, and catching silent data corruption.
Overview
The job
On a new accelerator almost nothing is bit-identical to anything else. Accumulation order, fused operations, low-precision formats and per-shape kernel choices all change the last bits of every result, and that is expected. A compiler pass that drops a term, a kernel that accumulates in the wrong precision, or a chip that silently flips a bit also show up as "small differences" at first.
A numerics gate tells the two apart automatically: it tolerates the differences the formats and reduction lengths predict, and fails anything larger, as early and as locally as possible. The engineer who owns it chooses the references, derives every tolerance from the math, keeps a deterministic test mode working, and has tooling ready to localize a failure to one layer and one kernel.
Interview questions
- Design the numerical correctness gate for every compiler release on a new accelerator.
- A bf16 matmul with K = 8192 fails assert_close with default bf16 tolerances on a few elements. Is it a bug?
- Logits on the new hardware generation disagree with the previous generation on 1.5 percent of top-1 tokens. How do you find out why?
- Training runs on the accelerator are not bitwise reproducible. When do you need determinism, what does it cost, and how do you get it?
- The program wants to move training from bf16 to fp8 (or MXFP8). What numerical gates do you add?
- How would you detect silent data corruption in a large accelerator training fleet?
Sign up free to read the full topic
More AI Infrastructure topics
- GPUs on Kubernetes: GPU Operator, Device Plugin, MIG & Time-slicing
- LLM Inference: KV Cache, Batching & Scheduling
- Manufacturing Test Data & Yield Pipelines
- Mixture of Experts (MoE) Inference
- Model CI on Custom AI Accelerators: Strategy, Test Matrices & Release Qualification
- Multi-tenant GPU Clusters & Confidential Computing
- Performance Baselines, Regression Detection & Auto-bisect for Accelerators
- Post-silicon Validation & Bring-up Labs
- Power & Cooling for GPU Racks
- Pre-silicon Software Shift-left: Virtual Platforms to First-silicon Readiness
- PyTorch torch.compile, FSDP2 & Training Optimization
- Quantization & Model Compression
Start free on Cariara · Coding problems · System design studio