Augmenting LLM Code Translation with Compiler Analysis for C to Triton Kernel Generation
University of Leeds, Leeds, United Kingdom
Proceedings of the 40th ACM International Conference on Supercomputing (ICS Workshops ’26), 2026
@inproceedings{qin2026augmenting,
title={Augmenting LLM Code Translation with Compiler Analysis for C to Triton Kernel Generation},
author={Qin, Xiao and Xia, Chunwei and Wang, Zheng},
booktitle={Proceedings of the 40th ACM International Conference on Supercomputing-Workshops},
pages={70–74},
year={2026}
}
Emerging programming models like Triton enable developers to better exploit modern accelerators, but translating legacy code to Triton remains challenging. While Large Language Models (LLMs) show promise for code translation, they often generate incorrect or suboptimal implementations due to a lack of precise parallelization reasoning. We present TritonPilot, a compiler-assisted LLM framework for translating C loop nests to Triton kernels. TritonPilot extracts parallelization properties using compiler-based analysis and encodes them as structured analysis facts in the LLM prompt, enabling correct and performance-aware parallel code synthesis. A profiling feedback loop further improves performance by feeding GPU hardware utilization metrics back to the LLM for iterative optimization. On PolyBench/C, TritonPilot achieves 97% correctness, outperforming both an autonomous LLM agent with tool use (80%) and an unguided LLM baseline (93%). At 8 x problem sizes, the generated Triton kernels achieve a median 24.6 x speedup, compared to 20.7 x for the agent and 10.8 x for the unguided baseline. Profiling feedback improves 9 of 29 kernels at standard sizes and 12 of 21 at larger sizes. TritonPilot also passes 95% of 151 TSVC kernels and generalizes to 6 of 8 Rodinia/ECP application kernels. These results show that compiler analysis outperforms autonomous LLM agents for kernel generation correctness and performance.
July 13, 2026 by hgpu
Your response
You must be logged in to post a comment.




