TritonBench: Benchmarking Large Language Model Capabilities for Generating Triton Operators
Jianling Li, ShangZhan Li, Zhenye Gao, Qi Shi, Yuxuan Li, Zefan Wang, Jiacheng Huang, WangHaojie WangHaojie
Abstract
Triton, a high-level Python-like language designed for building efficient GPU kernels, is widely adopted in deep learning frameworks due to its portability, flexibility, and accessibility. However, programming and parallel optimization still require considerable trial and error from Triton developers. Despite advances in large language models (LLMs) for conventional code generation, these models struggle to generate accurate, performance-optimized Triton code, as they lack awareness of its specifications and the complexities of GPU programming. More critically, there is an urgent need for systematic evaluations tailored to Triton. In this work, we introduce TritonBench, the first comprehensive benchmark for Triton operator generation. TritonBench features two evaluation channels: a curated set of 184 real-world operators from GitHub and a collection of operators aligned with PyTorch interfaces. Unlike conventional code benchmarks prioritizing functional correctness, TritonBench also profiles efficiency performance on widely deployed GPUs aligned with industry applications. Our study reveals that current state-of-the-art code LLMs struggle to generate efficient Triton operators, highlighting a significant gap in high-performance code generation.
BibTeX
@inproceedings{li-etal-2025-tritonbench,
title = "{T}riton{B}ench: Benchmarking Large Language Model Capabilities for Generating Triton Operators",
author = "Li, Jianling and
Li, ShangZhan and
Gao, Zhenye and
Shi, Qi and
Li, Yuxuan and
Wang, Zefan and
Huang, Jiacheng and
WangHaojie, WangHaojie and
Wang, Jianrong and
Han, Xu and
Liu, Zhiyuan and
Sun, Maosong",
editor = "Che, Wanxiang and
Nabende, Joyce and
Shutova, Ekaterina and
Pilehvar, Mohammad Taher",
booktitle = "Findings of the Association for Computational Linguistics: ACL 2025",
month = jul,
year = "2025",
address = "Vienna, Austria",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2025.findings-acl.1183/",
doi = "10.18653/v1/2025.findings-acl.1183",
pages = "23053--23066",
ISBN = "979-8-89176-256-5"
}