NVIDIA automates GPU attention kernel generation with DeepSeek-R1 and inference-time scaling
Creating optimized GPU attention kernels requires significant skill and time even for experienced engineers, and LLMs face challenges generating correct optimized kernel code on the first try due to hallucinations, syntax errors, and non-trivial GPU thread mapping.
LLMs used directly for kernel generation produce hallucinated code, mix syntax from different languages or frameworks, and require iterative refinement to achieve correct and efficient thread mapping.
The closed-loop workflow produced numerically correct kernels for 100% of Level-1 problems and 96% of Level-2 problems, with results in some cases better than kernels developed by skilled engineers.
Frequently asked questions
What did this team achieve with this AI workflow?
The closed-loop workflow produced numerically correct kernels for 100% of Level-1 problems and 96% of Level-2 problems, with results in some cases better than kernels developed by skilled engineers.
What tools did this team use?
DeepSeek-R1, H100, KernelBench.
What results were reported?
Level-1 problem correctness rate: 100%; Level-2 problem correctness rate: 96%; Inference-time budget per problem: 15 minutes; Kernel quality vs skilled engineers: better than the optimized kernels developed by skilled engineers in some cases (source-reported, not independently verified).
What failed first in this deployment?
LLMs used directly for kernel generation produce hallucinated code, mix syntax from different languages or frameworks, and require iterative refinement to achieve correct and efficient thread mapping.
How is this quality assurance AI workflow structured?
Manual prompt initializes workflow → DeepSeek-R1 generates GPU kernel → Verifier analyzes kernel on H100 → Closed-loop feedback to model → Numerically correct kernel output.