arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2602.24286cs.LGcs.AI
收藏

CUDA Agent: 大规模代理强化学习用于高性能CUDA内核生成

CUDA Agent: Large-Scale Agentic RL for High-Performance CUDA Kernel Generation

Institute for AI Industry Research (AIR), Tsinghua University(人工智能产业研究院(AIR)、清华大学);SIA-Lab of Tsinghua AIR(清华大学AIR SIA实验室)
Weinan Dai, Hanlin Wu, Qiying Yu, Huan-ang Gao, Jiahao Li, Chengquan Jiang, Weiqiang Lou, Yufan Song, Hongli Yu, Jiaze Chen, Wei-Ying Ma, Ya-Qin Zhang, Jingjing… 展开作者

Weinan Dai, Hanlin Wu, Qiying Yu, Huan-ang Gao, Jiahao Li, Chengquan Jiang, Weiqiang Lou, Yufan Song, Hongli Yu, Jiaze Chen, Wei-Ying Ma, Ya-Qin Zhang, Jingjing Liu, Mingxuan Wang, Xin Liu, Hao Zhou

AI总结:

CUDA Agent通过大规模代理强化学习系统,实现高性能CUDA内核生成,优于现有编译器和大型语言模型。

摘要:

GPU内核优化是现代深度学习的基础,但仍然是一个高度专业化的任务,需要深入的硬件专业知识。尽管在通用编程方面表现强劲,大型语言模型(LLMs)在CUDA内核生成方面仍无法与基于编译器的系统如torch.compile竞争。现有的CUDA代码生成方法要么依赖于无训练的细化,要么在固定的多轮执行反馈循环中微调模型,但这两种范式都无法从根本上提升模型的内在CUDA优化能力,导致性能提升有限。我们提出了CUDA Agent,一种大规模代理强化学习系统,通过三个组件发展CUDA内核专业知识:可扩展的数据合成管道、带有自动化验证和性能分析的技能增强型CUDA开发环境,以提供可靠的奖励信号,以及强化学习算法技术,以实现稳定的训练。CUDA Agent在KernelBench上取得了最先进的结果,在KernelBench Level-1、Level-2和Level-3划分上分别比torch.compile快100%、100%和92%,在最困难的Level-3设置中,其性能超过了最强的专有模型,如Claude Opus 4.5和Gemini 3 Pro,大约高出40%。

英文摘要:

GPU kernel optimization is fundamental to modern deep learning but remains a highly specialized task requiring deep hardware expertise. Despite strong performance in general programming, large language models (LLMs) remain uncompetitive with compiler-based systems such as torch.compile for CUDA kernel generation. Existing CUDA code generation approaches either rely on training-free refinement or fine-tune models within fixed multi-turn execution-feedback loops, but both paradigms fail to fundamentally improve the model's intrinsic CUDA optimization ability, resulting in limited performance gains. We present CUDA Agent, a large-scale agentic reinforcement learning system that develops CUDA kernel expertise through three components: a scalable data synthesis pipeline, a skill-augmented CUDA development environment with automated verification and profiling to provide reliable reward signals, and reinforcement learning algorithmic techniques enabling stable training. CUDA Agent achieves state-of-the-art results on KernelBench, delivering 100\%, 100\%, and 92\% faster rate over torch.compile on KernelBench Level-1, Level-2, and Level-3 splits, outperforming the strongest proprietary models such as Claude Opus 4.5 and Gemini 3 Pro by about 40\% on the hardest Level-3 setting.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑