arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1702.02017cs.CC
收藏

矩阵乘法的一个紧I/O下界

A Tight I/O Lower Bound for Matrix Multiplication

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

摘要:

建立了在具有两层存储器的处理器上计算普通矩阵-矩阵乘法时所需I/O的紧下界。先前的工作通过对不同矩阵$A$、$B$和$C$执行$C:=AB$所需的段的数量进行推理获得了较弱的下界,其中每个段是涉及$M$向快速存储器读取和从快速存储器写入的一系列操作,并且$M$是快速存储器的大小。然后,通过获得每段执行的初等乘法的数量的上限来确定段的数量的下限。本文遵循相同的高级方法,但通过以下方式改进了下限:(1)转换MMM算法,使其通过融合乘加指令(FMA)执行所有计算,并使用此仅推理与读取矩阵相关的成本,以及(2)将每个段的I/O成本与快速存储器的大小解耦。对于$n \times n$矩阵,下界的首阶项是$2n^3/\sqrt{M}$。一个理论算法,其领先的条款达到这一点。在何种程度上的国家的最先进的Goto的算法达到下界进行了讨论。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑