Parallel Scan on Ascend AI accelerators

We design and implement parallel prefix sum (scan) algorithms using Ascend AI accelerators. Ascend accelerators feature specialized computing units—the Cube units for efficient matrix multiplication and the Vector units for optimized vector operations. A key feature of the proposed scan algorithms is their extensive use of matrix multiplications and accumulations enabled by the Cube unit. Our single-core results demonstrate substantial performance improvements, with speedups ranging from 5 × to 9.6 × compared to vector-only implementations for sufficiently large input lengths. Additionally, we present a multi-core scan algorithm that efficiently utilizes both the Cube and Vector units of Ascend, reaching up to 74.9% of the memory bandwidth achieved by memory copy. To showcase the effectiveness of matrix-multiplication-based scans as a fast primitive in AI workloads, we implemented several scan-based operators like split, compress, radix sort, and top- k / top- p sampling, obtaining up to 3.3 × and 2.3 × speedup compared to the vector-only kernels on radix-sort and top- p respectively. Finally, we show how these optimized kernels can impact Large Language Models on the Ascend NPUs obtaining 2.02 × speed-up on state-space neural networks like Mamba, and up to 1.47 × on LLMs with large vocabulary sizes thanks to more efficient top-p token sampling. The source code is available at https://github.com/huawei-csl/pytorch-tcuscan.

Authors

Institutions

Publication Details

Journal
ACM Transactions on Architecture and Code Optimization
Published
2026-11-26
DOI
https://doi.org/10.1145/3872175
Primary Topic
Parallel Computing and Optimization Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

Parallel Scan on Ascend AI accelerators

Anastasios Zouzias, Bartłomiej Wróblewski, Gioele Gottardo
ACM Transactions on Architecture and Code Optimization
Parallel Computing and Optimization Techniques
article

Parallel Scan on Ascend AI accelerators

Anastasios Zouzias, Bartłomiej Wróblewski, Gioele Gottardo
article en

Abstract

We design and implement parallel prefix sum (scan) algorithms using Ascend AI accelerators. Ascend accelerators feature specialized computing units—the Cube units for efficient matrix multiplication and the Vector units for optimized vector operations. A key feature of the proposed scan algorithms is their extensive use of matrix multiplications and accumulations enabled by the Cube unit. Our single-core results demonstrate substantial performance improvements, with speedups ranging from 5 × to 9.6 × compared to vector-only implementations for sufficiently large input lengths. Additionally, we present a multi-core scan algorithm that efficiently utilizes both the Cube and Vector units of Ascend, reaching up to 74.9% of the memory bandwidth achieved by memory copy. To showcase the effectiveness of matrix-multiplication-based scans as a fast primitive in AI workloads, we implemented several scan-based operators like split, compress, radix sort, and top- k / top- p sampling, obtaining up to 3.3 × and 2.3 × speedup compared to the vector-only kernels on radix-sort and top- p respectively. Finally, we show how these optimized kernels can impact Large Language Models on the Ascend NPUs obtaining 2.02 × speed-up on state-space neural networks like Mamba, and up to 1.47 × on LLMs with large vocabulary sizes thanks to more efficient top-p token sampling. The source code is available at https://github.com/huawei-csl/pytorch-tcuscan.

ACM Transactions on Architecture and Code Optimization
Huawei Technologies (China) (CN), Huawei Technologies (United States) (US), Huawei Technologies (United Kingdom) (GB)
Parallel Computing and Optimization Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon
Parallel Scan on Ascend AI accelerators — Anastasios Zouzias, Bartłomiej Wróblewski, et al. · ACM Transactions on Architecture and Code Optimization (2026) | TGRS Research Map | TGRS