A Framework for General Sparse Matrix-Matrix Multiplication on GPUs and Heterogeneous Processors

Weifeng Liu, Brian Vinter
4/20/2015
101 citations
cs.MScs.DCmath.NA

Official code: weifengliu-ssslab/Benchmark_SpGEMM_using_CSR (48 stars, C++, MIT, last commit 2016-04-09).

Abstract

General sparse matrix-matrix multiplication (SpGEMM) is a fundamental building block for numerous applications such as algebraic multigrid method (AMG), breadth first search and shortest path problem. Compared to other sparse BLAS routines, an efficient parallel SpGEMM implementation has to handle extra irregularity from three aspects: (1) the number of nonzero entries in the resulting sparse matrix is unknown in advance, (2) very expensive parallel insert operations at random positions in the resulting sparse matrix dominate the execution time, and (3) load balancing must account for sparse data in both input matrices.

Show full abstract

In this work we propose a framework for SpGEMM on GPUs and emerging CPU-GPU heterogeneous processors. This framework particularly focuses on the above three problems. Memory pre-allocation for the resulting matrix is organized by a hybrid method that saves a large amount of global memory space and efficiently utilizes the very limited on-chip scratchpad memory. Parallel insert operations of the nonzero entries are implemented through the GPU merge path algorithm that is experimentally found to be the fastest GPU merge approach. Load balancing builds on the number of necessary arithmetic operations on the nonzero entries and is guaranteed in all stages. Compared with the state-of-the-art CPU and GPU SpGEMM methods, our approach delivers excellent absolute performance and relative speedups on various benchmarks multiplying matrices with diverse sparsity structures. Furthermore, on heterogeneous processors, our SpGEMM approach achieves higher throughput by using re-allocatable shared virtual memory. The source code of this work is available at https://github.com/bhSPARSE/Benchmark_SpGEMM_using_CSR

View on arXivView PDF

Code Implementations(1)

MIT

CSR-based SpGEMM on nVidia and AMD GPUs

489C++, CMar 18, 201510 years agoMIT

Similar Papers

Cite this paper

@article{liu2015framework,
  title  = {A Framework for General Sparse Matrix-Matrix Multiplication on GPUs and Heterogeneous Processors},
  author = {Weifeng Liu and Brian Vinter},
  year   = {2015},
  eprint = {1504.05022},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1504.05022}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1504.05022.svg)](https://codeofpaper.com/paper/1504.05022)

Discussion