From Tokens to Regions: CUDA-Sensitive Instruction Tuning for GPU Kernel Generation

Wentao Chen, Jiace Zhu, Qu Zeng, Qiaoling Xiao, Liucheng Duan, An Zou


Abstract
High-performance CUDA kernels are essential for scalable AI systems, while Large Language Models (LLMs) still struggle to generate correct kernels due to strict and implicit execution constraints. Existing LLM-based approaches either rely on costly agentic or reinforcement-learning (RL) pipelines, or adopt supervised fine-tuning (SFT) objectives that fail to explicitly model CUDA sensitivity, namely code tokens or regions tightly coupled with execution constraints. In this work, we investigate CUDA sensitivity from the perspective of token confidence patterns, showing that CUDA sensitivity appears at both token and region levels, where most CUDA-sensitive tokens are predicted with high confidence, while a smaller low-confidence subset forms regions corresponding to execution-critical structures. These findings suggest that effective CUDA kernel generation should both leverage high-confidence CUDA-sensitive tokens and preserve low-confidence CUDA-sensitive regions. Building on these insights, we propose CUDA-Sensitive Instruction Tuning (CuSeT), a low-cost post-training method within a simple SFT framework. CuSeT follows the principle of “from tokens to regions” by combining adaptive token-level masking with region-aware sample reweighting. Experiments show that CuSeT consistently improves both functional correctness and kernel performance across multiple model families and scales, outperforming standard SFT and advanced SFT variants, while achieving competitive performance against frontier CUDA kernel generation models with substantially lower inference cost.
Anthology ID:
2026.findings-emnlp.2045
Volume:
Findings of the Association for Computational Linguistics: EMNLP 2026
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Hung-Yi Lee, Sunipa Dev, Jessy Li, Desmond Elliott
Venue:
Findings
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
43505–43519
Language:
URL:
https://aclanthology.org/2026.findings-emnlp.2045/
DOI:
10.18653/2026.findings-emnlp.2045
Bibkey:
Cite (ACL):
Wentao Chen, Jiace Zhu, Qu Zeng, Qiaoling Xiao, Liucheng Duan, and An Zou. 2026. From Tokens to Regions: CUDA-Sensitive Instruction Tuning for GPU Kernel Generation. In Findings of the Association for Computational Linguistics: EMNLP 2026, pages 43505–43519, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
From Tokens to Regions: CUDA-Sensitive Instruction Tuning for GPU Kernel Generation (Chen et al., Findings 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.findings-emnlp.2045.pdf