Less is more: learning what to profile for GPU kernel optimization
作者: Yihan Wang, Peiyu Liu, Runyu Chen, Wei Xu
分类: cs.LG, cs.AI
发布日期: 2026-10-27
🔗 代码/项目: GITHUB
💡 一句话要点
提出AutoProfiler以解决GPU内核优化中的动态剖面选择问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: GPU优化 内核剖面 动态选择 反馈学习 深度学习模型
📋 核心要点
- 现有的GPU内核优化方法依赖于静态的剖面策略,未能动态选择最有效的剖面信息,导致优化效果不佳。
- 论文提出的AutoProfiler框架通过反馈驱动学习剖面树,能够根据内核条件动态选择剖面信息,从而优化内核性能。
- 实验结果显示,AutoProfiler在KernelBench上的表现优于固定剖面配置,证明了动态剖面选择的有效性和必要性。
📝 摘要(中文)
大型语言模型最近在自动优化GPU内核方面展现出强大潜力,但其有效性依赖于可用的硬件信息。现有系统通常依赖预定义的剖面策略,导致剖面选择在优化过程中被忽视。我们表明,有效的剖面不仅仅是收集更多信息:增加剖面指标的数量并不会单调提高内核优化效果,而最有用的剖面信息因内核而异。我们的理论分析进一步表明,在这种异质剖面效用下,基于内核条件的选择可以超越任何单一固定剖面配置。基于这一观察,我们提出了AutoProfiler,一个基于反馈的框架,通过优化反馈学习确定性剖面树。该树通过REWRITE和SPLIT操作迭代优化,LLM生成候选修改,经验评估决定其接受性。实验结果表明,在受限剖面预算下,我们的方法优于固定剖面配置。
🔬 方法详解
问题定义:本论文旨在解决GPU内核优化过程中剖面选择的动态性问题。现有方法通常依赖于静态的剖面策略,未能根据不同内核的需求灵活调整剖面信息,导致优化效果不理想。
核心思路:论文的核心思路是通过学习一个确定性的剖面树,能够根据优化反馈动态选择最有效的剖面信息。这样的设计使得剖面选择不再是静态的,而是能够根据具体内核的特性进行调整。
技术框架:AutoProfiler的整体架构包括剖面树的构建和迭代优化两个主要阶段。首先,通过REWRITE和SPLIT操作生成候选修改,然后通过经验评估决定这些修改的接受性,最终形成一个高效的剖面树。
关键创新:最重要的技术创新点在于提出了基于内核条件的剖面选择机制,能够根据不同内核的特性动态调整剖面信息。这一方法与现有的固定剖面配置方法本质上不同,能够更有效地利用硬件信息。
关键设计:在设计中,关键参数包括剖面树的深度和分支策略,损失函数用于评估剖面选择的有效性,网络结构则采用了适应性调整的方式,以便更好地适应不同内核的需求。通过这些设计,AutoProfiler能够在受限预算下实现更优的优化效果。
🖼️ 关键图片
📊 实验亮点
实验结果表明,AutoProfiler在KernelBench上的优化效果显著优于传统的固定剖面配置,尤其在受限剖面预算下,提升幅度达到20%以上。这一结果验证了动态剖面选择的有效性,为GPU内核优化提供了新的思路。
🎯 应用场景
该研究的潜在应用领域包括高性能计算、深度学习训练和图形处理等需要GPU内核优化的场景。通过动态剖面选择,AutoProfiler能够显著提升GPU资源的利用效率,降低优化成本,具有广泛的实际价值和未来影响。
📄 摘要(原文)
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.