arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2205.01598math.NAcs.DCcs.NAcs.PF
收藏

基于层次的稀疏矩阵分块:稀疏矩阵-幂向量乘法

Level-based Blocking for Sparse Matrices: Sparse Matrix-Power-Vector Multiplication

Christie L. Alappat, Georg Hager, Olaf Schenk, Gerhard Wellein

摘要:

稀疏矩阵与稠密向量的相乘(SpMV)是许多数值格式中的关键组成部分,并且已知其性能受到主存访问的严重限制。几种数值方案需要将稀疏矩阵多项式与密集向量相乘,这通常被实现为SpMV序列。这导致低性能,并且忽略了通过重用来自缓存的矩阵数据来增加算术强度的潜力。在这项工作中,我们使用递归代数着色引擎(RACE),使阻塞的稀疏矩阵数据的多项式计算。在表示稀疏矩阵的图中,我们使用宽度优先搜索来形成级别。这些级别的局部性关系,然后使用访问矩阵数据时,以提高空间和时间的局部性,并实现一个有效的多线程并行化。我们的方法是独立的矩阵结构,避免了现有的“阻塞”策略的缺点,在硬件效率和并行化开销。我们量化的质量,我们的实施使用性能建模和演示加速高达3 $\times$和5 $\times$相比,最佳的SpMV为基础的基线在一个单一的多核芯片的最新英特尔和AMD架构。作为一个潜在的应用,我们证明了我们的实施的切比雪夫时间传播计划,代表类的多项式逼近指数积分的好处。进一步的数值方案,可能会受益于我们的发展,包括$s$ -步骤Krylov求解器和电源聚类算法。

英文摘要:

The multiplication of a sparse matrix with a dense vector (SpMV) is a key component in many numerical schemes and its performance is known to be severely limited by main memory access. Several numerical schemes require the multiplication of a sparse matrix polynomial with a dense vector, which is typically implemented as a sequence of SpMVs. This results in low performance and ignores the potential to increase the arithmetic intensity by reusing the matrix data from cache. In this work we use the recursive algebraic coloring engine (RACE) to enable blocking of sparse matrix data across the polynomial computations. In the graph representing the sparse matrix we form levels using a breadth-first search. Locality relations of these levels are then used to improve spatial and temporal locality when accessing the matrix data and to implement an efficient multithreaded parallelization. Our approach is independent of the matrix structure and avoids shortcomings of existing "blocking" strategies in terms of hardware efficiency and parallelization overhead. We quantify the quality of our implementation using performance modelling and demonstrate speedups of up to 3$\times$ and 5$\times$ compared to an optimal SpMV-based baseline on a single multicore chip of recent Intel and AMD architectures. As a potential application, we demonstrate the benefit of our implementation for a Chebyshev time propagation scheme, representing the class of polynomial approximations to exponential integrators. Further numerical schemes which may benefit from our developments include $s$-step Krylov solvers and power clustering algorithms.

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

↑