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

*Siqi Guo, Ming Lin, Tianbao Yang*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/148751) · [OpenReview](https://openreview.net/forum?id=vIGiwZgJHT) · [alphaXiv](https://www.alphaxiv.org/abs/2603.21465) · [Open on the map](../papers.html#p148751)

Category: [LLM Agents, Evals & Benchmarks](../pcat/17.md) › [GPU Kernel Optimization and Benchmarking](../pgroup/467.md) · Type: new method · Keywords: synthetic data generation, reinforcement learning, LLM kernel conversion, Triton kernels, GPU optimization

Areas: [Code & Coding Agents](../areas/codegen.md) › Code Generation and Optimization › GPU Kernel Optimization; [Evaluation & Benchmarks](../areas/evaluation.md) › Language Model and Agent Benchmarks › Code and Hardware Benchmarks

## Summary
DRTriton is a reinforcement learning framework that uses synthetically generated PyTorch programs to train LLMs for converting PyTorch code into optimized Triton kernels, achieving high speedup on KernelBench tasks.

## Explained to a 5-year-old
We want computers to make fast code for graphics cards. People write code in a language called PyTorch. We teach a big language model to turn that code into a special fast code called Triton. To do this, we create many made-up examples that cover all kinds of problems and teach the model using a game-like learning method that rewards both making correct code and making it fast. Finally, we improve the code after it is made, so it runs much faster than before.

## Explained to a 5-year-old, longer
Computers need to run very fast when they do things like generate pictures or translate languages. To make them fast, programmers write special instructions called kernels for the graphics processing unit (GPU). Writing these kernels by hand is hard and takes a lot of time. Some smart programs called large language models have been tried to automatically turn simpler code into these fast kernels. However, these models often make kernels that are not fast enough for real-world use. The paper creates a new way to teach a language model to do this conversion better. First, it makes up many different examples of simple code that cover all possible kinds of problems. These examples are chosen so that they are fair and difficult in a controlled way. Then, the model is taught using a special learning process that works like a game, where it gets points for making correct kernels and for making them run quickly. The learning process is organized step by step, starting easy and getting harder. After the model learns, a second step looks at the kernels it made and tries to improve their speed even more. As a result, the model can produce kernels that are much faster than those made by previous methods, helping computers run AI tasks more efficiently.

## For a technical reader
DRTriton is a reinforcement-learning framework that trains LLMs to translate PyTorch programs into optimized Triton kernels. It generates synthetic PyTorch programs using a coverage-guaranteed algorithm (CSP-DAG) and employs a curriculum RL with decoupled rewards for conversion accuracy and speed. A test-time search further refines the generated kernels. The approach is pre-trained with supervised fine-tuning on a small set of human-curated pairs before RL. Experiments show DRTriton-7B achieves a 92% speedup over PyTorch on KernelBench Level 2 tasks, outperforming GPT-5.2 and Claude-Sonnet-4.5.

## Problem
Automatically converting PyTorch reference implementations into efficient CUDA kernels is difficult, and existing LLMs often produce suboptimal kernels, limiting performance gains.

## Method
The approach generates synthetic PyTorch programs with a coverage-guaranteed algorithm, trains a curriculum reinforcement learning framework that jointly optimizes conversion success and execution speed, and applies a test-time search to further improve kernel performance.

## Results
The approach achieves a speedup over PyTorch on 92% of KernelBench Level 2 tasks, compared to 23% for GPT-5.2 and 19% for Claude-Sonnet-4.5.

## Contributions
A synthetic data generation algorithm with full operator coverage, a curriculum reinforcement learning framework that jointly optimizes conversion success and speed, and a test-time search to enhance kernel performance, enabling LLMs to produce highly optimized Triton kernels.

## Practical relevance
The method enables faster kernel generation for AI workloads, reducing engineering effort and improving GPU performance for generative AI applications.

## Research questions this paper is counted under

- [How can we create comprehensive benchmarks that evaluate LLM-generated GPU code for correctness, performance, and real-world applicability?](../q/132.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/148751)
