arXiv:2608.12004cs.SEcs.AI2026-08中稿 · ASE 2026

构建真实场景的Triton内核生成评测基准,揭示大模型在实际开发中仍存短板。

RealisticTritonBench: A Benchmark for Triton-Kernel Generation in Real-World AI Frameworks

论文配图:RealisticTritonBench: A Benchmark for Triton-Kernel Generation in Real-World AI Frameworks
图 1 · 摘自论文原文
  • 从真实开源项目拉取请求中提取复杂内核任务,还原生产环境上下文。
  • 通过端到端测试评估生成内核,发现主流大模型仍难胜任真实任务。
  • 避免人工脚本漏洞,确保评测结果可信,适合框架开发者参考。

现代AI框架中,GPU内核直接影响系统性能。Triton凭借易用性、可移植性及接近手写CUDA的性能,被广泛用于实现GPU内核。近期研究显示,大语言模型(LLMs)有望自动生成Triton内核,降低专家开发成本。然而,现有评测基准存在三大缺陷:(1) 仅限于PyTorch到Triton的翻译任务,无法反映真实Triton任务的多样性和复杂性;(2) 仅评估单个内核性能,忽视实际部署所需的端到端性能;(3) 依赖人工编写的内核评估脚本,可能被模型利用以绕过正确性检查,虚高评分。为此,我们提出RealisticTritonBench,首个基于真实开源框架拉取请求生成的Triton内核评测基准,支持生产级评估。该基准系统性地从主流AI框架中提取修改Triton内核的拉取请求,并转化为带具体工程上下文的生成任务。每项任务以自然语言需求为输入,要求输出对应Triton内核实现,并提供完整可复现的评估环境。与以往仅关注孤立内核性能的基准不同,RealisticTritonBench将生成内核集成回原始框架,通过端到端测试进行评估,实现更真实的性能判断。我们在该基准上评测主流大模型,发现其在真实任务中依然表现不佳。

原文摘要 · Abstract (English)

In modern AI frameworks, GPU kernels are key to overall system performance. Combining usability, portability, and near-handwritten CUDA performance, Triton is widely adopted for implementing GPU kernels. Recent advances show the potential of large language models (LLMs) to automatically generate Triton kernels, reducing the manual effort required from expert kernel developers. Several benchmarks evaluate LLM-generated Triton kernels. However, they suffer from three key limitations: (1) they restrict tasks to PyTorch-to-Triton translation, failing to reflect the diversity and complexity of real-world Triton tasks; (2) they evaluate only individual-kernel performance rather than end-to-end performance, the core criterion for real-world deployment in AI frameworks; and (3) they rely on manually written evaluation scripts for individual kernels, which may contain flaws that models can exploit to bypass correctness checks and obtain inflated scores. To address these limitations, we introduce RealisticTritonBench, the first benchmark to derive Triton kernel generation tasks from real-world pull requests in popular AI frameworks, enabling realistic, production-like evaluation. RealisticTritonBench systematically extracts PRs that modify Triton kernels from popular open-source AI frameworks and transforms them into generation tasks with concrete engineering contexts. Each task takes a natural language requirement as input and requires a corresponding Triton kernel implementation, with a complete and reproducible evaluation environment. Unlike prior benchmarks focused on isolated kernel performance, RealisticTritonBench integrates generated kernels into their original frameworks and evaluates them using end-to-end tests, enabling a more faithful assessment. We evaluate leading LLMs on RealisticTritonBench and find that they still struggle with real-world Triton kernel generation tasks.

Triton内核生成大模型评测基准

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。