# Communication Lower Bounds and Optimal Algorithms for Programs That Reference Arrays - Part 1

### http://www2.eecs.berkeley.edu/Pubs/TechRpts/2013/EECS-2013-61.pdf

Communication, i.e., moving data, between levels of a memory hierarchy or between parallel processors on a network, can greatly dominate the cost of computation, so algorithms that minimize communication can run much faster (and use less energy) than algorithms that do not. Motivated by this, attainable communication lower bounds were established in [12, 13, 4] for a variety of algorithms including matrix computations. The lower bound approach used initially in  for Θ( N 3) matrix multiplication, and later in  for many other linear algebra algorithms, depended on a geometric result by Loomis and Whitney : this result bounded the volume of a 3D set (representing multiply-adds done in the inner loop of the algorithm) using the product of the areas of certain 2D projections of this set (representing the matrix entries available locally, i.e., without communication). Using a recent generalization of Loomis’ and Whitney’s result, we generalize this lower bound approach to a much larger class of algorithms, that may have arbitrary numbers of loops and arrays with arbitrary dimensions, as long as the index expressions are affine combinations of loop variables. In other words, the algorithm can do arbitrary operations on any number of variables like A( i 1, i 2, i 2 − 2 i 1, 3 − 4 i 3 + 7 i 4, . . .). Moreover, the result applies to recursive programs, irregular iteration spaces, sparse matrices, and other data structures as long as the computation can be logically mapped to loops and indexed data structure accesses. We also discuss when optimal algorithms exist that attain the lower bounds; this leads to new asymptotically faster algorithms for several problems.

BibTeX citation:

```@techreport{Christ:EECS-2013-61,
Author = {Christ, Michael and Demmel, James and Knight, Nicholas and Scanlon, Thomas and Yelick, Katherine A.},
Title = {Communication Lower Bounds and Optimal Algorithms for Programs That Reference Arrays - Part 1},
Institution = {EECS Department, University of California, Berkeley},
Year = {2013},
Month = {May},
URL = {http://www2.eecs.berkeley.edu/Pubs/TechRpts/2013/EECS-2013-61.html},
Number = {UCB/EECS-2013-61},
Abstract = {Communication, i.e., moving data, between levels of a memory hierarchy or between parallel processors on a network, can greatly dominate the cost of computation, so algorithms that minimize communication can run much faster (and use less energy) than algorithms that do not. Motivated by this, attainable communication lower bounds were established in [12, 13, 4] for a variety of algorithms including matrix computations. The lower bound approach used initially in  for Θ(<i>N</i><sup>3</sup>) matrix multiplication, and later in  for many other linear algebra algorithms, depended on a geometric result by Loomis and Whitney : this result bounded the volume of a 3D set (representing multiply-adds done in the inner loop of the algorithm) using the product of the areas of certain 2D projections of this set (representing the matrix entries available locally, i.e., without communication). Using a recent generalization of Loomis’ and Whitney’s result, we generalize this lower bound approach to a much larger class of algorithms, that may have arbitrary numbers of loops and arrays with arbitrary dimensions, as long as the index expressions are affine combinations of loop variables. In other words, the algorithm can do arbitrary operations on any number of variables like <i>A</i>(<i>i</i><sub>1</sub>, <i>i</i><sub>2</sub>, <i>i</i><sub>2</sub> − 2<i>i</i><sub>1</sub>, 3 − 4<i>i</i><sub>3</sub> + 7<i>i</i><sub>4</sub>, . . .). Moreover, the result applies to recursive programs, irregular iteration spaces, sparse matrices, and other data structures as long as the computation can be logically mapped to loops and indexed data structure accesses. We also discuss when optimal algorithms exist that attain the lower bounds; this leads to new asymptotically faster algorithms for several problems.}
}
```

EndNote citation:

```%0 Report
%A Christ, Michael
%A Demmel, James
%A Knight, Nicholas
%A Scanlon, Thomas
%A Yelick, Katherine A.
%T Communication Lower Bounds and Optimal Algorithms for Programs That Reference Arrays - Part 1
%I EECS Department, University of California, Berkeley
%D 2013
%8 May 14
%@ UCB/EECS-2013-61
%U http://www2.eecs.berkeley.edu/Pubs/TechRpts/2013/EECS-2013-61.html
%F Christ:EECS-2013-61
```
{"ft_lang_label":"__label__en","ft_lang_prob":0.84946245,"math_prob":0.87227166,"size":4660,"snap":"2019-51-2020-05","text_gpt3_token_len":1131,"char_repetition_ratio":0.111469075,"word_repetition_ratio":0.7329377,"special_character_ratio":0.2444206,"punctuation_ratio":0.14722537,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9685596,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-01-23T20:10:49Z\",\"WARC-Record-ID\":\"<urn:uuid:5705bdc8-e8ab-4f11-ac7d-0c9b90dc1f5f>\",\"Content-Length\":\"34557\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:503877c0-b270-4a3a-9782-f8c5a5dd41a3>\",\"WARC-Concurrent-To\":\"<urn:uuid:81525f1a-d34c-4bd4-af63-fb1c687c0cee>\",\"WARC-IP-Address\":\"128.32.189.73\",\"WARC-Target-URI\":\"https://www2.eecs.berkeley.edu/Pubs/TechRpts/2013/EECS-2013-61.html\",\"WARC-Payload-Digest\":\"sha1:RMPWBYUFMDRYPVI2H47CJMB6QRJPSDAK\",\"WARC-Block-Digest\":\"sha1:J3GUYW6MEHDRUIPGDYS57AAW57GQ6SEB\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-05/CC-MAIN-2020-05_segments_1579250613416.54_warc_CC-MAIN-20200123191130-20200123220130-00279.warc.gz\"}"}