arXiv:2610.05683cs.PLOct 2026

Manuscript Offprint

arXiv:2610.05683

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

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Ashkan Vedadi Gargary

University of California, Riverside

Riverside, California, USA

Gabriel Ebner

Microsoft Research

Redmond, Washington, USA

Guido Martínez

Math, Inc.

New York City, New York, USA

Abhinav Jangda

Microsoft Research

Redmond, Washington, USA

Sebastian Burckhardt

Microsoft Research

Redmond, Washington, USA

Madan Musuvathi

Microsoft Research

Redmond, Washington, USA

Tyler Sorensen

Microsoft Research

Redmond, Washington, USA

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 non-deterministic 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.

1 Introduction

GPU kernels determine much of the performance of modern AI workloads. Recent systems have shown that AI agents can generate and optimize these kernels [24, 35, 50], producing candidates far faster than humans can review them for correctness. Kernel generation is therefore creating a new validation bottleneck: an optimization that cannot be trusted cannot safely be deployed, regardless of its speed.

The predominant method for validating GPU kernels is reference-based testing [24, 35]: execute a candidate and a trusted reference on representative inputs and compare their outputs. This approach is often effective for machine-learning kernels, whose behavior is determined largely by tensor shapes, data types, layouts, and other discrete configurations that can be sampled systematically. Nevertheless, two challenges remain even with broad input coverage.

First, concurrency bugs may manifest only under rare thread or warp schedules and therefore remain hidden across repeated executions. Second, valid optimizations may reorder floating-point operations and produce outputs that are not bitwise identical to the reference. Testing must consequently compare outputs using a numerical tolerance, but a permissive tolerance can conceal bugs while a restrictive one can reject valid optimizations.

Formal verification can instead establish equivalence for all inputs covered by a specification [7, 28]. Its applicability, however, is limited by the verifier's semantic coverage. Modern kernels rely on warp intrinsics, asynchronous memory operations, tensor-core instructions, and synchronization patterns that existing verification frameworks do not fully model. Because GPU programming models and hardware features evolve faster than their formalizations, directly verifying optimized production kernels remains impractical.

This paper presents RESOLVE, a GPU-kernel validation framework that bridges the gap between the broad applicability of testing and the rigorous guarantees of formal verification. RESOLVE's central idea is to separate concurrency correctness from functional correctness, and to use a different validation technique for each. This decomposition exploits a key property of machine-learning kernels: they are generally intended to be deterministic, producing the same output for a given input regardless of thread schedule. This allows RESOLVE to focus on capturing a broad set of concurrency issues as schedule-dependent nondeterminism, while deferring functional equivalence to a formal proof.

Given a candidate kernel C and a trusted reference kernel R, RESOLVE asks agents to generate reduced-concurrency kernels CrC_r and RrR_r. These reductions remove asynchronous pipelines, synchronization, and other concurrency constructs that impede formal reasoning, while seeking to preserve the bitwise behavior of their respective originals. Thus, C and R may use complex concurrency patterns and recent hardware features, while CrC_r and RrR_r are designed to fall within the semantic coverage of the verifier.

RESOLVE validates concurrency correctness using systematic concurrency testing [5, 43]. Using the NVBit binary-instrumentation framework [47], RESOLVE perturbs the timing of scheduling-relevant operations to explore different schedules. A lightweight memory analysis focuses these perturbations on GPU scopes and memory regions in which conflicting accesses may occur. As this analysis operates on the compiled NVIDIA GPU binary, it is independent of the source language or framework used to generate the kernel, including CUDA, Triton [44], Gluon [45], and CUTLASS [32].

RESOLVE then compares executions bit-for-bit. For a fixed input, repeated executions of each kernel must produce identical results, and each reduced kernel must produce the same result as its original. These comparisons distinguish two failure modes. If repeated executions of the same kernel differ, RESOLVE reports schedule-dependent behavior. If an original and its reduced kernel are individually deterministic but differ from one another, RESOLVE rejects the reduction and asks the agent to try again. At these boundaries, bitwise comparison provides an exact per-execution oracle and requires no numerical tolerance.

To verify functional correctness, agents translate CrC_r and RrR_r into Kuiper [28] kernels CkC_k and RkR_k, respectively. Kuiper is a verification language built on the F∗/F^*/Pulse concurrent separation logic [12] that covers a subset of CUDA and compiles to it. RESOLVE checks the correspondence between each Kuiper translation and its reduced executable using bitwise testing. Agents then construct an algebraic specification from the trusted reference alone and prove in Kuiper that both CkC_k and RkR_k satisfy it. Because the specification is derived without consulting the candidate, the candidate cannot influence the criterion against which it is judged. A successful proof establishes that CkC_k and RkR_k implement the same algebraic computation, even when valid floating-point reorderings cause them to produce numerically different results.

RESOLVE therefore uses testing where bitwise equality provides an exact per-execution oracle and formal verification where numerical testing requires an approximate one. Testing connects optimized binaries to proof-friendly representations, extending formal reasoning to kernels that use languages and hardware features outside the verifier's semantic coverage. Agents construct the reductions, translations, specifications, and proofs, but do not serve as correctness oracles: their outputs must pass bitwise testing or formal proof checking.

We evaluate RESOLVE on KernelBench kernels, complex state-of-the-art fused GEMM kernels written using Triton, Gluon, and CUTLASS, and three mega-kernels. Although every KernelBench candidate had passed the benchmark's existing tolerance-based tests, RESOLVE identified two incorrect candidates. We also design a mutation testing strategy to evaluate how effectively our concurrency testing finds synchronization faults. The fused GEMMs in particular use concurrency and hardware features outside Kuiper's directly supported subset, and RESOLVE validated them regardless, demonstrating that reduction can extend formal reasoning to kernels that cannot be verified directly. Across the megakernels, RESOLVE found four previously unreported issues, including two clear bugs. Agents repaired them, and RESOLVE tested the repairs, which changed performance by less than 2% on three of the four.

Contributions. In summary, we present RESOLVE, a workflow to validate GPU kernels. It consists of:

  1. Efficient binary-level determinism testing ( §3§3): timing perturbation on SASS, needing no source or compiler and covering any language or library.

  2. Bitwise concurrency reduction ( §4§4): an agent rewrites both programs with as little concurrency as possible, accepted only when the output is bitwise equivalent.

  3. Automated equivalence proof ( §5§5): agents write a specification from the trusted reference alone and a program for each side satisfying it, so an optimization can differ bitwise and still be accepted.

  4. Evaluation ( §6.2§6.2): sampled KernelBench kernels, state-of-the-art fused GEMMs in Triton, Gluon, and CUT-LASS, and three mega-kernels, in which we find four unreported issues.

Given those reports, agents repaired the bugs, four with verified deterministic fixes, showing that better testing tools can make agentic kernel optimization more ambitious.

References (31)