Skip to content

Multi-turn RL with Structural and Performance Aware Rewards for CUDA Kernel Generation

Jul 2026 · arXiv.org · Vol abs/2607.20908 · 0 citations · 39 references
Computer Science

TL;DR

Empirical findings suggest that CudaPerf significantly outperforms strong baselines, including Qwen-3-32B and CUDA Agent by achieving up to 5X and 3.32X improvements in speedup, and 17%&7% improvements in correctness, respectively.

Abstract

Reinforcement Learning with Verifiable Rewards (RLVR) has emerged as a powerful technique to enhance the reasoning capacity of LLMs for optimized code generation. However, existing RLVR approaches primarily rely on outcome-based signals such as correctness and speedup, overlooking performance-critical structural properties of programs that are essential for generating optimized code. In this work, we propose CudaPerf, a reflective RL framework that incorporates both verifiable execution rewards and structural code-aware rewards derived from parallelization features (e.g., memory coalescing, occupancy, Arithmatic Intensity, and synchronization patterns). CudaPerf operates in two stages: (1) an offline pairwise ranking module that learns to distinguish strong and weak program candidates via contrastive comparisons, and (2) an online RL training phase that jointly optimizes for correctness, performance, and structural efficiency through a unified reward signal. To further enhance learning, CudaPerf utilizes iterative refinement using execution feedback enabling progressive improvement of generated candidates. We also introduce a dataset comprising 2.9k C to CUDA and 1k PyTorch to CUDA programs, each paired with diverse input configurations and multiple CUDA implementations encompassing diverse optimization strategies. CudaPerf is evaluated across multiple benchmarks comprising both C to CUDA and PyTorch to CUDA transformations. Empirical findings suggest that CudaPerf significantly outperforms strong baselines, including Qwen-3-32B (for C to CUDA) and CUDA Agent (for PyTorch to CUDA) by achieving up to 5X&3.32X improvements in speedup, and 17%&7% improvements in correctness, respectively.

View source

Similar papers

Jul 2026

DHRCL:Training Code LLMs with Dense Hierarchical Rewards and Curriculum Learning

DHRCL decomposes feedback into syntax validation, execution success, unit-test pass rate, and AST-based structural similarity, and organizes these signals through a three-stage Syntax, Execution, Pass&Structural curriculum, and introduces stage-aware probability-based token credit redistribution.

Shuhang Wang, Ziming Li, Huijuan Cheng · 0 citations
Preprint Aug 2026

Performance Foundations of Parallel&Distributed Reasoning Language Models

This work systematize the RL-for-LLM paradigm and provides a compute-centric analysis of prominent post-training algorithmic frameworks: Proximal Policy Optimization (PPO), Group Relative Policy Optimization (GRPO), as well as their variants, and develops a taxonomy of intra- and inter-model parallelism strategies for...

Maciej Besta, L. Schmidt, Lara Nonino et al. · 0 citations

SFT Augmentation and Replay-Based RL for Countdown Reasoning

This work studies how supervised fine-tuning data quality and reinforcement learning (RL) optimization design affect performance on Countdown arithmetic reasoning under a reinforcement learning with verifiable rewards (RLVR) setup, and investigates whether replay-based reinforcement learning can improve sample efficien...

Adhi Daiv, Aizada Nurdinova, Ellie Sampson · 0 citations
Jul 2026

RLPF: Reinforcement Learning from Performance Feedback for Code Generation

This work proposes RLPF, reinforcement learning from performance feedback, which turns execution outcomes into a staged reward, and suggests that code agents can be trained not only to pass tests, but also to optimize the programs they write.

Huihao Jing, Hao-Zhe Cui, Wenbin Hu et al. · 0 citations

Reinforcement Learning for Code Optimization

This work makes execution time learnable through three stages: how code is tested, by building DMC-Optim with large optimization tests and a calibrated sandbox; how speed is turned into reward, by composing correctness and speed in the RL environment and using an offline simulator to predict the most promising configur...

Pierre Chambon, Kun-Hao Zheng, Juliette Decugis et al. · 0 citations
Jul 2026

HARGO: Heterogeneity-Aware Reward-Guided Optimization for RL Post-Training of LLMs on HPC Tasks

Heterogeneity-Aware Reward-Guided Optimization is proposed, which introduces per-response importance weighting via confidence-modulated advantage: computing a discrimination signal from group-level reward contrast and a confidence signal from reference model log-probabilities, then modulating the advantage before compu...

Tiangang Li, Xiangbo Tian · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.