Dr. Kernel: Reinforcement Learning Done Right for Triton Kernel Generations
Not on the map. Why?
Abstract (arXiv)
High-quality kernel is critical for scalable AI systems, and enabling LLMs to generate such code would advance AI development. However, training LLMs for this task requires sufficient data, a robust environment, and the process is often vulnerable to reward hacking and lazy optimization. In these cases, models may hack training rewards and prioritize trivial correctness over meaningful speedup. In this paper, we systematically study reinforcement learning (RL) for kernel generation. We first design KernelGYM, a robust distributed GPU environment that supports reward hacking check, data collection from multi-turn interactions and long-term RL training. Building on KernelGYM, we investigate effective multi-turn RL methods and identify a biased policy gradient issue caused by self-inclusion in GRPO. To solve this, we propose Turn-level Reinforce-Leave-One-Out (TRLOO) to provide unbiased advantage estimation for multi-turn RL. To alleviate lazy optimization, we incorporate mismatch correction for training stability and introduce Profiling-based Rewards (PR) and Profiling-based Rejection Sampling (PRS) to overcome the issue. The trained model, Dr Kernel-14B, reaches performance competitive with Claude-4.5-Sonnet in Kernelbench. Finally, we study sequential test-time scaling for Dr Kernel-14B. On the KernelBench Level-2 subset, 31.6% of the generated kernels achieve at least a 1.2x speedup over the Torch reference, surpassing Claude-4.5-Sonnet (26.7%) and GPT-5 (28.6%). When selecting the best candidate across all turns, this 1.2x speedup rate further increases to 47.8%. All resources, including environment, training code, models, and dataset, are included in https://www.github.com/hkust-nlp/KernelGYM.
Key facts. Cited by 21 papers in the map (data through 7 Oct 2026). Builds on 9 of its 17 references that are in the map. First posted on arXiv 5 Feb 2026.
Builds on
9 of 17 references.
References · 9
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,551
- 2025Search-R1: Training LLMs to Reason and Leverage Search Engines with Reinforcement Learningcited by 1,371
- 2025BrowseComp: A Simple Yet Challenging Benchmark for Browsing Agentscited by 616
- 2025FlashInfer: Efficient and Customizable Attention Engine for LLM Inference Servingcited by 248
- 2025KernelBench: Can LLMs Write Efficient GPU Kernels?cited by 206
- 2025Kevin: Multi-Turn RL for Generating CUDA Kernelscited by 73
- 2025TileLang: A Composable Tiled Programming Model for AI Systemscited by 42
- 2025AutoTriton: Automatic Triton Programming with Reinforcement Learning in LLMscited by 38
- 2025TritonRL: Training LLMs to Think and Code Triton Without Cheatingcited by 24
Built on by
Citing papers per year: 2026: 21.
21 papers.
Sort:
By area:
- 2026KernelBench-Verified: Do LLM-Generated Kernels Actually Beat PyTorch?cited by 6
- 2026Kernel-Smith: A Unified Recipe for Evolutionary Kernel Optimizationcited by 5
- 2026AdaExplore: Failure-Driven Adaptation and Diversity-Preserving Search for Efficient Kernel Generationcited by 3
- 2026FastKernels: Benchmarking GPU Kernel Generation in Productioncited by 2
- 2026Scaling Participation in Modular AI Systemscited by 2
- 2026daVinci-kernel: Co-Evolving Skill Selection, Summarization, and Utilization via RL for GPU Kernel Optimizationcited by 2
- 2026Surprisal-Guided Selection: Compute-Optimal Test-Time Strategies for Execution-Grounded Code Generationcited by 1
- 2026CUDAHercules: Benchmarking Hardware-Aware Expert-level CUDA Optimization for LLMscited by 1
- 2026From Tokens to Regions: CUDA-Sensitive Instruction Tuning for GPU Kernel Generationcited by 1
- 2026CANN Bench: Benchmarking Agent Generated Kernels against Real NPU and Algorithmic Limitscited by 1
- 2026RealisticTritonBench: A Benchmark for Triton-Kernel Generation in Real-World AI Frameworkscited by 1
- 2026CUDABeaver: Benchmarking LLM-Based Automated CUDA Debuggingcited by 0
9 more
- 2026KernelGenBench: Can LLMs and Agents Write Efficient Kernels Across Operator Sources and Hardware Platforms?cited by 0
- 2026LEAP: Lean Environment-Feedback via Adaptive Pruning for Code RL in GPU Kernel Generationcited by 0
- 2026A Contract-Grade Verifier for LLM-Generated GPU Kernels, and a Native Blackwell Backward for the Gated-Linear-Recurrence Familycited by 0
- 2026Agentic Kernel Optimization: Generating State-of-the-Art GPU Kernels Without Hand-Written CUDAcited by 0
- 2026PTXBench: Benchmarking and Adapting LLMs for GPU Kernel Optimization with Architecture-specific PTXcited by 0
- 2026AsmEvo: Agentic Assembly-Level Optimization of AMD GPU Kernels with Functional Equivalence Verificationcited by 0
- 2026FlashVector: Agent for Hierarchical Model Serving Stack Optimizationcited by 0
- 2026From Experience to Expertise: Adoption-Aware Memory Learning for Data-Scarce NPU Kernel Synthesiscited by 0
- 2026AI as a Compiler: Compiling Triton kernels without the Triton compilercited by 0
- 2026AI as a Compiler: Compiling Triton kernels without the Triton compiler29 Sep 2026
- 2026From Experience to Expertise: Adoption-Aware Memory Learning for Data-Scarce NPU Kernel Synthesis28 Sep 2026
- 2026FlashVector: Agent for Hierarchical Model Serving Stack Optimization15 Sep 2026
- 2026AsmEvo: Agentic Assembly-Level Optimization of AMD GPU Kernels with Functional Equivalence Verification21 Aug 2026
- 2026PTXBench: Benchmarking and Adapting LLMs for GPU Kernel Optimization with Architecture-specific PTX18 Aug 2026
- 2026A Contract-Grade Verifier for LLM-Generated GPU Kernels, and a Native Blackwell Backward for the Gated-Linear-Recurrence Family13 Aug 2026
- 2026RealisticTritonBench: A Benchmark for Triton-Kernel Generation in Real-World AI Frameworks12 Aug 2026
- 2026LEAP: Lean Environment-Feedback via Adaptive Pruning for Code RL in GPU Kernel Generation3 Aug 2026
- 2026KernelGenBench: Can LLMs and Agents Write Efficient Kernels Across Operator Sources and Hardware Platforms?22 Jul 2026
- 2026CANN Bench: Benchmarking Agent Generated Kernels against Real NPU and Algorithmic Limits8 Jul 2026
- 2026KernelBench-Verified: Do LLM-Generated Kernels Actually Beat PyTorch?26 Jun 2026
- 2026daVinci-kernel: Co-Evolving Skill Selection, Summarization, and Utilization via RL for GPU Kernel Optimization15 Jun 2026
9 more
- 2026From Tokens to Regions: CUDA-Sensitive Instruction Tuning for GPU Kernel Generation15 Jun 2026
- 2026Scaling Participation in Modular AI Systems5 Jun 2026
- 2026Agentic Kernel Optimization: Generating State-of-the-Art GPU Kernels Without Hand-Written CUDA25 May 2026
- 2026FastKernels: Benchmarking GPU Kernel Generation in Production22 May 2026
- 2026CUDAHercules: Benchmarking Hardware-Aware Expert-level CUDA Optimization for LLMs8 May 2026
- 2026CUDABeaver: Benchmarking LLM-Based Automated CUDA Debugging8 May 2026
- 2026AdaExplore: Failure-Driven Adaptation and Diversity-Preserving Search for Efficient Kernel Generation17 Apr 2026
- 2026Kernel-Smith: A Unified Recipe for Evolutionary Kernel Optimization30 Mar 2026
- 2026Surprisal-Guided Selection: Compute-Optimal Test-Time Strategies for Execution-Grounded Code Generation7 Feb 2026
- 2026FastKernels: Benchmarking GPU Kernel Generation in Productioncited by 2
- 2026KernelGenBench: Can LLMs and Agents Write Efficient Kernels Across Operator Sources and Hardware Platforms?cited by 0
- 2026Agentic Kernel Optimization: Generating State-of-the-Art GPU Kernels Without Hand-Written CUDAcited by 0
- 2026KernelGenBench: Can LLMs and Agents Write Efficient Kernels Across Operator Sources and Hardware Platforms?22 Jul 2026
- 2026Agentic Kernel Optimization: Generating State-of-the-Art GPU Kernels Without Hand-Written CUDA25 May 2026
- 2026FastKernels: Benchmarking GPU Kernel Generation in Production22 May 2026
- 2026KernelBench-Verified: Do LLM-Generated Kernels Actually Beat PyTorch?cited by 6
- 2026Kernel-Smith: A Unified Recipe for Evolutionary Kernel Optimizationcited by 5
- 2026AdaExplore: Failure-Driven Adaptation and Diversity-Preserving Search for Efficient Kernel Generationcited by 3
- 2026Scaling Participation in Modular AI Systemscited by 2
- 2026daVinci-kernel: Co-Evolving Skill Selection, Summarization, and Utilization via RL for GPU Kernel Optimizationcited by 2
- 2026Surprisal-Guided Selection: Compute-Optimal Test-Time Strategies for Execution-Grounded Code Generationcited by 1
- 2026CUDAHercules: Benchmarking Hardware-Aware Expert-level CUDA Optimization for LLMscited by 1
- 2026From Tokens to Regions: CUDA-Sensitive Instruction Tuning for GPU Kernel Generationcited by 1
- 2026CANN Bench: Benchmarking Agent Generated Kernels against Real NPU and Algorithmic Limitscited by 1
- 2026RealisticTritonBench: A Benchmark for Triton-Kernel Generation in Real-World AI Frameworkscited by 1
- 2026CUDABeaver: Benchmarking LLM-Based Automated CUDA Debuggingcited by 0
- 2026LEAP: Lean Environment-Feedback via Adaptive Pruning for Code RL in GPU Kernel Generationcited by 0
12 most cited of 18 All 18 (JSON)
- 2026AI as a Compiler: Compiling Triton kernels without the Triton compiler29 Sep 2026
- 2026From Experience to Expertise: Adoption-Aware Memory Learning for Data-Scarce NPU Kernel Synthesis28 Sep 2026
- 2026FlashVector: Agent for Hierarchical Model Serving Stack Optimization15 Sep 2026
- 2026AsmEvo: Agentic Assembly-Level Optimization of AMD GPU Kernels with Functional Equivalence Verification21 Aug 2026
- 2026PTXBench: Benchmarking and Adapting LLMs for GPU Kernel Optimization with Architecture-specific PTX18 Aug 2026
- 2026A Contract-Grade Verifier for LLM-Generated GPU Kernels, and a Native Blackwell Backward for the Gated-Linear-Recurrence Family13 Aug 2026
- 2026RealisticTritonBench: A Benchmark for Triton-Kernel Generation in Real-World AI Frameworks12 Aug 2026
- 2026LEAP: Lean Environment-Feedback via Adaptive Pruning for Code RL in GPU Kernel Generation3 Aug 2026
- 2026CANN Bench: Benchmarking Agent Generated Kernels against Real NPU and Algorithmic Limits8 Jul 2026
- 2026KernelBench-Verified: Do LLM-Generated Kernels Actually Beat PyTorch?26 Jun 2026
- 2026daVinci-kernel: Co-Evolving Skill Selection, Summarization, and Utilization via RL for GPU Kernel Optimization15 Jun 2026
- 2026From Tokens to Regions: CUDA-Sensitive Instruction Tuning for GPU Kernel Generation15 Jun 2026
12 newest of 18 All 18 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2026Fine-Tuning GPT-5 for GPU Kernel Generation
- 2026DRTriton: Large-Scale Synthetic Data Driven Reinforcement Learning for Triton Kernel Generation
- 2026MusaCoder: Native GPU Kernel Generation with Full-Stack Training on Moore Threads GPU
- 2026KernelZero: Co-Evolving Proposer and Coder for Continuously Improved GPU Kernel Generation
- 2026Multi-turn RL with Structural and Performance Aware Rewards for CUDA Kernel Generation
- 2026GPU Forecasters: Language Models as Selective Surrogates for Kernel Runtime Optimization
- 2026KernelSkill: A Multi-Agent Framework for GPU Kernel Optimization
- 2026AMDKernelVault: Large-Scale Datasets and Agentic Training for AMD GPU Kernel Optimization