Hawk: Harnessing Hardware-Aware Knowledge for High-Performance NPU Kernel Generation
Quick Answer
Hawk is a training-free framework that enhances NPU kernel generation accuracy from 49.4% to 80.0% and achieves up to 2.2x speedup over existing methods by leveraging hardware-aware knowledge through three innovative modules.
Key Points
- Introduces three core modules for hardware-aware NPU kernel generation.
- Run-Time Knowledge Synthesis couples error context with executable semantics.
- Bottleneck-Aware Knowledge Retrieval projects queries into aligned semantic spaces.
- Effect-Driven Knowledge Distillation prunes errors based on execution feedback.
- Real-world evaluations show significant improvements in accuracy and execution speed.
Paper Resources
📖 Reader Mode
~2 min readAbstract:Developing high-performance kernels for Neural Processing Units (NPUs) is a critical industry bottleneck, requiring developers to manually navigate implicit hardware constraints and strict memory hierarchies. While large language models offer immense automation potential, they fail catastrophically on NPUs due to a fundamental lack of hardware-specific priors. Naively transplanting code snippets from similar NPU kernels may pass the compiler, but it consistently triggers runtime crashes and performance degradation by blindly violating underlying hardware constraints. To overcome this, we introduce Hawk, a training-free framework that harnesses hardware-aware knowledge through three core modules: (1) Run-Time Knowledge Synthesis Module, which employs a Triple-Part Executable Knowledge Representation to inherently couple the error context with executable semantics; (2) Bottleneck-Aware Knowledge Retrieval Module, which implements a 2D-Retrieval paradigm to project queries into orthogonal syntactic and hardware-aligned semantic spaces; and (3) Effect-Driven Knowledge Distillation Module, which leverages LLM-driven semantic arbitration to continuously distill the knowledge by pruning errors and consolidating redundancies based on the empirical execution feedback. Extensive evaluations on real-world NPU workloads demonstrate that Hawk elevates generation accuracy from 49.4% to 80.0%, while achieving up to a 2.2x execution speedup over state-of-the-art baselines.
| Subjects: | Artificial Intelligence (cs.AI); Software Engineering (cs.SE) |
| Cite as: | arXiv:2607.01590 [cs.AI] |
| (or arXiv:2607.01590v1 [cs.AI] for this version) | |
| https://doi.org/10.48550/arXiv.2607.01590 arXiv-issued DOI via DataCite (pending registration) |
Submission history
From: Junyi Wen [view email]
[v1]
Thu, 2 Jul 2026 01:41:34 UTC (795 KB)
— Originally published at arxiv.org
Want this in your inbox every morning?
Daily brief at your local 8am — bilingual EN/中文, free.
More from arXiv cs.AI
See more →HOBA: Hierarchical On-Policy Bidding Agents for Adaptive Online Advertising
HOBA (Hierarchical On-policy Bidding Agents) is a novel hierarchical reinforcement learning framework that enhances online advertising bidding systems by improving adaptability and reducing hyperparameter tuning costs. It utilizes a for hyperparameter inference, a SARSA agent for expert model selection, and a dynamic expert pool for bid execution, achieving a +3.6% increase in target cost during large-scale deployment and outperforming state-of-the-art baselines on AuctionNet.