NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Communication-Avoiding and Memory-Constrained Sparse Matrix-Matrix Multiplication at Extreme Scale

Md Taufique Hussain, Oguz Selvitopi, Aydin Buluç, Ariful Azad

Abstract

This paper introduces a new distributed-memory algorithm for Sparse Matrix-Matrix Multiplication (SpGEMM) that scales to over 260,000 cores. By combining communication-avoiding 3D process grids with a novel batching strategy and "sort-free" local kernels, the authors enable the multiplication of massive matrices that would otherwise exceed the total memory of even the world's largest supercomputers.

Introduction

Sparse Matrix-Matrix Multiplication (SpGEMM) is a fundamental building block for graph analytics, bioinformatics, and machine learning. However, at "extreme scale"—using hundreds of thousands of processors—it hits two major walls: communication bottlenecks and memory constraints. Moving data between thousands of nodes often takes much longer than the actual computation. Furthermore, in many real-world applications like protein similarity networks, the output matrix can be significantly larger than the input matrices combined, sometimes exceeding the aggregate RAM of the entire supercomputer. Existing algorithms either scale poorly or crash when they run out of memory. This work presents an algorithm that is both communication-avoiding and memory-constrained.

Methodology

The solution is built upon the 3D SUMMA algorithm, which reduces communication by replicating input data across a 3D grid of processors. Key innovations include:

  • Batched Execution: Instead of computing the whole output at once, the algorithm divides the output into $b$ batches of columns. This allows the system to compute, process (e.g., prune or save to disk), and discard pieces of the output, keeping the memory footprint manageable.
  • Distributed Symbolic Step: Before the actual multiplication, a lightweight "symbolic" pass estimates memory requirements. This step automatically determines the optimal number of batches needed to ensure no processor runs out of memory.
  • Sort-Free Local Kernels: Standard SpGEMM algorithms spend significant time sorting nonzeros within columns. The authors developed new local multiplication and merging routines using hash tables instead of heaps, making local computation up to 5–8x faster by avoiding unnecessary sorting.
Visual representation of the 3D SpGEMM algorithm showing layers, batches, and the progression from local multiplication to final merged output.

Evaluation and Datasets

The algorithm was evaluated using several large-scale real-world matrices:

  • Bioinformatics: Protein similarity networks including Eukarya, Isolates, and the massive Metaclust50 (282M rows/columns).
  • Social Networks: The Friendster network (66M nodes).
  • Synthetic/Specialized: Rice-kmers for genomic sequence overlapping and Metaclust20m.

The experiments involved generating trillions of nonzeros, with some multiplications requiring up to 300 trillion floating-point operations.

Discussion: Key Insights

The synergy of 3D grids and batching is a core insight. While 3D algorithms are typically seen as memory-hungry due to data replication, this work shows they provide the necessary structure for efficient batching. This effectively trades a small amount of redundant communication for the ability to handle much larger problems. Additionally, the move to sort-free hash-based local kernels removes a major computational bottleneck, with sorting only performed at the final stage if required by the application. The dynamic adaptation provided by the symbolic step is crucial for robustness across unpredictable sparse matrix densities.

Key Results

The algorithm successfully scaled to 262,144 cores (over 1 million hardware threads) on the Cray XC40 "Cori" supercomputer. When multiplying large protein-similarity matrices, it ran 10x faster than previous state-of-the-art methods as it scaled from 16k to 262k cores. Memory efficiency was demonstrated by multiplying matrices that would have required 2.2 Petabytes of memory using only 0.5 PB of actual hardware RAM. In some cases, super-linear speedup was observed because increasing node counts reduced the number of batches needed.

Breakdown of execution time across iterations, illustrating how the symbolic step dynamically adjusts the number of batches (b) to balance symbolic, communication, and computation costs.

Conclusion and Future Work

While the algorithm handles memory constraints effectively, load balancing remains a challenge, particularly for matrices with highly clustered nonzeros. Future work includes adapting "sort-free" hash kernels for GPU acceleration, exploring 2D tiling for batches to further reduce communication, and developing more sophisticated load balancing techniques for the 3D grid.

Summary updated

BibTeX
@inproceedings{hussain2020communication,
  author = {Md Taufique Hussain and Oguz Selvitopi and Aydin Buluç and Ariful Azad},
  title = {{Communication-Avoiding and Memory-Constrained Sparse Matrix-Matrix Multiplication at Extreme Scale}},
  booktitle = {IPDPS},
  year = {2020},
  doi = {10.1109/ipdps49936.2021.00018},
}
Figure