arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1203.1692math.NAcs.DScs.MScs.NA
收藏

针对具有衰减特性的矩阵的优化稀疏近似矩阵乘法

An Optimized Sparse Approximate Matrix Multiply for Matrices with Decay

Los Alamos National Laboratory(洛斯阿拉莫斯国家实验室)

Nicolas Bock, Matt Challacombe

AI总结:

提出一种优化的单精度稀疏近似矩阵乘法(SpAMM)实现,通过O(n log n)复杂度实现快速矩阵乘法,在量子化学矩阵上达到低于单精度SGEMM的误差,并显著优于朴素实现。

摘要:

我们提出了一种优化的单精度稀疏近似矩阵乘法(SpAMM)实现,该算法是一种针对具有衰减特性的矩阵的快速矩阵乘法算法,实现了关于矩阵维度n的O(n log n)计算复杂度。我们发现,对于稠密量子化学矩阵,当SpAMM容差低于2×10^{-8}时,其最大误差范数低于单精度SGEMM,同时在小矩阵(n~1000)上已经超越SGEMM。相对于使用Intel数学核心库(MKL)或AMD核心数学库(ACML)的朴素SpAMM实现,我们的优化版本显著更快。针对具有不同结构子块的量子化学矩阵进行了详细的性能比较。最后,我们讨论了改进硬件预取以获得2-3倍加速的潜力。

英文摘要:

We present an optimized single-precision implementation of the Sparse Approximate Matrix Multiply (\SpAMM{}) [M. Challacombe and N. Bock, arXiv {\bf 1011.3534} (2010)], a fast algorithm for matrix-matrix multiplication for matrices with decay that achieves an $\mathcal{O} (n \log n)$ computational complexity with respect to matrix dimension $n$. We find that the max norm of the error achieved with a \SpAMM{} tolerance below $2 \times 10^{-8}$ is lower than that of the single-precision {\tt SGEMM} for dense quantum chemical matrices, while outperforming {\tt SGEMM} with a cross-over already for small matrices ($n \sim 1000$). Relative to naive implementations of \SpAMM{} using Intel's Math Kernel Library ({\tt MKL}) or AMD's Core Math Library ({\tt ACML}), our optimized version is found to be significantly faster. Detailed performance comparisons are made for quantum chemical matrices with differently structured sub-blocks. Finally, we discuss the potential of improved hardware prefetch to yield 2--3x speedups.

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

↑