AgenticCANN: Automated Ascend C Operator Generation via Knowledge-Augmented Agentic Evolution
作者: Junhao Qiu, Zidong Wang, Yansong Sun, Zhitong Ma, Ping Guo, Qingfu Zhang
分类: cs.AI
发布日期: 2026-07-29
💡 一句话要点
提出AgenticCANN以解决Ascend C操作符自动生成问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: Ascend C操作符 自动生成 知识增强 代理进化 NPU优化 深度学习 性能提升
📋 核心要点
- Ascend C操作符优化面临的核心问题是缺乏对硬件的深入理解,现有方法无法有效解决这一挑战。
- 本文提出的AgenticCANN框架通过知识增强的代理进化策略,自动生成Ascend C操作符,克服了平台知识缺口。
- 实验结果显示,AgenticCANN在多个操作符上实现了显著的性能提升,尤其在元素级操作符上可行性达到90%至100%。
📝 摘要(中文)
Ascend C操作符优化对NPU(神经处理单元)推理性能至关重要,但需要深厚的硬件专业知识。尽管大型语言模型(LLMs)在自动化CUDA内核生成方面表现出色,但Ascend C的编程模型与之根本不同,带来了尚未探索的独特挑战。本文提出了AgenticCANN,一个知识增强的代理进化框架,专门针对低语料NPU环境中的Ascend C操作符合成。为克服对不熟悉硬件的严重平台知识缺口,AgenticCANN结合了一个知识协调生成系统,提供结构化的多层次领域洞察,以解决上游可行性瓶颈。通过这一基础,它采用了阶段自适应的代理进化策略,动态调整LLM交互模式与特定生成和进化阶段的匹配,平衡高探索候选发现与高收敛性能调优。大量在华为Ascend 910B上的实验表明,我们的方法在元素级和归一化操作符上实现了90%到100%的可行性,在融合操作符上为56%,在1B Pangu模型推理内核上实现了高达6.65倍的加速。
🔬 方法详解
问题定义:本文旨在解决Ascend C操作符的自动生成问题,现有方法在处理不同编程模型时面临知识缺口和可行性瓶颈。
核心思路:AgenticCANN框架通过结合知识增强和代理进化策略,提供结构化的领域知识,帮助生成高效的Ascend C操作符。
技术框架:该框架包括知识协调生成系统和阶段自适应的代理进化策略,前者提供多层次的领域洞察,后者动态调整LLM的交互模式以适应不同的生成和进化阶段。
关键创新:最重要的创新在于知识注入机制的引入,它显著提高了生成操作符的可行性,且其效果在不同操作符上均表现出一致性。
关键设计:在设计中,AgenticCANN采用了多层次的知识注入策略,结合了不同的生成阶段和调优策略,以实现高探索与高收敛的平衡。
🖼️ 关键图片
📊 实验亮点
实验结果表明,AgenticCANN在华为Ascend 910B上对元素级和归一化操作符的可行性达到了90%至100%,在融合操作符上为56%,并在1B Pangu模型推理内核上实现了高达6.65倍的加速,显示出显著的性能提升。
🎯 应用场景
该研究的潜在应用领域包括NPU的高效推理和深度学习模型的优化,尤其是在需要快速生成和优化Ascend C操作符的场景中。未来,AgenticCANN有望推动NPU技术的广泛应用,提升AI推理性能。
📄 摘要(原文)
Ascend C operator optimization is critical for NPU (Neural Processing Unit) inference performance but requires deep hardware expertise.While large language models (LLMs) have shown promise in automated CUDA kernel generation, the fundamentally different programming model of Ascend C introduces unique challenges that remain unexplored. In this paper, we propose AgenticCANN, a knowledge-augmented agentic evolution framework specifically tailored for automated Ascend C operator synthesis in low-corpus NPU environments.To overcome the severe platform knowledge deficit on unfamiliar hardware, AgenticCANN incorporates a knowledge-orchestrated generation system that delivers structured, multi-level domain insights across the development lifecycle to resolve the upstream feasibility bottleneck.Building on this foundation, it features a stage-adaptive agentic evolution strategy that dynamically aligns LLM interaction modes with specific generation and evolution phases, balancing high-exploration candidate discovery with high-convergence performance tuning.Extensive experiments on Huawei Ascend 910B across six operators spanning five pattern categories demonstrate that our method achieves 90 to 100 percent feasibility on elementwise and normalization operators, 56% on fusion operators, and up to 6.65$\times$ speedup on 1B Pangu model inference kernels. Further analysis reveals that knowledge injection monotonically improves feasibility from 57% to 86% on elementwise operators, demonstrating its general rather than operator-specific benefit.