CUDA-Harness: Harnessing Agentic CUDA Kernel Generation and Optimization from Natural Language

πŸ“… 2026-08-30
πŸ“ˆ Citations: 0
✨ Influential: 0
πŸ“„ PDF
πŸ€– AI Summary
ζœ¬ζ–‡ζε‡ΊCUDA-Harnessζ‘†ζžΆοΌŒι€šθΏ‡θ‡ͺη„Άθ―­θ¨€η”Ÿζˆε’ŒδΌ˜εŒ–CUDAε†…ζ ΈοΌŒι‡‡η”¨δΈ­ι—΄η»“ζž„η”Ÿζˆγ€εˆζˆιͺŒθ―εŠει¦ˆι€‚εΊ”θΏ›εŒ–ζ–Ήζ³•θ§£ε†³ηŽ°ζœ‰ζŠ€ζœ―ηš„ε±€ι™γ€‚
πŸ“ Abstract
Developing high-performance CUDA kernels demands specialized knowledge in algorithm implementation, correctness validation, and hardware-aware parallel optimization, creating a substantial expertise barrier and making generating CUDA kernels directly from natural language (Text2CUDA) essential. Meanwhile, the general-purpose code generation capability of Large Language Models (LLMs) prompts a series of works exploring LLM-based CUDA kernel generation. They mainly focus on transpilation from high-level frameworks such as PyTorch to CUDA (Torch2CUDA) rather than Text2CUDA, where models must understand the high-level input semantics and handle low-level kernel implementation and validation. Additionally, these methods are vulnerable to reward hacking due to reliance on predefined test inputs. In this paper, we propose CUDA-Harness, a framework for harnessing agentic CUDA kernel generation and optimization from natural language. Specifically, we introduce Intermediate-Structured Generation to connect high-level semantic understanding with low-level kernel generation. To dilute reward hacking in Text2CUDA, we construct Synthesis-Based Verification to provide isolated test data and progressive validation. Furthermore, we propose Feedback-Adaptive Evolution, a kernel evolution strategy that prioritizes correctness while optimizing performance. Finally, through extensive experiments, we demonstrate the effectiveness of CUDA-Harness, with further evaluations illustrating generalization across LLMs, hardware platforms, and to C-to-CUDA transpilation.
Problem

Research questions and friction points this paper is trying to address.

CUDA kernel generation
natural language
expertise barrier
reward hacking
Text2CUDA
Innovation

Methods, ideas, or system contributions that make the work stand out.

Intermediate-Structured Generation
Synthesis-Based Verification
Feedback-Adaptive Evolution
πŸ”Ž Similar Papers