← Latest papers
💻 computer science

Equivalence Checking of ML GPU Kernels

This paper introduces Volta, the first sound and complete equivalence checker for GPU kernels, which formally verifies the correctness of machine learning computations optimized by hand, compilers, or LLMs.

Original authors: Benjamin Driscoll, Kshitij Dubey, Anjiang Wei, Neeraj Kayal, Rahul Sharma, Alex Aiken

Published 2026-08-18
📖 5 min read🧠 Deep dive

Original authors: Benjamin Driscoll, Kshitij Dubey, Anjiang Wei, Neeraj Kayal, Rahul Sharma, Alex Aiken

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

In the vast, invisible machinery of modern artificial intelligence, the most critical work happens not in the cloud, but on specialized computer chips called GPUs. These chips are designed to perform millions of tiny calculations simultaneously, a necessity for training the large language models that now write code, translate languages, and generate art. To make these models run fast enough to be useful, engineers must write highly specialized instructions, known as kernels, that tell the GPU exactly how to move data and perform math. Over the last few years, companies have begun using artificial intelligence itself to write these kernels, hoping to find faster ways to do the work than human engineers can. However, this speed comes with a risk: when an AI or a compiler rewrites a piece of code to be faster, it can accidentally introduce subtle errors. These errors might cause the computer to produce the wrong answer, or worse, to crash silently in ways that are nearly impossible to find through standard testing. The core challenge is that these chips execute thousands of threads of work at the same time, and if they do not coordinate perfectly, they can step on each other's toes, creating a race condition where the final result depends on the unpredictable order in which things happen.

A team of researchers has developed a new tool called Volta to solve this problem. Instead of guessing whether a new, faster version of a kernel is correct, Volta acts as a formal verifier that mathematically proves the two versions produce identical results. The researchers built a system that takes the low-level instructions of a reference kernel—the original, trusted version—and the optimized kernel—the new, faster version—and runs them through a symbolic engine. Rather than feeding the code specific numbers and seeing what comes out, the engine treats the inputs as abstract symbols. It traces every possible path the code could take, tracking how data moves through the thousands of parallel threads and how they synchronize with one another. If the code attempts to access memory in a way that could cause a conflict, or if the threads get stuck waiting for each other forever, the tool immediately flags the error. If the code runs cleanly, the tool translates the final output of both kernels into complex mathematical expressions and checks if those expressions are fundamentally the same, regardless of the specific numbers fed into them.

The researchers tested Volta on a wide variety of real-world machine learning tasks, including matrix multiplications, convolutions, and the attention mechanisms that power large language models. They found that the tool could successfully verify kernels that had been optimized by hand, by compilers, and even by large language models. In one instance, they examined a kernel generated by an AI that had been optimized through thirteen rounds of automated improvement. Volta confirmed that this AI-generated code was mathematically equivalent to the original human-written reference, proving that the aggressive optimizations had not broken the logic. The tool also proved its value by catching errors that other methods missed. For example, it detected data races in a popular, widely cited tutorial for GPU programming that had been used by thousands of developers for years. These errors were hidden because they only appeared under very specific timing conditions that standard testing rarely catches. The tool also identified a bug in an AI-generated kernel where the code attempted to read data from a memory location that did not exist; while the current hardware happened to ignore this mistake, the researchers showed that the code was fundamentally unsafe and could fail on future machines.

The strength of this approach lies in its ability to handle the unique complexity of GPU programming, where thousands of threads must coordinate their actions. Previous tools could check single-threaded programs or high-level mathematical operations, but they struggled to decompose the massive parallelism of a GPU into manageable pieces. Volta overcomes this by assuming that the kernels it analyzes follow a specific, structured pattern common in machine learning, where the number of threads and the size of the data are known in advance. Within this framework, the tool can prove with certainty that a race condition exists if the threads are not properly synchronized, and it can prove that two different versions of a program are equivalent if they produce the same symbolic result. The researchers demonstrated that their tool could verify these properties in a matter of seconds or minutes, even for kernels containing hundreds of thousands of instructions. They also proved that the mathematical logic behind their tool is sound, meaning that if the tool says two programs are equal, they are truly equal for all possible inputs.

This work represents a significant step toward making the development of artificial intelligence safer and more reliable. As companies increasingly rely on automated systems to generate the code that powers their models, the need for a rigorous way to check that code becomes critical. The researchers showed that it is possible to move beyond simple testing, which can only check a limited number of scenarios, to a method that provides a formal guarantee of correctness. By verifying the equivalence of optimized kernels, Volta gives developers the confidence to use faster, more aggressive optimizations without fear of introducing silent bugs. The tool is currently available for use, and the researchers have made their code and the proofs behind it open to the public, allowing others to build upon this foundation. While the tool does not yet cover every possible type of GPU code, it successfully handles the vast majority of the kernels that drive modern machine learning, offering a new standard for trust in the automated generation of high-performance computing code.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →