🤖 AI Summary
Existing NPU low-level programming faces a trade-off between high development costs of low-level tools and excessive abstraction in high-level tools, which forfeits critical optimizations. Method: This paper introduces IRON—a next-generation near-metal programming interface—featuring a unified programming abstraction that balances efficiency, expressiveness, and extensibility; a novel modular, pluggable placement-and-tiling toolchain architecture; and integrated techniques including domain-specific IR interfaces, Halstead-complexity-driven code simplification, NPU hardware-coordinated modeling, and dataflow graph layout optimization. Contribution/Results: IRON reduces average code size by 26% and significantly lowers Halstead complexity while maintaining full backward compatibility with prior IRON functionality. It supports multiple mainstream AI acceleration paradigms and substantially improves NPU performance engineering productivity.
📝 Abstract
Accelerators such as neural processing units (NPUs) deliver an enticing balance of performance and efficiency compared to general purpose compute architectures. However, effectively leveraging accelerator capabilities is not always simple: low-level programming toolkits may require substantial developer effort while high-level programming toolkits may abstract critical optimization features. This work aims to increase efficiency of designers using IRON, a toolkit for close-to-metal NPU performance engineers. We provide an updated programmer interface to IRON containing new and refined programming constructs. The new interface includes extensible features for placement and data transformation. These contributions are evaluated in terms of 1) efficiency, with analysis showing ~26% average reduction in lines of code and decreases in Halstead metrics for a variety of designs; 2) expressivity, demonstrating the new interface supports the wide range of features and patterns already supported by IRON; and 3) extensibility, illustrating the new tooling for placement and tiling can be extended to accommodate common use-cases.