RESOLVE: Language-Agnostic Validation of GPU Kernels Through Testing, Reduction, and Proof
Ashkan Vedadi Gargary, Guido Martínez, Sebastian Burckhardt, Gabriel Ebner, Abhinav Jangda, Madan Musuvathi, Tyler Sorensen
Abstract
AI systems can now write and optimize production GPU kernels, but validating them remains an important challenge. Evaluating the kernel on a few random inputs and checking that its outputs match a trusted reference kernel within numeric tolerances is not sufficient: races can cause nondeterministic behavior that fails to manifest in tests, and numeric tolerances can hide bugs and cause false positives even after extensive calibration. To address this challenge, we present RESOLVE, which combines testing and formal verification to build a comprehensive kernel validation pipeline. It operates in three steps: First, it tests for nondeterminism using binary instrumentation that perturbs execution timing to expose races. Second, an agent rewrites the candidate and reference kernels to obtain "reduced-concurrency" versions that are simpler to analyze but still produce bitwise-identical outputs in all tests. Third, the reduced kernels are formally analyzed in the F*/Pulse framework and prove that they perform the same computation on real numbers. This sidesteps the need for numeric tolerances. We show that RESOLVE can validate a broad selection of kernels using KernelBench, and prove equivalence across fused GEMMs in three state-of-the-art frameworks and languages: CUTLASS, Triton, and Gluon. It also analyzes mega-kernels, notoriously difficult to validate, and finds four previously unreported issues, including two clear bugs. We show that agents can use RESOLVE to repair the issues, with minimal performance impact, highlighting that agents can optimize aggressively when they can rigorously check their results.
Create a lesson
Related papers
C-to-Rust Translation Validation at the LLVM IR Level via AI-Assisted Refinement Proof
Shared title terminology · Eunsu Kim, Sukyoung Ryu, Jaemin Hong
Keel: A Verified In-Kernel Proof Checker for Proof Carrying BPF
Shared title terminology · Yalu Cai, Tung-Che Chang, Santosh Nagarakatte
LLVM Translation Validation Automated with Large Language Models and Lean
Shared title terminology · Chunhao Liao, Hongxu Xu, Xintong Zhou et al.
Tacet: A Language and Type System for Automatic Statistical Validity Accounting
Shared title terminology · Chiké Abuah
Validating Concurrent Correctness Witnesses with Ghosts by Thread-Modular Abstract Interpretation
Shared title terminology · Michael Schwarz, Zhendong Ang, Umang Mathur
Statically Typed Purely Functional Definitional Interpreters for Essentials of Programming Languages
Shared title terminology · Kwanghoon Choi