COSTA:通信最优的进程重标记混洗转置算法
COSTA: Communication-Optimal Shuffle and Transpose Algorithm with Process Relabeling
摘要:
线性代数的通信避免算法已经变得越来越流行,特别是对于分布式存储器架构。在实践中,这些算法假设数据已经以特定的方式分布,从而使数据重新洗牌成为使用它们的关键。出于性能原因,必须避免直接的所有对所有交换。在这里,我们表明,过程重新标记(即置换过程中的最终布局)可以用来获得通信的最优数据重新洗牌,它可以有效地找到解决线性分配问题(最大权重二分完美匹配)。在此基础上,我们开发了一个通信最佳洗牌和转置算法(COSTA):这种高度优化的算法实现$A=α\cdot \operatorname{op}(B) + β\cdot A,\ \operatorname{op} \in \{\operatorname{transpose}, \operatorname{conjugate-transpose}, \operatorname{identity}\}$分布式系统,其中$A, B$是矩阵与潜在的不同(分布式)布局和$α, β$是标量。COSTA可以利用通信最佳的过程重新标记,即使是异构网络拓扑,其中延迟和带宽不同的节点。该实现不仅多次优于最好的ScaLAPACK重分布和转置例程,而且还能够处理更一般的矩阵布局,特别是它不限于块循环布局。最后,我们使用COSTA将通信最优矩阵乘法算法集成到CP2K量子化学模拟包中。通过这种方式,我们表明,COSTA可以用来解锁最近的线性代数算法在应用程序中的全部潜力,通过促进算法之间的互操作性与广泛的数据布局,除了带来显着的再分配加速。
英文摘要:
Communication-avoiding algorithms for Linear Algebra have become increasingly popular, in particular for distributed memory architectures. In practice, these algorithms assume that the data is already distributed in a specific way, thus making data reshuffling a key to use them. For performance reasons, a straightforward all-to-all exchange must be avoided. Here, we show that process relabeling (i.e. permuting processes in the final layout) can be used to obtain communication optimality for data reshuffling, and that it can be efficiently found by solving a Linear Assignment Problem (Maximum Weight Bipartite Perfect Matching). Based on this, we have developed a Communication-Optimal Shuffle and Transpose Algorithm (COSTA): this highly-optimised algorithm implements $A=α\cdot \operatorname{op}(B) + β\cdot A,\ \operatorname{op} \in \{\operatorname{transpose}, \operatorname{conjugate-transpose}, \operatorname{identity}\}$ on distributed systems, where $A, B$ are matrices with potentially different (distributed) layouts and $α, β$ are scalars. COSTA can take advantage of the communication-optimal process relabeling even for heterogeneous network topologies, where latency and bandwidth differ among nodes. The implementation not only outperforms the best available ScaLAPACK redistribute and transpose routines multiple times, but is also able to deal with more general matrix layouts, in particular it is not limited to block-cyclic layouts. Finally, we use COSTA to integrate a communication-optimal matrix multiplication algorithm into the CP2K quantum chemistry simulation package. This way, we show that COSTA can be used to unlock the full potential of recent Linear Algebra algorithms in applications by facilitating interoperability between algorithms with a wide range of data layouts, in addition to bringing significant redistribution speedups.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。