arrow
Return

Optimizing General Sparse Matrix-Matrix Multiplication on the GPU

delete2025-12-01
delete0
PRE
AI
王一拙 (Yizhuo Wang) *
H
H. Lin
B
Bingxin Wei
J
Jianhua Gao
W
Weixing Ji
DOI:10.1145/3774654delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
General Sparse Matrix-Matrix Multiplication (SpGEMM) is a crucial computational kernel in the field of scientific and engineering computing. Due to the irregular distribution of nonzero elements in sparse matrices, SpGEMM computation faces challenges such as non-contiguous memory access and workload imbalance. This article focuses on optimizing SpGEMM for GPU platforms. First, a lightweight machine learning model is trained to predict the optimal method for estimating the size of result matrix. Next, different kernels are launched in groups to maximize GPU shared memory utilization and achieve load balancing. For the hash-based sparse accumulator, heuristic methods are used to select the optimal hash load factors and hash multiplier factors, thereby reducing the number of hash collisions. In addition, thread reduction is applied in the symbolic phase to enhance intra-block parallelism. Combining these optimization strategies, we implemented an adaptive SpGEMM algorithm for GPUs and compared its performance with current state-of-the-art algorithms. The results show that our algorithm achieves significant performance improvements.
Keywords:
Sparse matrix multiplication
GPU
parallel computing
SpGEMM

Journal

A
ACM Transactions on Architecture and Code Optimization
IF:
1.8
Papers:
96
Citations:
1.1K

Organization

B
Beijing Normal University
Scholars:
3.3W
Papers: 2.7W
Citations: 4.2W
B
Beijing Institute of Technology
Scholars:
5.2K
Papers: 2.1K
Citations: 6.0W