Racer: Hunting GPU Kernel Bugs with Symbolic Equivalence Checking
Tuan Truong Vu, Cheng Tan
Key points
From the paper's conclusion- We implement Racer, a PTX-level symbolic equivalence checking engine, with three techniques that make this approach practical for production kernels: (1) Shape Reduction to control checking cost, (2) a lockstep CTA scheduler to handle concurrency, and (3) idiom templates with exact numeric refutation for otherwise inconclusive results.
Abstract
GPU kernels are critical to the performance of today's AI services, yet the same operators are rewritten repeatedly: for each GPU generation, numeric format, serving regime, and kernel language. Every rewrite must preserve the function computed by the implementation it replaces. Today, this obligation depends almost entirely on differential testing: run the new kernel and a trusted reference on randomly sampled tensors, then compare their outputs within a tolerance. This approach has blind spots that additional test cases cannot eliminate. For example, a logical bug may produce an error smaller than the tolerance required to accommodate a correct optimized kernel. We propose symbolic equivalence checking, which executes a kernel and its reference on symbolic inputs, turning each output cell into an exact algebraic expression, and then checks whether the paired expressions agree for all inputs. Because these expressions are exact, symbolic equivalence checking distinguishes floating-point error from logical bugs, while a single check covers the entire input space. We implement Racer, a PTX-level symbolic equivalence checking engine, with three techniques that make this approach practical for production kernels: (1) Shape Reduction to control checking cost, (2) a lockstep CTA scheduler to handle concurrency, and (3) idiom templates with exact numeric refutation for otherwise inconclusive results. Across 2,408 production kernels from 41 collection targets, Racer found 82 real bugs in 23 libraries, including 76 previously unknown bugs and 41 confirmed so far.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Equivalence Checking of ML GPU KernelsProceedings of the ACM on Programming Languages · 2026
- KernelArmor: End-to-End Agentic System for Establishing Memory and Thread Safety for CUDAarXiv · 2026
- LARK: Lean-Assisted Reasoning for LLM-Generated GPU KernelsarXiv · 2026
- The Output-Space Hypothesis: Enumerative Equivalence Checking for Tensor ProgramsarXiv · 2026
- AsmEvo: Agentic Assembly-Level Optimization of AMD GPU Kernels with Functional Equivalence VerificationarXiv · 2026
- KernelAudit: Contract-Aware Auditing of Validators for LLM-Generated GPU KernelsarXiv · 2026