Skip to main content
QUICK REVIEW

[Paper Review] Red-blue pebbling revisited: near optimal parallel matrix-matrix multiplication

Grzegorz Kwaśniewski, Marko Kabić|arXiv (Cornell University)|Aug 26, 2019
Parallel Computing and Optimization TechniquesComputer Science50 references10 citations
TL;DR

COSMA is a near-communication-optimal parallel matrix-matrix multiplication algorithm that derives an optimal sequential schedule using red-blue pebble game abstractions and parallelizes it while preserving I/O optimality. It outperforms ScaLAPACK, CARMA, and CTF by up to 12.8x (2.2x average), achieving up to 88% of peak performance on Piz Daint without manual tuning.

ABSTRACT

We propose COSMA: a parallel matrix-matrix multiplication algorithm that is near communication-optimal for all combinations of matrix dimensions, processor counts, and memory sizes. The key idea behind COSMA is to derive an optimal (up to a factor of 0.03\% for 10MB of fast memory) sequential schedule and then parallelize it, preserving I/O optimality. To achieve this, we use the red-blue pebble game to precisely model MMM dependencies and derive a constructive and tight sequential and parallel I/O lower bound proofs. Compared to 2D or 3D algorithms, which fix processor decomposition upfront and then map it to the matrix dimensions, it reduces communication volume by up to $\sqrt{3}$ times. COSMA outperforms the established ScaLAPACK, CARMA, and CTF algorithms in all scenarios up to 12.8x (2.2x on average), achieving up to 88\% of Piz Daint's peak performance. Our work does not require any hand tuning and is maintained as an open source implementation.

Motivation & Objective

  • Address the limitations of existing parallel matrix-matrix multiplication algorithms that are communication-inefficient for non-square matrices or arbitrary processor counts.
  • Develop a unified algorithm that is I/O-optimal for all combinations of matrix dimensions, processor counts, and memory sizes.
  • Eliminate the need for manual parameter tuning in high-performance matrix multiplication by deriving a constructive, near-optimal schedule.
  • Achieve practical performance gains over established libraries like ScaLAPACK, CARMA, and CTF across diverse workloads and hardware configurations.

Proposed method

  • Use the red-blue pebble game to model data dependencies in matrix-matrix multiplication and derive tight sequential and parallel I/O lower bounds.
  • Construct an optimal sequential schedule by solving the pebbling problem under memory constraints, ensuring minimal I/O for the given memory size.
  • Parallelize the derived sequential schedule while preserving I/O optimality, mapping the computation to any number of processors regardless of power-of-two constraints.
  • Apply algorithmic optimizations including blocked data layout, communication-computation overlap, and one-sided communication to enhance performance.
  • Leverage a constructive proof of the I/O lower bound to ensure the algorithm is within 0.03% of the theoretical minimum for 10MB of fast memory.
  • Implement the algorithm as an open-source library to ensure reproducibility and practical deployment across HPC systems.

Experimental results

Research questions

  • RQ1Can a matrix-matrix multiplication algorithm be both communication-optimal and general-purpose across all matrix dimensions and processor counts?
  • RQ2To what extent can the red-blue pebble game be used to derive constructive, tight I/O lower bounds for parallel algorithms?
  • RQ3How does the performance of a communication-optimal algorithm compare to state-of-the-art libraries like ScaLAPACK, CARMA, and CTF in real-world scenarios?
  • RQ4Can a near-optimal algorithm be implemented without requiring manual tuning of block sizes or processor grid configurations?
  • RQ5What is the practical impact of asymptotic communication optimality on actual runtime and performance on modern supercomputers?

Key findings

  • COSMA reduces communication volume by up to √3 times compared to 2D and 2.5D algorithms, especially benefiting non-square matrices and non-power-of-two processor counts.
  • The algorithm achieves up to 88% of Piz Daint’s peak performance, significantly outperforming ScaLAPACK, CARMA, and CTF across all tested configurations.
  • COSMA delivers a 12.8x speedup over the best-performing existing library in some scenarios and a 2.2x average speedup, demonstrating practical superiority.
  • The algorithm is within 0.03% of the theoretical I/O lower bound for 10MB of fast memory, confirming near-optimality in communication cost.
  • The method is generalizable to other linear algebra kernels such as LU and Cholesky decompositions, and supports multiple memory levels.
  • The open-source implementation eliminates the need for manual tuning, making it production-ready and deployable across diverse HPC environments.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.