arXiv:2603.23566cs.LGcs.AI2026-03被引 1

自动优化昇腾NPU算子,提升性能并填补缺乏公开优化经验的空白。

AscendOptimizer: Episodic Agent for Ascend NPU Operator Optimization

  • 通过回溯强实现方式,从执行中学习可复用的优化经验。
  • 在硬件反馈驱动下,进化搜索找到最优主机端数据调度方案。
  • 在101个真实算子上平均提速21%,53%算子超越参考实现。

为昇腾NPU优化AscendC算子面临两大挑战:其一,与CUDA不同,生态中缺乏可供学习的公开内核;其二,性能依赖于主机端分块程序(控制数据移动)与内核程序(调度计算)的协同实现。本文提出AscendOptimizer,一个基于回合的智能体,从执行过程中自主构建缺失的优化知识。针对内核优化,它通过受控地逐步移除优化,保留那些移除后性能显著下降的改动作为可复用经验;针对主机端优化,它采用闭环性能分析的进化搜索,直接从硬件反馈中找出高效且合法的数据分块与移动配置。该方法可联合优化内核结构与主机调度策略。在包含101个真实AscendC算子的基准测试中,相比开源基线,AscendOptimizer实现1.21倍几何均值加速,53.47%的算子性能超过参考实现。在相同评估预算下,其几何均值加速、快速尾部加速比及整体优化进度均优于Best-of-N采样与OpenEvolve。

原文摘要 · Abstract (English)

Optimizing AscendC (Ascend C) operators for Ascend NPUs is difficult for two reasons. First, unlike CUDA, the ecosystem offers few public kernels to learn from. Second, performance depends on a coupled two-part implementation: a host-side tiling program that controls data movement and a kernel program that schedules and pipelines computation. We present AscendOptimizer, an episodic agent that builds missing optimization knowledge from execution itself. For kernel optimization, AscendOptimizer rewinds strong implementations by removing optimizations in a controlled way, then keeps the changes whose removal measurably hurts performance as reusable experience for later rewriting. For host-side optimization, it runs profiling-in-the-loop evolutionary search to find valid, fast tiling and data-movement configurations directly from hardware feedback. This combination lets the agent improve kernel structure and host-side scheduling together. On a benchmark of 101 real AscendC operators, AscendOptimizer achieves a 1.21x geometric-mean speedup over the open-source baseline, and 53.47% of operators run faster than their references. Given a same budget of evaluations per operator, AscendOptimizer consistently outperforms Best-of-N sampling and OpenEvolve in terms of geometric mean speedup, fast_p tail speedup ratios, and overall optimization progress across varying budgets.

NPU优化自动调优昇腾芯片进化搜索

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。