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

Communication-avoiding parallel and sequential QR factorizations

James Demmel, Laura Grigori, Mark Hoemmen, Julien LangouarXiv 2008

Abstract

We present parallel and sequential dense QR factorization algorithms that are both optimal (up to polylogarithmic factors) in the amount of communication they perform, and just as stable as Householder QR. Our first algorithm, Tall Skinny QR (TSQR), factors m-by-n matrices in a one-dimensional (1-D) block cyclic row layout, and is optimized for m >> n. Our second algorithm, CAQR (Communication-Avoiding QR), factors general rectangular matrices distributed in a two-dimensional block cyclic layout. It invokes TSQR for each block column factorization.

Introduction: The Communication Bottleneck

In modern high-performance computing, the cost of floating-point operations (flops) has plummeted, while the cost of moving data—both in terms of bandwidth and latency—has become the primary bottleneck. This "communication gap" renders traditional algorithms, such as those found in LAPACK and ScaLAPACK, increasingly inefficient on modern architectures. These standard routines often perform QR factorization column-by-column, leading to excessive synchronization and data movement.

To address this, we introduce two algorithms designed to minimize communication to theoretical lower bounds: Tall Skinny QR (TSQR) and Communication-Avoiding QR (CAQR).

Tall Skinny QR (TSQR)

TSQR is specifically designed for "tall and skinny" matrices where the number of rows ($m$) significantly exceeds the number of columns ($n$). Traditional Householder QR requires $O(n \log P)$ messages in a parallel environment. TSQR restructures the factorization as a tree-reduction operation. By partitioning the matrix into block rows and performing local QR factorizations followed by a reduction of the $R$ factors, TSQR reduces the message count to $O(\log P)$.

Table 1: Comparison of communication complexity for TSQR, ScaLAPACK (PDGEQRF), and theoretical lower bounds for tall skinny matrices.

This approach is not only faster but also maintains the numerical stability of Householder QR, unlike other fast methods like CholeskyQR or classical Gram-Schmidt which can lose orthogonality in ill-conditioned cases.

Communication-Avoiding QR (CAQR)

For general rectangular matrices, we propose CAQR. This algorithm utilizes a 2D block cyclic layout and employs TSQR as a subroutine for panel factorizations. By replacing the standard panel factorization with the communication-optimal TSQR, CAQR overcomes the latency bottlenecks inherent in ScaLAPACK's PDGEQRF routine.

Table 2: Comparison of communication complexity for CAQR, ScaLAPACK (PDGEQRF), and theoretical lower bounds for general rectangular matrices.

Mathematical modeling proves that CAQR is optimal (up to polylogarithmic factors) for both bandwidth and latency across general matrix distributions.

Performance and Results

The effectiveness of these algorithms has been demonstrated across various hardware platforms using synthetic dense matrices:

  • Parallel TSQR: Achieved a 6.7x speedup on a 16-processor Pentium III cluster and a 4x speedup on a 32-processor BlueGene/L system compared to ScaLAPACK.
  • Sequential TSQR: In out-of-core scenarios (where the matrix exceeds RAM), TSQR effectively hides I/O costs, running only 2x slower than a theoretical machine with infinite RAM.
  • CAQR Projections: Performance models for CAQR predict significant speedups over ScaLAPACK, reaching up to 22.9x on Petascale machines where latency costs are most dominant.

Conclusion

By prioritizing the minimization of data movement over the minimization of flops, TSQR and CAQR represent a shift toward communication-optimal numerical linear algebra. These algorithms provide a path forward for scaling fundamental matrix operations to the next generation of massively parallel and memory-constrained computing systems.

Summary updated

BibTeX
@misc{demmel2008communication,
  author = {James Demmel and Laura Grigori and Mark Hoemmen and Julien Langou},
  title = {{Communication-avoiding parallel and sequential QR factorizations}},
  year = {2008},
  eprint = {0806.2159},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/0806.2159},
}
Figure