Optimization of Large-Scale Sparse Matrix-Vector Multiplication on Multi-GPU Systems
Open Access
- 19 November 2024
- journal article
- research article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Architecture and Code Optimization
- Vol. 21 (4) , 1-24
Abstract
Sparse matrix-vector multiplication (SpMV) is one of the important kernels of many iterative algorithms for solving sparse linear systems. The limited storage and computational resources of individual GPUs restrict both the scale and speed of SpMV computing in problem-solving. As real-world engineering problems continue to increase in complexity, the imperative for collaborative execution of iterative solving algorithms across multiple GPUs is increasingly apparent. Although the multi-GPU-based SpMV takes less kernel execution time, it also introduces additional data transmission overhead, which diminishes the performance gains derived from parallelization across multi-GPUs. Based on the non-zero elements distribution characteristics of sparse matrices and the tradeoff between redundant computations and data transfer overhead, this article introduces a series of SpMV optimization techniques tailored for multi-GPU environments and effectively enhances the execution efficiency of iterative algorithms on multiple GPUs. First, we propose a two-level non-zero elements-based matrix partitioning method to increase the overlap of kernel execution and data transmission. Then, considering the irregular non-zero elements distribution in sparse matrices, a long-row-aware matrix partitioning method is proposed to hide more data transmissions. Finally, an optimization using redundant and inexpensive short-row execution to exchange costly data transmission is proposed. Our experimental evaluation demonstrates that, compared with the SpMV on a single GPU, the proposed method achieves an average speedup of 2.00× and 1.85× on platforms equipped with two RTX 3090 and two Tesla V100-SXM2, respectively. The average speedup of 2.65× is achieved on a platform equipped with four Tesla V100-SXM2.Keywords
Funding Information
- Postdoctoral Fellowship Program of China Postdoctoral Science Foundation (GZC20230261)
- National Natural Science Foundation of China (61972033)
This publication has 44 references indexed in Scilit:
- Revisiting thread configuration of SpMV kernels on GPU: A machine learning based approachJournal of Parallel and Distributed Computing, 2023
- tpSpMV: A two-phase large-scale sparse matrix-vector multiplication kernel for manycore architecturesInformation Sciences, 2020
- A multi-GPU parallel optimization model for the preconditioned conjugate gradient algorithmParallel Computing, 2017
- A Jacobi_PCG solver for sparse linear systems on multi-GPU clusterThe Journal of Supercomputing, 2016
- A novel multi–graphics processing unit parallel optimization framework for the sparse matrix‐vector multiplicationConcurrency and Computation: Practice and Experience, 2016
- Preconditioned GMRES solver on multiple-GPU architectureComputers & Mathematics with Applications, 2016
- High Performance Multi-GPU SpMV for Multi-component PDE-Based Applications2015
- Automatic tuning of sparse matrix-vector multiplication on multicore clustersScience China Information Sciences, 2015
- Analysis and performance estimation of the Conjugate Gradient method on multiple GPUsParallel Computing, 2012
- Fast Conjugate Gradients with Multiple GPUs2009