Salvato in:
Dettagli Bibliografici
Autori principali: Cao, Xinzi, Zhai, Jianyang, Li, Pengfei, Hu, Zhiheng, Yan, Cen, Mu, Bingxu, Fang, Guanghuan, She, Bin, Li, Jiayu, Su, Yihan, Tao, Dongyang, Huang, Xiansong, Xu, Fan, Yang, Feidiao, Lu, Yao, Wang, Chang-Dong, Lu, Yutong, Xue, Weicheng, Zhou, Bin, Tian, Yonghong
Natura: Preprint
Pubblicazione: 2026
Soggetti:
Accesso online:https://arxiv.org/abs/2601.07160
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866917415050280960
author Cao, Xinzi
Zhai, Jianyang
Li, Pengfei
Hu, Zhiheng
Yan, Cen
Mu, Bingxu
Fang, Guanghuan
She, Bin
Li, Jiayu
Su, Yihan
Tao, Dongyang
Huang, Xiansong
Xu, Fan
Yang, Feidiao
Lu, Yao
Wang, Chang-Dong
Lu, Yutong
Xue, Weicheng
Zhou, Bin
Tian, Yonghong
author_facet Cao, Xinzi
Zhai, Jianyang
Li, Pengfei
Hu, Zhiheng
Yan, Cen
Mu, Bingxu
Fang, Guanghuan
She, Bin
Li, Jiayu
Su, Yihan
Tao, Dongyang
Huang, Xiansong
Xu, Fan
Yang, Feidiao
Lu, Yao
Wang, Chang-Dong
Lu, Yutong
Xue, Weicheng
Zhou, Bin
Tian, Yonghong
contents To meet the ever-increasing demand for computational efficiency, Neural Processing Units (NPUs) have become critical in modern AI infrastructure. However, unlocking their full potential requires developing high-performance compute kernels using vendor-specific Domain-Specific Languages (DSLs), a task that demands deep hardware expertise and is labor-intensive. While Large Language Models (LLMs) have shown promise in general code generation, they struggle with the strict constraints and scarcity of training data in the NPU domain. Our preliminary study reveals that state-of-the-art general-purpose LLMs fail to generate functional complex kernels for Ascend NPUs, yielding a near-zero success rate. To address these challenges, we propose AscendKernelGen, a generation-evaluation integrated framework for NPU kernel development. We introduce Ascend-CoT, a high-quality dataset incorporating chain-of-thought reasoning derived from real-world kernel implementations, and KernelGen-LM, a domain-adaptive model trained via supervised fine-tuning and reinforcement learning with execution feedback. Furthermore, we design NPUKernelBench, a comprehensive benchmark for assessing compilation, correctness, and performance across varying complexity levels. Experimental results demonstrate that our approach significantly bridges the gap between general LLMs and hardware-specific coding. Specifically, the compilation success rate on complex Level-2 kernels improves from 0% to 95.5% (Pass@10), while functional correctness achieves 64.3% compared to the baseline's complete failure. These results highlight the critical role of domain-specific reasoning and rigorous evaluation in automating accelerator-aware code generation. AscendKernGen is available at https://huggingface.co/AscendKernelGen and https://github.com/weich97/NPUKernelBench.
format Preprint
id arxiv_https___arxiv_org_abs_2601_07160
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle AscendKernelGen: A Systematic Study of LLM-Based Kernel Generation for Neural Processing Units
Cao, Xinzi
Zhai, Jianyang
Li, Pengfei
Hu, Zhiheng
Yan, Cen
Mu, Bingxu
Fang, Guanghuan
She, Bin
Li, Jiayu
Su, Yihan
Tao, Dongyang
Huang, Xiansong
Xu, Fan
Yang, Feidiao
Lu, Yao
Wang, Chang-Dong
Lu, Yutong
Xue, Weicheng
Zhou, Bin
Tian, Yonghong
Artificial Intelligence
Machine Learning
To meet the ever-increasing demand for computational efficiency, Neural Processing Units (NPUs) have become critical in modern AI infrastructure. However, unlocking their full potential requires developing high-performance compute kernels using vendor-specific Domain-Specific Languages (DSLs), a task that demands deep hardware expertise and is labor-intensive. While Large Language Models (LLMs) have shown promise in general code generation, they struggle with the strict constraints and scarcity of training data in the NPU domain. Our preliminary study reveals that state-of-the-art general-purpose LLMs fail to generate functional complex kernels for Ascend NPUs, yielding a near-zero success rate. To address these challenges, we propose AscendKernelGen, a generation-evaluation integrated framework for NPU kernel development. We introduce Ascend-CoT, a high-quality dataset incorporating chain-of-thought reasoning derived from real-world kernel implementations, and KernelGen-LM, a domain-adaptive model trained via supervised fine-tuning and reinforcement learning with execution feedback. Furthermore, we design NPUKernelBench, a comprehensive benchmark for assessing compilation, correctness, and performance across varying complexity levels. Experimental results demonstrate that our approach significantly bridges the gap between general LLMs and hardware-specific coding. Specifically, the compilation success rate on complex Level-2 kernels improves from 0% to 95.5% (Pass@10), while functional correctness achieves 64.3% compared to the baseline's complete failure. These results highlight the critical role of domain-specific reasoning and rigorous evaluation in automating accelerator-aware code generation. AscendKernGen is available at https://huggingface.co/AscendKernelGen and https://github.com/weich97/NPUKernelBench.
title AscendKernelGen: A Systematic Study of LLM-Based Kernel Generation for Neural Processing Units
topic Artificial Intelligence
Machine Learning
url https://arxiv.org/abs/2601.07160