Compiler-Grounded Hierarchical Diagnosis for LLM-Based Triton Kernel Optimization
Dongjie Chen, Ping Zhao, Bohua Zhan, Yulong Wang, Shushu Chen, Liangjun Feng, Hao Zhou, Min Shen, Linmu Wang, Weijia Sheng, Xiangyu Wei, Weijie Ding, Jianhui Huang, Yaoqing Gao
Abstract
Recent advances in large language models (LLMs) have enabled automated kernel generation and optimization, but most existing approaches rely on surface signals such as compilation feedback and profiling metrics. These signals reveal that a kernel is slow, but not why the backend compiler fails to realize a profitable optimization, especially on emerging accelerators such as NPUs. We therefore formulate kernel optimization as a progressive cross-layer diagnosis problem that links runtime symptoms to IR structure and compiler behavior before rewriting source. Based on this insight, we present our system, a compiler-grounded and hierarchical optimization framework for Triton kernels. the system escalates from lightweight pattern triage and profiling diagnosis to IR attribution and compiler-grounded analysis only when deeper evidence is needed, then proposes evidence-backed source-level rewrites. We implement the system on Triton for Ascend NPUs and evaluate it on 37 successfully converted entries from a standardized NPUKernelBench-derived Ascend 950 benchmark. Across these entries, the system attains a geometric-mean speedup of 4.35 and a median speedup of 2.73 from the initial to optimized Triton kernel; 22/37 exceed 2 and 13/37 exceed 5. The complete distribution ranges from near-baseline entries to large wins, motivating transparent reporting of the current system's scope and limitations.
Create a lesson
Metadata
- Categories
- cs.AI, cs.PL
Related papers
HoMe: Toward Practical Harness Optimization of Memory Systems for AI Assistants
Shared title terminologycs.AIYifei Xu, Li Yu, Zhaoyang Liu et al.
Evaluating Aviation Safety Knowledge Extraction with SmolLM2: From Zero-Shot to Retrieval-Grounded Prompting
Shared title terminologycs.AIAziida Nanyonga, Mustafa Tahsin Yilmaz, Amir Hussain et al.
Navigent: A Geometry-Grounded Agentic Framework for Vision Language Navigation
Shared title terminologycs.AIXinyu Zhou, Weiren Cai, Yitong Chen et al.
EGSE: Evidence-Grounded Skill Evolution for Medical Reasoning Agents
Shared title terminologycs.AIMingyuan Li, Tong Jia, Ziyuan Yang et al.
RadOncGym: An Agent-Based Framework for Radiotherapy Dose-Mimicking Optimization
Shared title terminologycs.AITong Miao, Shupeng Cheng, Xiwen Chen et al.
Spectral Optimal Transport for Dynamics-Aware Sign Language Generation
Shared title terminologycs.AINabeela Khan, Bowen Wu, Runwu Shi et al.