English

Towards Efficient Multi-Scale Deformable Attention on NPU

Performance 2025-05-21 v1 Computer Vision and Pattern Recognition

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 5.9×5.9\times (forward), 8.9×8.9\times (backward), and 7.3×7.3\times (end-to-end training) speedup over the grid sample-based baseline, and 1.9×1.9\times, 2.4×2.4\times, and 2.0×2.0\times acceleration over the latest vendor library, respectively.

Keywords

Cite

@article{arxiv.2505.14022,
  title  = {Towards Efficient Multi-Scale Deformable Attention on NPU},
  author = {Chenghuan Huang and Zhigeng Xu and Chong Sun and Chen Li and Ziyang Ma},
  journal= {arXiv preprint arXiv:2505.14022},
  year   = {2025}
}

Comments

10 pages, 8 figures

R2 v1 2026-07-01T02:24:14.634Z