Event ·Official first-hand

TensorLean:首个对生产级 GPU kernel 做形式化验证的框架

TensorLean 是首个针对生产级 GPU kernel 的形式化验证框架,在 Lean 4 中机械化定义了 PTX 语义与可靠性证明。它对 kernel 编译后的 PTX 构建符号化 happens-before 图,将并发执行归约为有限顺序执行,先证明无数据竞争和终止性,再用 push/pull 模型结合 SMT solver 对照实数域上的张量级规约证明功能正确性,并通过归纳式舍入误差界推断把保证扩展到浮点 PTX。 评估覆盖 FlashAttention-2、-3、-4、DeepSeek DeepGEMM 和 LinkedIn Liger Kernel 共 143 个 kernel 的 2,078 个实例:1,180 个实例被证明正确,其余实例中发现 66 个此前未知的正确性 bug(涉及 888 个实例),全部已报告给开发者。规约可在 kernel 的数千个实例间共享,并支持自动推断 tile 循环不变量,大幅降低人工验证成本。

Current read

GPU kernel 出个 bug 训练就可能悄悄出错,这个框架用 Lean 4 加 SMT 把 FlashAttention、DeepGEMM、Liger Kernel 全验了一遍,真找出 66 个没人知道的 bug。做底层算子优化或维护训练框架的工程师建议认真读。

2 sources71° AI heatLast updated 2026/12/3 13:13:12

Evidence

2 sources
Primary sourcearXiv: DeepSeek
View source
Related source 1Together AI
View source

Conflict check

Dedup data only shows that these sources discuss the same event, not that they agree. There is no structured supporting or refuting evidence yet, so no conflict is inferred automatically.