arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2312.12732cs.MScs.PF
收藏

Strassen矩阵乘法算法仍然更快

Strassen's Matrix Multiplication Algorithm Is Still Faster

Paolo D'Alberto

AI总结:

针对新发现的强化学习矩阵乘法算法缺乏实际性能验证的问题,本文提出Matrix Flow项目用于自动生成实现快速矩阵乘法算法,实验证明Strassen原始算法在现代GPU上仍性能最优。

摘要:

近期,强化学习算法发现了新算法,着实掀起了一波研究热潮,相关成果大量涌现。但目前关于这些新算法的实现、应用研究极少,尤其缺乏绝对性能数据;本文在此表明,它们目前还无法取代Strassen最初提出的快速矩阵乘法。\n我们提出了Matrix Flow,这是一个简单的Python项目,用于自动构建、设计、实现、代码生成并执行面向CPU、支持BLAS接口的GPU及未来其他加速器的快速矩阵乘法算法。我们不涉及模2(Z2)算法,为简化起见,仅讨论方阵的双精度矩阵运算。通过对操作数矩阵进行因式分解,我们可以表达多种算法并证明其正确性,这些算法由数据流和矩阵数据划分表示为有向无环图。我们证明,即便在现代GPU上,Strassen原始算法仍是最优选择。我们还分析了双精度下的误差,因为整数计算始终是精确的。

英文摘要:

Recently, reinforcement algorithms discovered new algorithms that really jump-started a wave of excitements and a flourishing of publications. However, there is little on implementations, applications, and, especially, no absolute performance and, we show here they are not here to replace Strassen's original fast matrix multiplication yet. We present Matrix Flow, this is a simple Python project for the automatic formulation, design, implementation, code generation, and execution of fast matrix multiplication algorithms for CPUs, using BLAS interface GPUs, and in the future other accelerators. We shall not play with module-2 (Z2) algorithms and, for simplicity, we present only square double-precision matrices. By means of factorizing the operand matrices we can express many algorithms and prove them correct. These algorithms are represented by Data Flows and matrix data partitions: a Directed Acyclic Graph. We show that Strassen's original algorithm is still the top choice even for modern GPUs. We also address error analysis in double precision, because integer computations are correct, always

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

↑