arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2203.05096cs.DCcs.DScs.PF
收藏

基于压缩稀疏行格式的异构稀疏矩阵-向量乘法

Heterogeneous Sparse Matrix-Vector Multiplication via Compressed Sparse Row Format

Phillip Allen Lane, Joshua Dennis Booth

摘要:

稀疏矩阵向量乘法(SpMV)是高性能计算(HPC)中最重要的内核之一,然而SpMV通常在许多设备上表现不佳。由于性能不佳,SpMV通常需要特别注意为给定设备存储和调谐。此外,HPC面临包含多个不同计算单元的异构硬件,例如,多核CPU和GPU。因此,一个新兴的目标是产生允许关键内核的异构格式和方法,例如,SpMV,可在不同设备上执行,具有可移植的性能,对格式和方法的更改最小。本文介绍了一种基于CSR的异构格式,名为CSR-k,它可以快速调整,在Intel Xeon Platinum 8380和AMD Epyc 7742 CPU上的性能优于Intel MKL的平均性能,同时在NVIDIA A100和V100上的性能仍然优于NVIDIA的cuSPARSE和Sandia国家实验室的KokkosKernels。稀疏矩阵,其中每行的非零数具有方差$\leq$ 10,例如通常由二维和三维有限差分和单元问题生成的那些。特别是,CSR-k通过重新排序和将行分组为超级行和超级超级行的分层结构来实现这一点,这些超级行和超级超级行仅由几个额外的指针数组表示。由于其简单性,模型可以针对设备进行调整,并用于在恒定时间内选择超级行和超级超级行大小。

英文摘要:

Sparse matrix-vector multiplication (SpMV) is one of the most important kernels in high-performance computing (HPC), yet SpMV normally suffers from ill performance on many devices. Due to ill performance, SpMV normally requires special care to store and tune for a given device. Moreover, HPC is facing heterogeneous hardware containing multiple different compute units, e.g., many-core CPUs and GPUs. Therefore, an emerging goal has been to produce heterogeneous formats and methods that allow critical kernels, e.g., SpMV, to be executed on different devices with portable performance and minimal changes to format and method. This paper presents a heterogeneous format based on CSR, named CSR-k, that can be tuned quickly and outperforms the average performance of Intel MKL on Intel Xeon Platinum 8380 and AMD Epyc 7742 CPUs while still outperforming NVIDIA's cuSPARSE and Sandia National Laboratories' KokkosKernels on NVIDIA A100 and V100 for regular sparse matrices, i.e., sparse matrices where the number of nonzeros per row has a variance $\leq$ 10, such as those commonly generated from two and three-dimensional finite difference and element problems. In particular, CSR-k achieves this with reordering and by grouping rows into a hierarchical structure of super-rows and super-super-rows that are represented by just a few extra arrays of pointers. Due to its simplicity, a model can be tuned for a device and used to select super-row and super-super-rows sizes in constant time.

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

↑