The year/Independent research

Paper 2602.24286

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

Published
Feb 2026
Research lab
Independent
Citations
32
GitHub
1.1K stars

01 In brief

Summary

CUDA Agent is a large-scale agentic reinforcement learning (RL) system for generating high-performance CUDA kernels.

It addresses the gap between LLMs and compiler-based systems like torch.compile by combining a scalable data synthesis pipeline (crawling seed operators, LLM-based combinatorial fusion, and rubric-based filtering to create CUDA-Agent-Ops-6K), a skill-augmented development environment with automated verification and profiling, and RL techniques for stable training.

The system uses a robust reward scheme (discrete scores based on correctness and speedup milestones) and a multi-stage warm-up (single-turn RL, rejection fine-tuning for the actor, and value pretraining for the critic) to prevent training collapse.

On KernelBench, CUDA Agent achieves 100%, 100%, and 92% faster rates over torch.compile on Levels 1, 2, and 3, respectively, with geometric mean speedups of 1.87x, 2.80x, and 1.52x, outperforming proprietary models like Claude Opus 4.5 and Gemini 3 Pro by about 40% on Level 3.

Ablations confirm the importance of the agent loop, reward design, and warm-up stages.

02 From the paper

Abstract

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.