2607.20908v1 Jul 23, 2026 cs.LG

CUDA 커널 생성을 위한 구조적 특성과 성능 인지 보상을 활용한 다단계 강화 학습

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

Ali Jannesari
Ali Jannesari
Citations: 261
h-index: 7
Nesreen K. Ahmed
Nesreen K. Ahmed
Citations: 168
h-index: 7
Q. I. Mahmud
Q. I. Mahmud
Citations: 124
h-index: 6

검증 가능한 보상(RLVR)을 사용한 강화 학습은 최적화된 코드 생성에 LLM의 추론 능력을 향상시키는 강력한 기술로 부상했습니다. 그러나 기존 RLVR 접근 방식은 정확성 및 속도 향상과 같은 결과 기반 신호에 주로 의존하며, 최적화된 코드를 생성하는 데 필수적인 프로그램의 성능에 중요한 구조적 특성을 간과합니다. 본 연구에서는 검증 가능한 실행 보상과 병렬화 특징(예: 메모리 통합, 점유율, 산술 강도 및 동기화 패턴)에서 파생된 구조 기반 코드 인지 보상을 모두 포함하는 CudaPerf라는 리플렉티브 강화 학습 프레임워크를 제안합니다. CudaPerf는 두 단계로 운영됩니다. (1) 대비 비교를 통해 우수한 프로그램 후보와 취약한 프로그램 후보를 구별하도록 학습하는 오프라인 쌍대 순위 모듈, 그리고 (2) 정확성, 성능 및 구조적 효율성을 단일 보상 신호를 통해 공동으로 최적화하는 온라인 강화 학습 훈련 단계입니다. 더 나아가 학습을 향상시키기 위해 CudaPerf는 실행 피드백을 활용한 반복적인 개선 프로세스를 사용하여 생성된 후보를 점진적으로 개선합니다. 또한, 우리는 다양한 입력 구성과 다양한 최적화 전략을 포함하는 다양한 CUDA 구현과 함께 제공되는 2.9k개의 C to CUDA 및 1k개의 PyTorch to CUDA 프로그램으로 구성된 데이터 세트를 소개합니다. CudaPerf는 C to CUDA 및 PyTorch to CUDA 변환 모두를 포함하는 여러 벤치마크에서 평가되었습니다. 실험 결과, CudaPerf는 Qwen-3-32B(C to CUDA의 경우) 및 CUDA Agent(PyTorch to CUDA의 경우)와 같은 강력한 기본 모델보다 속도 향상 측면에서 최대 5배, 정확성 측면에서 최대 17% 및 7% 개선된 성능을 보였습니다.

Original 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.

0 Citations
0 Influential
3.5 Altmetric
17.5 Score
Original PDF

No Analysis Report Yet

This paper hasn't been analyzed by Gemini yet.

Log in to request an AI analysis.

댓글

댓글을 작성하려면 로그인하세요.

아직 댓글이 없습니다. 첫 번째 댓글을 남겨보세요!