Towards Efficient Multi-Scale Deformable Attention on NPU

Chenghuan Huang, Zhigeng Xu, Chong Sun, Chen Li, Ziyang Ma
5/20/2025
cs.PFcs.CV

No confident code implementation found for this paper.

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.

Show full abstract

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

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{huang2025towards,
  title  = {Towards Efficient Multi-Scale Deformable Attention on NPU},
  author = {Chenghuan Huang and Zhigeng Xu and Chong Sun and Chen Li and Ziyang Ma},
  year   = {2025},
  eprint = {2505.14022},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.14022v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.14022.svg)](https://codeofpaper.com/paper/2505.14022)

Discussion