跳到正文
arXiv cs.CL· Siqi Guo, Ming Lin, Tianbao Yang·· 2 天前AI 评分49

DRTriton:大规模合成数据驱动的强化学习框架,用于生成 Triton Kernel

DRTriton: Large-Scale Synthetic Data Driven Reinforcement Learning for Triton Kernel Generation

AI 导读

DRTriton 是一个可扩展的学习框架,通过合成数据与强化学习训练 LLM 将 PyTorch 程序转换为高度优化的 Triton kernel。其 7B 模型在 KernelBench Level 2 的 92% 任务上实现相对 PyTorch 的加速,而 GPT-5.2 与 Claude-Sonnet-4.5 分别仅为 23% 和 19%。

正文 · 原文

View PDF HTML (experimental)

Abstract:Developing efficient CUDA kernels is a fundamental yet challenging task in the generative AI industry. Recent research leverages Large Language Models (LLMs) to automatically convert PyTorch reference implementations to CUDA kernels, significantly reducing engineering effort. State-of-the-art LLMs, such as GPT-5.2 and Claude-Sonnet-4.5, still struggle with this task. To address this challenge, we propose DRTriton, a scalable learning framework for training LLMs to convert PyTorch programs into highly optimized Triton kernels, which are then compiled to CUDA kernels at runtime. DRTriton consists of three key components: (i) a data synthetic algorithm CSP-DAG that guarantees full coverage and unbiased uniform sampling over the operator space with controlled difficulty; (ii) a curriculum RL framework with decoupled rewards that jointly optimizes conversion success rate and execution speed; and (iii) a test-time search algorithm that further improves the execution speed of the generated Triton kernels. With a warmup stage of SFT on limited PyTorch-Triton pairs curated using existing LLMs, DRTriton trained by RL on synthesized PyTorch programs generalizes effectively to real-world CUDA kernels that are challenging even for human experts. Experimental results show that DRTriton-7B achieves speedup over PyTorch on 92% of KernelBench Level 2 tasks, compared to 23% for GPT-5.2 and 19% for Claude-Sonnet-4.5.
Comments: Accepted at NeurIPS 2026. Code available at this https URL
Subjects: Computation and Language (cs.CL); Machine Learning (cs.LG)
Cite as: arXiv:2603.21465 [cs.CL]
  (or arXiv:2603.21465v3 [cs.CL] for this version)
  https://doi.org/10.48550/arXiv.2603.21465

arXiv-issued DOI via DataCite

Submission history

From: Siqi Guo [view email]
[v1] Mon, 23 Mar 2026 00:59:35 UTC (242 KB)
[v2] Tue, 26 May 2026 23:09:53 UTC (228 KB)
[v3] Thu, 12 Nov 2026 22:38:07 UTC (229 KB)

来源:arXiv cs.CL · arxiv.org