2606.16231v1 Jun 15, 2026 cs.LG

토큰에서 영역으로: GPU 커널 생성을 위한 CUDA 민감도 기반 명령어 튜닝

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

Anqi Zou
Anqi Zou
Citations: 8
h-index: 2
Wentao Chen
Wentao Chen
Citations: 68
h-index: 4
Jiace Zhu
Jiace Zhu
Citations: 43
h-index: 3
Xingsan Chai
Xingsan Chai
Citations: 5
h-index: 1
Zeng Qu
Zeng Qu
Citations: 7
h-index: 1
Qiao Xiao
Qiao Xiao
Citations: 4
h-index: 1
Liucheng Duan
Liucheng Duan
Citations: 0
h-index: 0

고성능 CUDA 커널은 확장 가능한 AI 시스템에 필수적이지만, 현재의 대규모 언어 모델(LLM)은 엄격하고 암묵적인 실행 제약 조건 때문에 정확한 커널을 생성하는 데 어려움을 겪습니다. 기존의 LLM 기반 접근 방식은 비용이 많이 드는 에이전트 또는 강화 학습(RL) 파이프라인에 의존하거나, CUDA 민감도를 명시적으로 모델링하지 못하는 지도 미세 조정(SFT) 목표를 채택합니다. 본 연구에서는 토큰 신뢰도 패턴의 관점에서 CUDA 민감성을 조사하고, CUDA 민감성이 토큰 및 영역 수준 모두에서 나타나는 것을 보여줍니다. 대부분의 CUDA 민감한 토큰은 높은 신뢰도로 예측되는 반면, 상대적으로 낮은 신뢰도를 가진 일부 토큰들은 실행에 중요한 구조와 일치하는 영역을 형성합니다. 이러한 결과는 효과적인 CUDA 커널 생성이 고신뢰도의 CUDA 민감한 토큰을 활용하고 동시에 저신뢰도의 CUDA 민감한 영역을 보존해야 함을 시사합니다. 이러한 통찰력을 바탕으로, 본 연구에서는 간단한 SFT 프레임워크 내에서 비용 효율적인 후처리 방법인 extbf{ ewline}CUDA- extbf{ ewline}민감도 기반 명령어 extbf{ ewline}튜닝 (CuSeT)을 제안합니다. CuSeT는 "토큰에서 영역으로"의 원칙을 따르며, extit{적응형 토큰 수준 마스킹}과 extit{영역 인지 샘플 재가중치 부여}를 결합합니다. 실험 결과, CuSeT는 다양한 모델 아키텍처 및 규모에서 기능적인 정확도를 지속적으로 향상시키며, 표준 SFT 및 고급 SFT 변종보다 우수한 성능을 보입니다. 또한, 훨씬 낮은 추론 비용으로 최첨단 CUDA 커널 생성 모델과 경쟁력 있는 성능을 달성합니다.

Original 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 \textbf{\underline{CU}DA-\underline{Se}nsitive Instruction \underline{T}uning (CuSeT)}, a low-cost post-training method within a simple SFT framework. CuSeT follows the principle of ``from tokens to regions'' by combining \emph{adaptive token-level masking} with \emph{region-aware sample reweighting}. Experiments show that CuSeT consistently improves functional correctness 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.

0 Citations
0 Influential
2 Altmetric
10.0 Score
Original PDF

No Analysis Report Yet

This paper hasn't been analyzed by Gemini yet.

Log in to request an AI analysis.

댓글

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

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