计算物理2024,Vol.41Issue(1) :22-32.DOI:10.19596/j.cnki.1001-246x.8766

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

Sparse General Matrix-matrix Multiplication for Sunway Manycore Architecture

刘侃 杨磊 薛巍 陈文光
计算物理2024,Vol.41Issue(1) :22-32.DOI:10.19596/j.cnki.1001-246x.8766

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

Sparse General Matrix-matrix Multiplication for Sunway Manycore Architecture

刘侃 1杨磊 2薛巍 1陈文光1
扫码查看

作者信息

  • 1. 清华大学计算机科学与技术系,北京 100084
  • 2. 国家超级计算无锡中心,江苏 无锡 214000
  • 折叠

摘要

本文提出新一代申威众核架构上稀疏通用矩阵-矩阵乘法(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%.

关键词

申威众核架构/稀疏矩阵计算/矩阵-矩阵乘法

Key words

Sunway many-core architecture/sparse matrix computation/matrix-matrix multiplication

引用本文复制引用

基金项目

国家重点专项(2020YFA0607903)

国家自然科学基金项目(U2242210)

出版年

2024
计算物理
中国核学会

计算物理

CSTPCDCSCD北大核心
影响因子:0.366
ISSN:1001-246X
参考文献量25
段落导航相关论文