MAGNUS: Generating Data Locality to Accelerate Sparse Matrix-Matrix Multiplication on CPUs

Sparse general matrix-matrix multiplication (SpGEMM) is a critical operation in many applications.Current multithreaded implementations are based on Gustavson's algorithm and often perform poorly on large matrices due to limited cache reuse by the accumulators.We present MAGNUS (Matrix Algebra for Gigantic NUmerical Systems), a novel algorithm to maximize data locality in SpGEMM.To generate locality, MAGNUS reorders the intermediate product into discrete cache-friendly chunks using a two-level hierarchical approach.The accumulator is applied to each chunk, where the chunk size is chosen such that the accumulator is cacheefficient.MAGNUS is input-and system-aware: based on the matrix characteristics and target system specifications, the optimal number of chunks is computed by minimizing the storage cost of the necessary data structures.MAGNUS allows for a hybrid accumulation strategy in which each chunk uses a different accumulator based on an input threshold.We consider two accumulators: an AVX-512 vectorized bitonic sorting algorithm and classical dense accumulation.An OpenMP implementation of MAGNUS is compared with several baselines, including Intel MKL, for a variety of different matrices on three Intel architectures.For matrices from the SuiteSparse collection, MAGNUS is faster than all the baselines in most cases and is often an order of magnitude faster than at least one baseline.For massive random matrices, MAGNUS scales to the largest matrix sizes, while the baselines do not.Furthermore, MAGNUS is close to the optimal bound for these matrices, regardless of the matrix size, structure, and density.

Authors

Institutions

Publication Details

Published
2025-06-08
DOI
https://doi.org/10.1145/3721145.3725773
Citations
1
Primary Topic
Parallel Computing and Optimization Techniques
Type
article
Field-Weighted Citation Impact
2.27
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

MAGNUS: Generating Data Locality to Accelerate Sparse Matrix-Matrix Multiplication on CPUs

Jan Laukemann, Fabrizio Petrini, Jordi Wolfson-Pou
1 citations
Parallel Computing and Optimization Techniques
2.27
article

MAGNUS: Generating Data Locality to Accelerate Sparse Matrix-Matrix Multiplication on CPUs

Jan Laukemann, Fabrizio Petrini, Jordi Wolfson-Pou
article en
1 citations

Abstract

Sparse general matrix-matrix multiplication (SpGEMM) is a critical operation in many applications.Current multithreaded implementations are based on Gustavson's algorithm and often perform poorly on large matrices due to limited cache reuse by the accumulators.We present MAGNUS (Matrix Algebra for Gigantic NUmerical Systems), a novel algorithm to maximize data locality in SpGEMM.To generate locality, MAGNUS reorders the intermediate product into discrete cache-friendly chunks using a two-level hierarchical approach.The accumulator is applied to each chunk, where the chunk size is chosen such that the accumulator is cacheefficient.MAGNUS is input-and system-aware: based on the matrix characteristics and target system specifications, the optimal number of chunks is computed by minimizing the storage cost of the necessary data structures.MAGNUS allows for a hybrid accumulation strategy in which each chunk uses a different accumulator based on an input threshold.We consider two accumulators: an AVX-512 vectorized bitonic sorting algorithm and classical dense accumulation.An OpenMP implementation of MAGNUS is compared with several baselines, including Intel MKL, for a variety of different matrices on three Intel architectures.For matrices from the SuiteSparse collection, MAGNUS is faster than all the baselines in most cases and is often an order of magnitude faster than at least one baseline.For massive random matrices, MAGNUS scales to the largest matrix sizes, while the baselines do not.Furthermore, MAGNUS is close to the optimal bound for these matrices, regardless of the matrix size, structure, and density.

Intel (United States) (US), Friedrich-Alexander-Universität Erlangen-Nürnberg (DE)
Openalex Percentile: Top 12%
Parallel Computing and Optimization Techniques
2.27
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.

MAGNUS: Generating Data Locality to Accelerate Sparse Matrix-Matrix Multiplication on CPUs — Jan Laukemann, Fabrizio Petrini, et al. · (2025) | TGRS Research Map | TGRS