一句话:首个从真实 AI 框架 PR 抽取任务的 Triton 内核生成基准,并在原框架端到端环境中评估 LLM。
GPU 内核是现代 AI 框架性能的关键,Triton 因兼具易用性、可移植性与接近手写 CUDA 的性能而被广泛采用,近期研究开始用大语言模型自动生成 Triton 内核。然而已有基准存在三点局限:任务仅限 PyTorch 到 Triton 的翻译,无法反映真实任务的多样性与复杂度;只评测单个内核的性能,而真实部署更看重端到端性能;且依赖手写评测脚本,易被模型利用缺陷绕过正确性检查而虚高得分。为此作者提出 RealisticTritonBench:从主流开源 AI 框架中系统抽取修改 Triton 内核的真实 PR,将其转化为带具体工程上下文的内核生成任务,输入为自然语言需求,输出为对应的 Triton 内核实现,并为每个任务提供完整可复现的评测环境。该基准将生成内核集成回原框架进行端到端测试,而非孤立内核评测。对当前先进 LLM 的系统评测显示,它们在真实 Triton 生成任务上仍面临显著挑战。
In modern AI frameworks, the GPU kernel is a key determinant of overall system performance. By combining usability, portability, and near-handwritten CUDA performance, Triton has been widely adopted for implementing GPU kernels. Recent advances have shown the potential of using large language models (LLMs) to automatically generate Triton kernels, helping reduce the manual effort required by expert kernel developers. To evaluate the quality of LLM-generated Triton kernels, several benchmarks have been proposed. However, existing benchmarks primarily target isolated kernel generation tasks and suffer from three key limitations: (1) they restrict the task to only PyTorch-to-Triton translation, thus failing to reflect the diversity and complexity of real-world Triton tasks; (2) they evaluate only the performance of individual kernels, limiting the evaluation of real-world performance of generated kernels in AI frameworks, where end-to-end performance is the core criterion for real deployment; (3) they rely on manually written evaluation scripts for single kernel, which may introduce vulnerabilities and allow models to exploit evaluation flaws to bypass correctness checks and obtain inflated scores. To address these limitations, we introduce RealisticTritonBench, the first benchmark that derives Triton kernel generation tasks from real-world pull requests in popular AI frameworks, enabling evaluation under realistic, production-like settings. RealisticTritonBench systematically extracts real-world PRs with Triton kernel modified from popular open-source AI frameworks and transforms them into kernel generation tasks with concrete engineering contexts. Each task takes a natural language requirement as input and requires to generate a corresponding Triton kernel implementation. RealisticTritonBench also provides a complete and reproducible evaluation environment for each task. In contrast to prior benchmarks that focus on isolated kernel performance, RealisticTritonBench integrates generated kernels into their original frameworks and evaluates them under end-to-end test, enabling a more faithful assessment. We conduct a systematic evaluation of the state-of-the-art LLMs on RealisticTritonBench, revealing that they still struggle to handle the challenges in real-world Triton generation tasks.
@inproceedings{paperbot12458,
title = {RealisticTritonBench: A Benchmark for Triton-Kernel Generation in Real-World AI Frameworks},
author = {Jinjun Huang and Zhongzhen Wen and Tongtong Xu and Meng Yan and Xin Xia and Zhongxin Liu},
booktitle = {ASE},
year = {2026},
doi = {10.1145/3832783.3837457}
}