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

超越经验:面向NPU内核生成的知识引导进化

Beyond Experience: Knowledge-Guided Evolution for NPU Kernel Generation

Shenzhen Loop Area Institute (SLAI)(深圳环区研究所(SLAI));Guangzhou University(广州大学);Shanghai Jiao Tong University(上海交通大学);Southwestern University of Finance and Economics(西南财经大学);The Chinese University of Hong Kong, Shenzhen(香港中文大学(深圳))

Xi Chen, Ming Shen, Haotian Yan, Ruoyu Sun, Tianjun Yao

AI总结:

针对现有NPU智能体仅靠经验生成内核的不足,提出知识引导的ASCENDEVOLVE方法,在53个昇腾C算子上较基线方法提升了11.6%至17.2%的性能。

摘要:

大语言模型智能体已能成为主流GPU栈上的内核工程师,但在昇腾NPU等新兴加速器上表现不佳,这类加速器的编程模型几乎未在预训练数据中体现。现有NPU智能体主要通过经验弥补这一差距:它们从自身的生成与优化试错中积累记忆,并在后续任务中复用。但我们认为仅靠经验不足以完成内核生成,智能体只能记住自己尝试过的内容,且很少尝试未知机制,因此当新算子需要不同机制时,这类记忆帮助有限,甚至熟悉的算子在优化过程中也会出现未见过的情况。我们提出ASCENDEVOLVE,它将进化内核搜索的每一步都建立在由平台文档、工具包头文件和算子仓库构建的大型外部知识库之上。由于该语料库远超任何上下文窗口,ASCENDEVOLVE对其进行索引,将每个智能体引导至任务特定的小片段证据而非整个语料库。检索到的知识可生成多样的实现策略、在候选失败时指导修复,并约束强候选的重组方式。在来自CANN-Bench的53个昇腾C算子(覆盖四个难度等级)上,ASCENDEVOLVE的总得分达71.39,较Reflexion和OpenEvolve分别提升11.6%和17.2%。

英文摘要:

LLM agents have become capable kernel engineers on mainstream GPU stacks, but they struggle on emerging accelerators such as Ascend NPUs, whose programming model is barely represented in pretraining data. Recent NPU agents address this gap largely through experience: they accumulate memory from their own generation and optimization trials and reuse it on later tasks. We argue that experience alone is not enough for kernel generation. An agent can only remember what it has tried, and it rarely tries a mechanism it does not know. As a result, such memory offers little help when a new operator calls for a different mechanism, and even familiar operators raise unseen situations as optimization proceeds. We present ASCENDEVOLVE, which grounds every step of an evolutionary kernel search in a large external knowledge base built from platform documentation, toolkit headers, and operator repositories. Because this corpus far exceeds any context window, ASCENDEVOLVE indexes it and routes each agent to a small, task-specific slice of evidence instead of the corpus itself. The retrieved knowledge seeds diverse implementation strategies, guides repair when a candidate fails, and constrains how strong candidates are recombined. On 53 Ascend C operators from CANN-Bench spanning four difficulty levels, ASCENDEVOLVE achieves an overall score of 71.39, improving over Reflexion and OpenEvolve by 11.6% and 17.2%.

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

↑