Towards Efficient Multi-Scale Deformable Attention on NPU
arXiv:2505.14022
Abstract
Multi-scale deformable attention (MSDA) is a flexible and powerful feature extraction mechanism for visual tasks, but its random-access grid sampling strategy poses significant optimization challenges, especially on domain-specific accelerators such as NPUs. In this work, we present a co-design approach that systematically rethinks memory access and computation strategies for MSDA on the Ascend NPU architecture. With this co-design approach, our implementation supports both efficient forward and backward computation, is fully adapted for training workloads, and incorporates a suite of hardware-aware optimizations. Extensive experiments show that our solution achieves up to (forward), (backward), and (end-to-end training) speedup over the grid sample-based baseline, and , , and acceleration over the latest vendor library, respectively.
10 pages, 8 figures