AscendCraft: Automatic Ascend NPU Kernel Generation via DSL-Guided Transcompilation
Zhongzhen Wen, Shudi Shao, Zhong Li, Yu Ge, Tongtong Xu, Yuanyi Lin, Tian Zhang

TL;DR
AscendCraft introduces a DSL-guided method for automatic generation of AscendNPU kernels, significantly improving correctness and performance, and bridging the gap in kernel generation for specialized AI accelerators.
Contribution
It presents a novel DSL-guided transcompilation approach that enables LLMs to generate high-quality AscendC kernels for NPUs, addressing domain-specific challenges.
Findings
Achieves 98.1% compilation success rate.
Attains 90.4% functional correctness.
Generated kernels match or outperform PyTorch eager execution.
Abstract
The performance of deep learning models critically depends on efficient kernel implementations, yet developing high-performance kernels for specialized accelerators remains time-consuming and expertise-intensive. While recent work demonstrates that large language models (LLMs) can generate correct and performant GPU kernels, kernel generation for neural processing units (NPUs) remains largely underexplored due to domain-specific programming models, limited public examples, and sparse documentation. Consequently, directly generating AscendC kernels with LLMs yields extremely low correctness, highlighting a substantial gap between GPU and NPU kernel generation. We present AscendCraft, a DSL-guided approach for automatic AscendC kernel generation. AscendCraft introduces a lightweight DSL that abstracts non-essential complexity while explicitly modeling Ascend-specific execution…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Neural Network Applications · Machine Learning in Materials Science · Parallel Computing and Optimization Techniques
