适用于申威众核架构的稀疏矩阵-矩阵乘法

Sparse General Matrix-matrix Multiplication for Sunway Manycore Architecture

  • 摘要: 本文提出新一代申威众核架构上稀疏通用矩阵-矩阵乘法(SpGEMM)的并行算法swSpGEMM。设计轻量级并行任务划分有效地应对了矩阵非零元分布引起的负载不均衡问题; 针对累加过程中的不规则访存和指令流水低效问题, 设计了分层稀疏累加器, 在不同输入特征下高效利用申威从核层次化内存, 且减少了整数查找中的指令间依赖, 更有效地发挥硬件的计算能力。SuiteSparse稀疏矩阵测试集中较大规模输入矩阵上, swSpGEMM的性能相比Intel Skylake双CPU上的MKL和NVIDIA A100上的cuSPARSE分别加速了21.1%和95.3%。

     

    Abstract: A parallel algorithm for sparse general matrix-matrix multiplication (SpGEMM), swSpGEMM, targeting the new generation Sunway many-core architecture is proposed. The algorithm addresses the load balance issue caused by the distribution of nonzeros in input matrix, using a light weight parallel task partitioning. For the irregular memory access and inefficient instruction pipelining in accumulating the product, a hierarchical sparse accumulator has been proposed to maximize the utilization of local memory with different input matrix features and to relieve the instruction dependency in integer searching, resulting in more efficient use of the computing capability of the hardware. On large matrices from the SuiteSparse sparse matrix collection, the algorithm outperforms MKL on two Intel Xeon GOLD 6132 processors by 21.1% and cuSPARSE on NVIDIA A100 by 95.3%.

     

/

返回文章
返回