ASaP: Automatic Software Prefetching for Sparse Tensor Computations in MLIR
Paper in proceeding, 2025

Sparse tensor computations suffer from irregular memory access patterns that degrade cache performance. While software prefetching can mitigate this, existing compiler approaches lack the semantic insight needed for effective optimization. We present ASaP, an automatic software prefetching framework integrated within MLIR’s sparse tensor dialect. By leveraging semantic information-tensor formats and loop structure-available during sparsification, ASaP determines accurate buffer bounds and injects prefetches in both innermost and outer loops, achieving broader coverage than prior work. Evaluated on SuiteSparse matrices, ASaP demonstrates significant performance gains for unstructured matrices. For SpMV with innermost-loop prefetching, ASaP achieves 1.38× speedup over Ainsworth & Jones. For SpMM with outer-loop prefetching, ASaP achieves 1.28× speedup while Ainsworth & Jones fails to generate prefetches. Our experiments reveal that disabling inaccurate hardware prefetchers frees critical resources for software prefetching, suggesting future architectures should expose prefetcher control as an optimization interface.

software prefetching

sparse data structures

sparse tensors

Author

Konstantinos Ioannis Sotiropoulos Pesiridis

Chalmers, Computer Science and Engineering (Chalmers), Computer Engineering (Chalmers)

University of Gothenburg

Jonas Skeppstedt

Lund University

Per Stenström

University of Gothenburg

Chalmers, Computer Science and Engineering (Chalmers), Computer Engineering (Chalmers)

Proceedings of 2025 Workshops of the International Conference on High Performance Computing Network Storage and Analysis Sc 2025 Workshops

1017-1027
9798400718717 (ISBN)

2025 Workshops of the International Conference on High Performance Computing, Network, Storage, and Analysis, SC 2025 Workshops
St. Louis, USA,

Subject Categories (SSIF 2025)

Software Engineering

Computer Engineering

Embedded Systems

Information Systems

Computer Systems

DOI

10.1145/3731599.3767477

More information

Latest update

12/15/2025