Electrical Engineering
      and Computer Sciences

Electrical Engineering and Computer Sciences

COLLEGE OF ENGINEERING

UC Berkeley

Minimizing Communication in Linear Algebra

Grey Ballard, James Demmel, Olga Holtz and Oded Schwartz

EECS Department
University of California, Berkeley
Technical Report No. UCB/EECS-2009-62
May 15, 2009

http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-62.pdf

In 1981 Hong and Kung proved a lower bound on the amount of communication needed to perform dense, matrix-multiplication using the conventional $O(n^3)$ algorithm, where the input matrices were too large to fit in the small, fast memory. In 2004 Irony, Toledo and Tiskin gave a new proof of this result and extended it to the parallel case. In both cases the lower bound may be expressed as $Omega$(#arithmetic operations / $sqrt{M}$), where M is the size of the fast memory (or local memory in the parallel case). Here we generalize these results to a much wider variety of algorithms, including LU factorization, Cholesky factorization, $LDL^T$ factorization, QR factorization, algorithms for eigenvalues and singular values, i.e., essentially all direct methods of linear algebra. The proof works for dense or sparse matrices, and for sequential or parallel algorithms. In addition to lower bounds on the amount of data moved (bandwidth) we get lower bounds on the number of messages required to move it (latency). We illustrate how to extend our lower bound technique to compositions of linear algebra operations (like computing powers of a matrix), to decide whether it is enough to call a sequence of simpler optimal algorithms (like matrix multiplication) to minimize communication, or if we can do better. We give examples of both. We also show how to extend our lower bounds to certain graph theoretic problems.

We point out recently designed algorithms for dense LU, Cholesky, QR, eigenvalue and the SVD problems that attain these lower bounds; implementations of LU and QR show large speedups over conventional linear algebra algorithms in standard libraries like LAPACK and ScaLAPACK. Many open problems remain.


BibTeX citation:

@techreport{Ballard:EECS-2009-62,
    Author = {Ballard, Grey and Demmel, James and Holtz, Olga and Schwartz, Oded},
    Title = {Minimizing Communication in Linear Algebra},
    Institution = {EECS Department, University of California, Berkeley},
    Year = {2009},
    Month = {May},
    URL = {http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-62.html},
    Number = {UCB/EECS-2009-62},
    Abstract = { In 1981 Hong and Kung proved a lower bound on the amount of communication
needed to perform dense, matrix-multiplication using the conventional $O(n^3)$
algorithm, where the input matrices were too large to fit in the small, fast
memory. In 2004 Irony, Toledo and Tiskin gave a new proof of this result and
extended it to the parallel case. In both cases the lower bound may be
expressed as $Omega$(#arithmetic operations / $sqrt{M}$), where M is the
size of the fast memory (or local memory in the parallel case). Here we
generalize these results to a much wider variety of algorithms, including LU
factorization, Cholesky factorization, $LDL^T$ factorization, QR factorization,
algorithms for eigenvalues and singular values, i.e., essentially all direct
methods of linear algebra. The proof works for dense or sparse matrices, and
for sequential or parallel algorithms. In addition to lower bounds on the
amount of data moved (bandwidth) we get lower bounds on the number of messages
required to move it (latency). We illustrate how to extend our lower bound
technique to compositions of linear algebra operations (like computing powers
of a matrix), to decide whether it is enough to call a sequence of simpler
optimal algorithms (like matrix multiplication) to minimize communication, or
if we can do better. We give examples of both. We also show how to extend our
lower bounds to certain graph theoretic problems.

We point out recently designed algorithms for dense LU, Cholesky, QR,
eigenvalue and the SVD problems that attain these lower bounds; implementations
of LU and QR show large speedups over conventional linear algebra algorithms in
standard libraries like LAPACK and ScaLAPACK. Many open problems remain.}
}

EndNote citation:

%0 Report
%A Ballard, Grey
%A Demmel, James
%A Holtz, Olga
%A Schwartz, Oded
%T Minimizing Communication in Linear Algebra
%I EECS Department, University of California, Berkeley
%D 2009
%8 May 15
%@ UCB/EECS-2009-62
%U http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-62.html
%F Ballard:EECS-2009-62