# A Tight I/O Lower Bound for Matrix Multiplication

**Authors:** Tyler Michael Smith, Bradley Lowery, Julien Langou, Robert A., van de Geijn

arXiv: 1702.02017 · 2019-02-07

## TL;DR

This paper establishes a precise lower bound on the I/O complexity for matrix multiplication on two-level memory systems, improving previous bounds and analyzing the optimality of existing algorithms.

## Contribution

It introduces a tighter I/O lower bound for matrix multiplication by transforming algorithms to use FMAs and decoupling I/O costs from fast memory size.

## Key findings

- Lower bound for I/O is 2n^3/√M for n×n matrices.
- A theoretical algorithm matching the lower bound is proposed.
- Discussion on how Goto's Algorithm compares to the lower bound.

## Abstract

A tight lower bound for required I/O when computing an ordinary matrix-matrix multiplication on a processor with two layers of memory is established. Prior work obtained weaker lower bounds by reasoning about the number of segments needed to perform $C:=AB$, for distinct matrices $A$, $B$, and $C$, where each segment is a series of operations involving $M$ reads and writes to and from fast memory, and $M$ is the size of fast memory. A lower bound on the number of segments was then determined by obtaining an upper bound on the number of elementary multiplications performed per segment. This paper follows the same high level approach, but improves the lower bound by (1) transforming algorithms for MMM so that they perform all computation via fused multiply-add instructions (FMAs) and using this to reason about only the cost associated with reading the matrices, and (2) decoupling the per-segment I/O cost from the size of fast memory. For $n \times n$ matrices, the lower bound's leading-order term is $2n^3/\sqrt{M}$. A theoretical algorithm whose leading terms attains this is introduced. To what extent the state-of-the-art Goto's Algorithm attains the lower bound is discussed.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1702.02017/full.md

## Figures

4 figures with captions in the complete paper: https://tomesphere.com/paper/1702.02017/full.md

## References

27 references — full list in the complete paper: https://tomesphere.com/paper/1702.02017/full.md

---
Source: https://tomesphere.com/paper/1702.02017