Reproduce “Multi-turn RL with Structural and Performance Aware Rewards for CUDA Kernel Generation” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Quazi Ishtiaque Mahmud, Nesreen K. Ahmed, Ali Jannesari

Researchers from Iowa State University and Cisco AI Research developed CUDAPERF, a multi-turn reinforcement learning framework that generates high-performance CUDA kernels by integrating verifiable execution-based rewards with structural code-aware signals. This framework produced CUDA programs with up to 5X speedup for C→CUDA and 3.32X for PyTorch→CUDA over specialized baseline models, while also improving correctness.

Key insights

  • Combining both verifiable execution-based rewards and fine-grained structure-aware rewards is crucial for guiding LLMs to generate highly optimized parallel code, outperforming approaches that rely on either signal alone.
  • Integrating "white-box" structural features into the reward signal enables the RL agent to learn not just "what works" but also "why it works" in terms of efficient parallel programming patterns, mimicking expert reasoning.
  • A multi-turn iterative refinement process, incorporating structured feedback on both execution outcomes and code structural properties, significantly enhances the LLM's ability to progressively optimize CUDA kernels.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.