paper-with-me

Papers

AscendCraft: Automatic Ascend NPU Kernel Generation via DSL-Guided Transcompilation

2026-01-30 · Zhongzhen Wen, Shudi Shao, Zhong Li, Yu Ge, Tongtong Xu, Yuanyi Lin, Tian Zhang arxiv

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 semantics. Kernels are first generated in the DSL using category-specific expert examples and then transcompiled into AscendC through structured, constraint-driven LLM lowering passes. Evaluated on MultiKernelBench across seven operator categories, AscendCraft achieves 98.1% compilation success and 90.4% functional correctness. Moreover, 46.2% of generated kernels match or exceed PyTorch eager execution performance, demonstrating that DSL-guided transcompilation can enable LLMs to generate both correct and competitive NPU kernels. Beyond benchmarks, AscendCraft further demonstrates its generality by successfully generating two correct kernels for newly proposed mHC architecture, achieving performance that substantially surpasses PyTorch eager execution.

📄 PDF Abstract BibTeX arXiv:2601.22760

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

AscendKernelGen: A Systematic Study of LLM-Based Kernel Generation for Neural Processing Units

2026-01-12 · Xinzi Cao, Jianyang Zhai, Pengfei Li, Zhiheng Hu 외 arxiv

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-performan…

Computational EfficiencyReinforcement LearningCode Generation

AgenticCANN: Automated Ascend C Operator Generation via Knowledge-Augmented Agentic Evolution

2026-07-29 · Junhao Qiu, Zidong Wang, Yansong Sun, Zhitong Ma 외 arxiv

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 gener…

AscendOptimizer: Episodic Agent for Ascend NPU Operator Optimization

2026-03-24 · Jiehao Wu, Zixiao Huang, Wenhao Li, Chuyun Shen 외 arxiv

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 implement…

Compiler-Grounded Hierarchical Diagnosis for LLM-Based Triton Kernel Optimization

2026-07-25 · Dongjie Chen, Ping Zhao, Bohua Zhan, Yulong Wang 외 arxiv

Recent advances in large language models (LLMs) have enabled automated kernel generation and optimization, but most existing approaches rely on surface signals such as compilation feedback and profiling metrics. These si…

AMLA: MUL by ADD in FlashAttention Rescaling

2025-09-24 · Qichen Liao, Chengqiu Hu, Fangzheng Miao, Bao Li 외 arxiv

Multi-head Latent Attention (MLA) significantly reduces KVCache memory usage in Large Language Models while introducing substantial computational overhead and intermediate variable expansion. This poses challenges for ef…