Learning When to Optimize: Verified Optimization Skills from Expert GPU-Kernel Lineages

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Zhang, Shuoming, Yu, Qiuchu, Zhang, Yangyu, Xu, Ruiyuan, Shi, Xiyu, Li, Guangli, Feng, Xiaobing, Cui, Huimin, Zhao, Jiacheng
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913166994178048
author Zhang, Shuoming
Yu, Qiuchu
Zhang, Yangyu
Xu, Ruiyuan
Shi, Xiyu
Li, Guangli
Feng, Xiaobing
Cui, Huimin
Zhao, Jiacheng
author_facet Zhang, Shuoming
Yu, Qiuchu
Zhang, Yangyu
Xu, Ruiyuan
Shi, Xiyu
Li, Guangli
Feng, Xiaobing
Cui, Huimin
Zhao, Jiacheng
contents LLM-based agents are increasingly used to generate GPU kernels, but they often know what optimizations to try without knowing when those optimizations are sound. We introduce KLineage, which learns this missing "when" knowledge from expert kernels: instead of relying on forward rollouts, KLineage walks expert implementations backward through validation-gated simplifications and reverses each accepted step into a reusable optimization skill. Each skill records not only the optimization intent, but also where it applies in code, what conditions made it valid, what effect it had, and what failures its assumptions avoid. A downstream LLM materializes these skills on new code surfaces under the same compile/correctness/profile gate. On five expert workloads across two NVIDIA architectures, these lineage-derived skills serve as an effective optimization curriculum, exceeding recent memory-based LLM-kernel baselines in both final kernel quality and optimization efficiency under the same fixed budget. We additionally use a separate 22-instance held-out check as a sanity test against source-case memorization.
format Preprint
id arxiv_https___arxiv_org_abs_2605_28213
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Learning When to Optimize: Verified Optimization Skills from Expert GPU-Kernel Lineages
Zhang, Shuoming
Yu, Qiuchu
Zhang, Yangyu
Xu, Ruiyuan
Shi, Xiyu
Li, Guangli
Feng, Xiaobing
Cui, Huimin
Zhao, Jiacheng
Artificial Intelligence
LLM-based agents are increasingly used to generate GPU kernels, but they often know what optimizations to try without knowing when those optimizations are sound. We introduce KLineage, which learns this missing "when" knowledge from expert kernels: instead of relying on forward rollouts, KLineage walks expert implementations backward through validation-gated simplifications and reverses each accepted step into a reusable optimization skill. Each skill records not only the optimization intent, but also where it applies in code, what conditions made it valid, what effect it had, and what failures its assumptions avoid. A downstream LLM materializes these skills on new code surfaces under the same compile/correctness/profile gate. On five expert workloads across two NVIDIA architectures, these lineage-derived skills serve as an effective optimization curriculum, exceeding recent memory-based LLM-kernel baselines in both final kernel quality and optimization efficiency under the same fixed budget. We additionally use a separate 22-instance held-out check as a sanity test against source-case memorization.
title Learning When to Optimize: Verified Optimization Skills from Expert GPU-Kernel Lineages
topic Artificial Intelligence
url https://arxiv.org/abs/2605.28213