Parallel Scan on Ascend AI Accelerators

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Wróblewski, Bartłomiej, Gottardo, Gioele, Zouzias, Anastasios
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911349233156096
author Wróblewski, Bartłomiej
Gottardo, Gioele
Zouzias, Anastasios
author_facet Wróblewski, Bartłomiej
Gottardo, Gioele
Zouzias, Anastasios
contents 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. To showcase the effectiveness of these algorithms, we also implement and evaluate several scan-based operators commonly used in AI workloads, including sorting, tensor masking, and top-$k$ / top-$p$ sampling. Our single-core results demonstrate substantial performance improvements, with speedups ranging from $5\times$ to $9.6\times$ compared to vector-only implementations for sufficiently large input lengths. Additionally, we present a multi-core scan algorithm that fully utilizes both the cube and vector units of Ascend, reaching up to 74.9\% of the memory bandwidth achieved by memory copy. Furthermore, our radix sort implementation, which utilizes matrix multiplications for its parallel splits, showcases the potential of matrix engines to enhance complex operations, offering up to $3.3\times$ speedup over the vector-only baseline.
format Preprint
id arxiv_https___arxiv_org_abs_2505_15112
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Parallel Scan on Ascend AI Accelerators
Wróblewski, Bartłomiej
Gottardo, Gioele
Zouzias, Anastasios
Distributed, Parallel, and Cluster Computing
Data Structures and Algorithms
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. To showcase the effectiveness of these algorithms, we also implement and evaluate several scan-based operators commonly used in AI workloads, including sorting, tensor masking, and top-$k$ / top-$p$ sampling. Our single-core results demonstrate substantial performance improvements, with speedups ranging from $5\times$ to $9.6\times$ compared to vector-only implementations for sufficiently large input lengths. Additionally, we present a multi-core scan algorithm that fully utilizes both the cube and vector units of Ascend, reaching up to 74.9\% of the memory bandwidth achieved by memory copy. Furthermore, our radix sort implementation, which utilizes matrix multiplications for its parallel splits, showcases the potential of matrix engines to enhance complex operations, offering up to $3.3\times$ speedup over the vector-only baseline.
title Parallel Scan on Ascend AI Accelerators
topic Distributed, Parallel, and Cluster Computing
Data Structures and Algorithms
url https://arxiv.org/abs/2505.15112