On Nov. 20, researchers at Columbia University and CertiK released TensorLean. The project page says it verifies production GPU kernels on compiled PTX: for every input and every thread schedule, the output stays within the floating-point tolerance of a tensor-level spec. Of 149 open-source kernel instances, 83 were proved correct and the other 66 contain defects. Those instances correspond to 38 bugs that testing had missed. Twenty-three of them are in FlashAttention-2 through FlashAttention-4, and they were reported to the developers.
The proof is on compiled PTX
A GPU kernel is written in CUDA or CuTe, compiled to PTX, then assembled into code the hardware runs. The compiler reorders instructions and merges work. TensorLean does not treat the source as the program that ran. It checks whether the compiled PTX meets a tensor-level spec. Wei Qiang and Ganxiang Yang are co-first authors, with Yi Rong, Xupeng Li, and Ronghui Gu.
Of the 149 instances, 102 come from all 37 source kernels in FlashAttention-2 through 4. The other 47 come from DeepSeek's DeepGEMM and from Liger Kernel. The bug chart also lists Triton, TileLang, and TileOPs. One bug can show up in several compiled instances, so 66 failing instances are not 66 distinct bugs. Of the 38 bugs, 19 are memory-access errors and 13 are numerical. The Chinese article says two are in DeepGEMM. The project page confirms the total of 38 and the 23 in FlashAttention.
Seventy-two open-source kernels add up to 151,285 lines of source and 10,278 lines of specification, about 15 to 1. The spec separates what the kernel should compute from how tensors sit in memory, so the math can be reused. The team wrote 298 assertions for FlashAttention-2 through 4 and DeepGEMM. The project page says the median time to verify one instance is about 10 minutes on a 16-core workstation.
A test that never hits a schedule is not a proof
Concurrency is not handled by running every interleaving. TensorLean uses a happens-before graph to prove two properties: two threads do not read and write the same memory without a synchronizing order, and every thread can finish, so there is no deadlock. A data race on reduction_buffer in FlashAttention-4 never appeared in 17,760 runs of the related tests. The project page also says 19 of the 23 FlashAttention bugs appear only for particular tensor shapes and feature combinations. Existing tests unroll loops for concrete configurations and miss those combinations.
The loop count is known only at launch. TensorLean treats the configuration as symbolic parameters and uses a loop invariant to cover lengths at once, instead of proving each batch size separately. For floating point, it compares the same instruction sequence under exact real arithmetic, then bounds the rounding error.
The proof has a stated trusted base. The project page says it trusts NVIDIA's PTX ISA and ptxas, a PTX parser of about 1,800 lines, each kernel's specification, the model of how tensor cores round, and the results of Lean, cvc5, and Z3. It cannot yet describe random sampling such as dropout and top-p. It also does not yet model the order established by acquire and release atomics, so it does not cover multi-GPU communication kernels that synchronize through atomic flags, including NCCL and DeepEP.
This is not a stamp on the whole model
The project page cites two public failures to show that a kernel bug can stay silent: ChatGPT producing nonsense in February 2024, and a miscompilation that disrupted Claude's token selection in 2025. Anthropic's postmortem describes a runtime optimization that affected some TPU servers, seen on Aug. 25 and rolled back on Sep. 2. TensorLean does not claim to have verified that TPU incident. What it proves is the output and the tolerance for these PTX instances under the specs that were written. The Chinese article says every bug found has been fixed. The project page says they were reported to the developers. More kernel and model coverage is in AI News.
FAQ
Q: How many of the 149 instances were proved correct? A: 83. The other 66 contain defects, corresponding to 38 distinct bugs. FlashAttention-2 through 4 account for 23 of them.
Q: Why did 17,760 test runs miss the race? A: The project page says this FlashAttention-4 data race never appeared in those 17,760 runs. Nineteen of the 23 FlashAttention bugs show up only for particular shapes and feature combinations.
Q: Does this prove DeepSeek or FlashAttention as a whole? A: No. The proof covers the PTX instances that have a spec, and it trusts the parser, the PTX semantics, and the solvers. Dropout, top-p, NCCL, and DeepEP are outside the current scope.