ProofWright: Towards Agentic Formal Verification of CUDA

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Chatterjee, Bodhisatwa, Zagieboylo, Drew, Damani, Sana, Hari, Siva, Kozyrakis, Christos
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910056869527552
author Chatterjee, Bodhisatwa
Zagieboylo, Drew
Damani, Sana
Hari, Siva
Kozyrakis, Christos
author_facet Chatterjee, Bodhisatwa
Zagieboylo, Drew
Damani, Sana
Hari, Siva
Kozyrakis, Christos
contents Large Language Models (LLMs) are increasingly used to automatically generate optimized CUDA kernels, substantially improving developer productivity. However, despite rapid generation, these kernels often contain subtle correctness bugs and lack formal safety guarantees. Runtime testing is inherently unreliable - limited input coverage and reward hacking can mask incorrect behavior - while manual formal verification is reliable but cannot scale to match LLM output rates, creating a critical validation bottleneck. We present ProofWright, an agentic verification framework that bridges this gap by integrating automated formal verification with LLM-based code generation. ProofWright provides end-to-end guarantees of memory safety, thread safety, and semantic correctness for LLM-generated CUDA kernels. On KernelBench L1, ProofWright verifies safety properties for 74% of generated kernels, uncovers subtle correctness errors missed by conventional testing, and establishes semantic equivalence for a class of element-wise kernels. With a modest overhead of 3 minutes per kernel, ProofWright demonstrates that scalable, automated formal verification of LLM-generated GPU code is feasible - offering a path toward trustworthy high-performance code generation without sacrificing developer productivity.
format Preprint
id arxiv_https___arxiv_org_abs_2511_12294
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle ProofWright: Towards Agentic Formal Verification of CUDA
Chatterjee, Bodhisatwa
Zagieboylo, Drew
Damani, Sana
Hari, Siva
Kozyrakis, Christos
Software Engineering
Large Language Models (LLMs) are increasingly used to automatically generate optimized CUDA kernels, substantially improving developer productivity. However, despite rapid generation, these kernels often contain subtle correctness bugs and lack formal safety guarantees. Runtime testing is inherently unreliable - limited input coverage and reward hacking can mask incorrect behavior - while manual formal verification is reliable but cannot scale to match LLM output rates, creating a critical validation bottleneck. We present ProofWright, an agentic verification framework that bridges this gap by integrating automated formal verification with LLM-based code generation. ProofWright provides end-to-end guarantees of memory safety, thread safety, and semantic correctness for LLM-generated CUDA kernels. On KernelBench L1, ProofWright verifies safety properties for 74% of generated kernels, uncovers subtle correctness errors missed by conventional testing, and establishes semantic equivalence for a class of element-wise kernels. With a modest overhead of 3 minutes per kernel, ProofWright demonstrates that scalable, automated formal verification of LLM-generated GPU code is feasible - offering a path toward trustworthy high-performance code generation without sacrificing developer productivity.
title ProofWright: Towards Agentic Formal Verification of CUDA
topic Software Engineering
url https://arxiv.org/abs/2511.12294