arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2310.15419cs.CEcs.DCcs.DS
收藏

随机稠密矩阵与固定稀疏矩阵的快速乘法

Fast multiplication of random dense matrices with fixed sparse matrices

Tianyu Liang, Riley Murray, Aydın Buluç, James Demmel

AI总结:

本文提出结合分块与即时随机数重计算的稀疏-随机稠密矩阵乘法方案,降低内存移动并提升并行扩展性,性能优于 Eigen、Intel MKL 与 SuiteSparse。

摘要:

本工作聚焦于加速稠密随机矩阵与(固定)稀疏矩阵的乘法,该运算在 sketching(草图)算法中频繁使用。我们开发了一种利用分块和重计算(即时随机数生成)的新颖方案来加速这一操作。所提出的技术减少了内存移动,从而提升了算法在共享内存架构中的并行可扩展性。在 Intel Frontera 架构上,对于某些示例,我们的算法相比 Eigen 和 Intel MKL 等库可实现 2 倍加速。此外,在使用 32 个线程时,我们可获得最高约 45% 的并行效率。我们还给出了算法内存移动下界的理论分析,表明在温和假设下,有可能以 √M 的倍数突破通用矩阵-矩阵乘法(GEMM)的数据移动下界,其中 M 为缓存大小。最后,我们将该 sketching 算法集成到一个随机最小二乘求解器中。对于高度超定的稀疏输入矩阵,结果表明我们的性能与 SuiteSparse 具有竞争力;在某些情况下,相比 SuiteSparse 可获得 10 倍加速。

英文摘要:

This work focuses on accelerating the multiplication of a dense random matrix with a (fixed) sparse matrix, which is frequently used in sketching algorithms. We develop a novel scheme that takes advantage of blocking and recomputation (on-the-fly random number generation) to accelerate this operation. The techniques we propose decrease memory movement, thereby increasing the algorithm's parallel scalability in shared memory architectures. On the Intel Frontera architecture, our algorithm can achieve 2x speedups over libraries such as Eigen and Intel MKL on some examples. In addition, with 32 threads, we can obtain a parallel efficiency of up to approximately 45%. We also present a theoretical analysis for the memory movement lower bound of our algorithm, showing that under mild assumptions, it's possible to beat the data movement lower bound of general matrix-matrix multiply (GEMM) by a factor of $\sqrt M$, where $M$ is the cache size. Finally, we incorporate our sketching algorithm into a randomized least squares solver. For extremely over-determined sparse input matrices, we show that our results are competitive with SuiteSparse; in some cases, we obtain a speedup of 10x over SuiteSparse.

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

↑