CUDA-L1: Improving CUDA Optimization via Contrastive Reinforcement Learning
Xiaoya Li, Xiaofei Sun, Albert Wang, Jiwei Li, Chris Shum
摘要
The exponential growth in demand for GPU computing resources has created an urgent need for automated CUDA optimization strategies. While recent advances in LLMs show promise for code generation, current state-of-the-art models achieve low success rates in improving CUDA speed. In this paper, we introduce CUDA-L1, an automated reinforcement learning (RL) framework for CUDA optimization that employs a novel contrastive RL algorithm.
CUDA-L1 achieves significant performance improvements on the CUDA optimization task: trained on NVIDIA A100, it delivers an average speedup of ×3.12 with a median speedup of ×1.42 against default baselines over across all 250 CUDA kernels of KernelBench, with peak speedups reaching ×120. In addition to the default baseline provided by KernelBench, CUDA-L1 demonstrates ×2.77 over Torch Compile, ×2.88 over Torch Compile with reduce overhead, and ×2.81 over CUDA Graph implementations. Furthermore, the model also demonstrates portability across GPU architectures, achieving average speedups of ×3.85 (median ×1.32) on H100, ×3.13 (median ×1.31) on L40, ×2.51 (median ×1.18) on RTX 3090, and ×2.38 (median ×1.34) on H20 despite being optimized specifically for A100.
Beyond these benchmark results, CUDA-L1 demonstrates several properties: CUDA-L1 1) discovers a variety of CUDA optimization techniques and learns to combine them strategically to achieve optimal performance; 2) uncovers fundamental principles of CUDA optimization, such as the multiplicative nature of optimizations; 3) identifies non-obvious performance bottlenecks and rejects seemingly beneficial optimizations that actually harm performance. The capabilities demonstrate that, RL can transform an initially poor-performing LLM into an effective CUDA optimizer through speedup-based reward signals alone, without human expertise or domain knowledge. In this process, it identifies CUDA optimization patterns, discovers new techniques, synthesizes them to achieve speedups, and more importantly, extends the acquired reasoning abilities to new kernels. This paradigm opens possibilities for automated optimization of CUDA operations, and holds promise to substantially promote GPU efficiency and alleviate the rising pressure on GPU computing resources.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper8
- Mastering Sparse CUDA Generation through Pretrained Models and Deep Reinforcement LearningYaoyu Wang, Hankun Dai, Zhidong Yang, Junmin Xiao 等ICLR 2026 · 被引用 476 次
- KernelFoundry: Hardware-Aware Evolutionary GPU Kernel OptimizationNina Wiedemann, Quentin Leboutet, Michael Paulitsch, Diana Wofk 等ICML 2026 · 被引用 11 次
- StitchCUDA: An Automated Multi-Agents End-to-End GPU Programing Framework with Rubric-based Agentic Reinforcement LearningShiyang Li, Zijian Zhang, Winson Chen, Yuebo Luo 等ICML 2026 · 被引用 9 次
- CuBridge: An LLM-Based Framework for Understanding and Reconstructing High-Performance Attention KernelsXing Ma, Yangjie Zhou, Wu Sun, Zihan Liu 等ACL 2026 · 被引用 2 次
- DistRS: Disaggregated Reward Service for RLVR with Batch-Level ConstraintRuidong Zhu, Mingcong Han, Yinmin Zhong, Wencong Xiao 等NSDI 2026 · 被引用 1 次
它引用的顶会 Paper3
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma 等NeurIPS 2022 · 被引用 22,562 次
- SWE-RL: Advancing LLM Reasoning via Reinforcement Learning on Open Software EvolutionYuxiang Wei, Olivier Duchenne, Jade Copet, Quentin Carbonneaux 等NeurIPS 2025 · 被引用 291 次
- Evolution of Heuristics: Towards Efficient Automatic Algorithm Design Using Large Language ModelFei Liu, Xialiang Tong, Mingxuan Yuan, Xi Lin 等ICML 2024 · 被引用 238 次
相关 Paper
- QiMeng-Kernel: Macro-Thinking Micro-Coding Paradigm for LLM-Based High-Performance GPU Kernel GenerationXinguo Zhu, Shaohui Peng, Jiaming Guo, Yunji Chen 等AAAI 2026 · 被引用 9 次
- STARK: Strategic Team of Agents for Refining KernelsJuncheng Dong, Yang Yang, Tao Liu, Yang Wang 等ICLR 2026 · 被引用 26 次
- Kevin: Multi-Turn RL for Generating CUDA KernelsCarlo Baronio, Pietro Marsella, Ben Pan, Simon Guo 等ICLR 2026 · 被引用 81 次
- PerfDojo: Automated ML Library Generation for Heterogeneous ArchitecturesAndrei Ivanov, Siyuan Shen, Gioele Gottardo, Marcin Chrapek 等SC 2025 · 被引用 2 次
- EGG: An Expert-Guided Agent Framework for Kernel GenerationYaochen Han, Ke Fan, Hongxu Jiang, Wanqi Xu 等ICML 2026
