Formalizing PTX in Lean to Prove GPU Kernel Correctness
Abstract
We present an approach to mathematically formalizing PTX, an approach that allows modeling and reasoning about patterns common in GPU kernels for Deep Learning, including acquire-release, tensor cores, proxies, async operations, multi-kernel pipelines and data-dependent control flow. We implement it in Lean and use it to prove the correctness of simple implementations of a WGMMA GEMM kernel, FlashAttention, and a 3-kernel MoE pipeline.
Create a lesson
Related papers
LeanContext: Disentangling Mathematical Resources from Local Formal Context in Lean Whole-Proof Generation
Shared title terminology · Hang Zhang, Qihao Ye, Litong Liu et al.
Improving semantic equivalence in research-level math formalization
Shared title terminology · Ayush Khaitan, Liam Fowl, Tomàs Ortega et al.
DictLLM: Post-training Compression of Large Language Model with Dictionary Kernels
Shared title terminology · Jinho Park, Se Young Chun, Mingoo Seok
Secure Formal Raising: Protecting the Development of AI through Executable Properties
Shared title terminology · Rolf Drechsler, Christina Plump
When Verification Is Not Agreement: Cross-Agent LLM-to-Dafny Formalization
Shared title terminology · Priyanath Maji
Autonomous AI Agents Systematically Diverge From Human Preferences in Proof Formalization
Shared title terminology · Bálint Gyevnár, Simon DeDeo