arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2307.06305math.NAcs.DScs.NAcs.PF
收藏

对角寻址矩阵昵称:如何提升SpMV性能

Diagonally-Addressed Matrix Nicknack: How to improve SpMV performance

Jens Saak, Jonas Schulze

AI总结:

本文提出对角寻址(DA)存储技术以减少稀疏矩阵存储空间,应用于CSR格式,通过利用低带宽特性,在SpMV计算中平均提升11%(单线程)和17.5%(多线程)性能,并验证了95%以上矩阵可用16位索引。

摘要:

我们提出了一种在不丢失信息的情况下减少稀疏矩阵存储空间的技术。我们将这种技术称为对角寻址(DA)存储。它利用了应用中出现的矩阵通常具有较低带宽的特点。对于内存受限算法,这种流量减少对单精度和多精度算法都有直接益处。特别是,我们演示了如何将DA存储应用于压缩稀疏行(CSR)格式,并比较了计算稀疏矩阵向量(SpMV)乘积的性能,这是许多迭代算法的基本构建块。我们研究了SuiteSparse矩阵集合中适合使用带符号32位索引的CSR格式的1367个矩阵。其中超过95%的矩阵在可能经过反向Cuthill-McKee(RCM)重排序后,适合使用16位列索引的DA-CSR格式。使用IEEE 754双精度标量,当流量超过CPU最后一级缓存大小时,我们观察到平均性能提升为11%(单线程)或17.5%(多线程)。在此场景下预测的提升为20%。对于CPU组合二级和三级缓存内的流量,少数测试矩阵的多线程性能提升超过40%。

英文摘要:

We suggest a technique to reduce the storage size of sparse matrices at no loss of information. We call this technique Diagonally-Adressed (DA) storage. It exploits the typically low matrix bandwidth of matrices arising in applications. For memory-bound algorithms, this traffic reduction has direct benefits for both uni-precision and multi-precision algorithms. In particular, we demonstrate how to apply DA storage to the Compressed Sparse Rows (CSR) format and compare the performance in computing the Sparse Matrix Vector (SpMV) product, which is a basic building block of many iterative algorithms. We investigate 1367 matrices from the SuiteSparse Matrix Collection fitting into the CSR format using signed 32 bit indices. More than 95% of these matrices fit into the DA-CSR format using 16 bit column indices, potentially after Reverse Cuthill-McKee (RCM) reordering. Using IEEE 754 double precision scalars, we observe a performance uplift of 11% (single-threaded) or 17.5% (multithreaded) on average when the traffic exceeds the size of the last-level CPU cache. The predicted uplift in this scenario is 20%. For traffic within the CPU's combined level 2 and level 3 caches, the multithreaded performance uplift is over 40% for a few test matrices.

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

↑