Formalizing PTX in Lean to verify GPU kernels written by agents
The Koska team describes formalizing NVIDIA's PTX instruction set in the Lean prover, aiming to formally verify GPU kernels without relying on manual reading of the code.
By Wendelmaques Pereira · Updated today
Source: Formalizando PTX em Lean para provar a correção de kernels de GPU (sf-tensor.com). Text prepared with AI from this source.

What happened and what to do
The article from the Koska team covers formalizing NVIDIA's PTX instruction set in the Lean prover. The goal is to formally verify low-level GPU kernels with machine-checked correctness. According to the author, the aim is to gain confidence in kernels written by agents without having to read them line by line, which makes this path useful for automatically generated code.
For a company already using agents to write GPU code, the practical lesson is to treat generated code as untrusted until proven otherwise. A pipeline can combine equivalence tests against a reference implementation, bounds checking and race detection in CI, and approval gates that block kernels outside defined standards. Full formal proof requires research effort, so the realistic path is to start with critical kernels and expand coverage as the formalization matures.
How the consultancy can help
Diagnosis of where agent-generated GPU kernels enter your operation and what correctness and security risks they carry. Then design and deployment of a CI verification pipeline, with equivalence tests, race detection and approval gates, operated on the client's infrastructure.
Next step
Send a short description of your case, including where GPU code is generated or reviewed and which kernels are critical. We will then prepare a scoped proposal for Wendelmaques.
Let's assess your project

I reply with scope and a proposal.