arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.36576cs.LGcs.AI
收藏

少即是多:学习为GPU内核优化选择需剖析的内容

Less is more: learning what to profile for GPU kernel optimization

Renmin University of China(中国人民大学);University of International Business and Economics(对外经济贸易大学)

Yihan Wang, Peiyu Liu, Runyu Chen, Wei Xu

AI总结:

本研究针对GPU内核优化中现有系统固定剖析策略的不足,提出AutoProfiler框架,通过学习内核相关的剖析树,在有限预算下提升了KernelBench上的内核优化效果。

摘要:

大型语言模型近期在自动优化GPU内核方面展现出强大潜力,但其有效性高度依赖内核优化模型可获取的硬件信息。现有系统通常依赖预定义的剖析策略,将需剖析的内容基本排除在优化过程之外。研究表明,有效的剖析并非简单收集更多信息:增加剖析指标的数量并不能持续提升内核优化效果,且最有用的剖析信息因内核而异。理论分析进一步显示,在这种异构的剖析效用下,依赖内核的选择机制可优于任何单一固定的剖析配置。受此观察启发,我们提出AutoProfiler——一种基于反馈的框架,用于从优化反馈中学习确定性的剖析树。该树通过REWRITE(重写)和SPLIT(拆分)操作迭代优化,其中大型语言模型生成候选修改方案,经验评估决定其是否被接受。构建完成后,该树可快速收集任意内核所需的剖析信息,使大型语言模型重写器仅需调用一次。在KernelBench上的实验表明,我们的方法在有限的剖析预算下,相比固定剖析配置能提升内核优化效果。这些结果表明,硬件剖析应从静态指标收集向剖析推理演进,使剖析本身成为提升内核优化的新维度。代码可在该https URL获取。

英文摘要:

Large language models have recently shown strong potential for automatically optimizing GPU kernels, yet their effectiveness depends critically on the hardware information available to the kernel optimization model. Existing systems typically rely on predefined profiling strategies, leaving what to profile largely outside the optimization process. We show that effective profiling is not simply about collecting more information: increasing the number of profiling metrics does not monotonically improve kernel optimization, while the most useful profiling information varies across kernels. Our theoretical analysis further shows that, under such heterogeneous profiling utility, kernel-conditioned selection can outperform any single fixed profiling configuration. Motivated by this observation, we propose AutoProfiler, a feedback-driven framework for learning a deterministic profiling tree from optimization feedback. The tree is iteratively refined through REWRITE and SPLIT operations, with an LLM generating candidate modifications and empirical evaluation determining their acceptance. Once constructed, the tree quickly gathers the required profiling information for any kernel, allowing the LLM rewriter to be invoked only once. Experiments on KernelBench show that our approach improves kernel optimization over fixed profiling configurations under constrained profiling budgets. These results suggest that hardware profiling should evolve from static metric collection toward profiling reasoning, making profiling itself a new dimension for improving kernel optimization. The codes are available at https://github.com/Satissss/AutoProfiler.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑