On the parallel I/O optimality of linear algebra kernels: near-optimal matrix factorizations

Grzegorz Kwasniewski, Marko Kabic, Tal Ben-Nun, Alexandros Nikolaos Ziogas, Jens Eirik Saethre, André Gaillard, Timo Schneider, Maciej Besta, Anton Kozhevnikov, Joost VandeVondele, Torsten Hoefler

TL;DR

Researchers from ETH Zurich have developed new parallel algorithms for LU and Cholesky matrix factorizations—COnfLUX and COnfCHOX—that achieve near-theoretical minimum data movement. By combining a rigorous new framework for I/O lower bounds with clever techniques like row-masking tournament pivoting, these algorithms outperform state-of-the-art libraries (like Intel MKL and SLATE) by up to 3x in time-to-solution.

What Problem Does This Paper Address?

In high-performance computing (HPC), matrix factorizations are the bread and butter of scientific simulations, from quantum physics to climate modeling. While these operations are traditionally considered "compute-bound," the "memory wall" has changed the game. Moving data between processors (I/O) now costs significantly more in time and energy than performing the actual math.

Existing "communication-optimal" algorithms (often called 2.5D algorithms) exist, but they suffer from two major flaws:

  1. Asymptotic vs. Practical: They are only optimal in a "big-O" sense. In practice, their communication overhead can be 7 to 16 times higher than the theoretical lower bound, meaning they only become faster than standard 2D libraries at massive, often prohibitive, processor counts.
  2. Pivoting Overheads: In LU factorization, "pivoting" (swapping rows to maintain numerical stability) creates massive data movement that often negates the benefits of 2.5D layouts.

Methods

The authors tackle this using a two-pronged approach:

  • A New Theoretical Framework: They introduce a method to derive precise (not just asymptotic) I/O lower bounds for a class of programs called Disjoint Array Access Programs (DAAP). They use computational Directed Acyclic Graphs (cDAGs) and the "red-blue pebble game" to prove exactly how much data must be moved for a given memory size.
  • COnfLUX and COnfCHOX Algorithms: Based on these bounds, they designed new algorithms using a 2.5D decomposition. This involves replicating data across extra memory to parallelize the "reduction" dimension of the computation.
  • Row-Masking Tournament Pivoting: To solve the LU pivoting problem, they use "tournament pivoting" combined with "row-masking." Instead of physically swapping rows across the network (which is expensive), they propagate indices and use masks to determine which rows to process. This keeps the communication cost at just 1.5x the theoretical lower bound.

Datasets

As this is a systems and algorithms paper, "datasets" refer to the matrix benchmarks used for evaluation:

  • Matrix Sizes: Ranging from small ($2,048 \times 2,048$) to large ($524,288 \times 524,288$).
  • Hardware: The Piz Daint supercomputer (Cray XC40), using up to 512 CPU nodes (1,024 MPI ranks).
  • Comparison Targets: Intel MKL (vendor-optimized), SLATE (exascale-targeted), and previous 2.5D libraries like CANDMC and CAPITAL.

Key Insights and Ideas

  • The "15,000 Processor" Gap: The authors point out that previous 2.5D LU algorithms were so inefficient that they required over 15,000 processors just to break even with a well-optimized 2D algorithm. Their goal was to make 2.5D beneficial at much smaller scales.
  • Tight Constants Matter: By focusing on the constant factors in the communication cost (e.g., $1.5 \times$ the bound vs $7 \times$), they moved 2.5D algorithms from theoretical curiosities to practical tools.
  • ScaLAPACK Compatibility: Unlike many research prototypes, their code is designed to be a drop-in replacement for ScaLAPACK-compatible libraries, making it immediately useful for existing scientific codes.

Key Results

  • Communication Reduction: COnfLUX reduces communication volume by up to 1.6x compared to the next best implementation.
  • Speedup: The algorithms achieved up to a 3x reduction in time-to-solution for LU factorization and 1.8x for Cholesky compared to SLATE and Intel MKL.
  • Efficiency: COnfLUX achieves a high percentage of hardware peak performance even on relatively small matrices where 2.5D overheads usually dominate.
  • Scalability: The implementations showed excellent strong and weak scaling, maintaining their lead as the number of nodes increased.

Limitations and Future Work

  • Latency vs. Bandwidth: While the algorithms minimize the volume of data (bandwidth), the 2.5D layout increases the number of communication steps (latency). For very small local matrix chunks, this latency can become the new bottleneck.
  • Auto-tuning: The performance depends on choosing the right block sizes and "depth" of the 2.5D replication. While the paper provides heuristics, a fully automated tuning mechanism for different architectures would be a natural next step.
  • Heterogeneous Hardware: The current work focuses on CPUs. Extending these near-optimal schedules to GPU-heavy systems (where the compute-to-communication ratio is even more extreme) is a promising future direction.

Summary updated

BibTeX
@inproceedings{kwasniewski2021parallel,
  author = {Grzegorz Kwasniewski and Marko Kabic and Tal Ben-Nun and Alexandros Nikolaos Ziogas and Jens Eirik Saethre and André Gaillard and Timo Schneider and Maciej Besta and Anton Kozhevnikov and Joost VandeVondele and Torsten Hoefler},
  title = {{On the parallel I/O optimality of linear algebra kernels: near-optimal matrix factorizations}},
  booktitle = {SC},
  year = {2021},
  doi = {10.1145/3458817.3476167},
}

Loading related content...

Figure