# Multi-threaded Sparse Matrix Sparse Matrix Multiplication for Many-Core and GPU Architectures.

## Abstract

Sparse Matrix-Matrix multiplication is a key kernel that has applications in several domains such as scientific computing and graph analysis. Several algorithms have been studied in the past for this foundational kernel. In this paper, we develop parallel algorithms for sparse matrix- matrix multiplication with a focus on performance portability across different high performance computing architectures. The performance of these algorithms depend on the data structures used in them. We compare different types of accumulators in these algorithms and demonstrate the performance difference between these data structures. Furthermore, we develop a meta-algorithm, kkSpGEMM, to choose the right algorithm and data structure based on the characteristics of the problem. We show performance comparisons on three architectures and demonstrate the need for the community to develop two phase sparse matrix-matrix multiplication implementations for efficient reuse of the data structures involved.

- Authors:

- Sandia National Lab. (SNL-NM), Albuquerque, NM (United States)

- Publication Date:

- Research Org.:
- Sandia National Lab. (SNL-NM), Albuquerque, NM (United States)

- Sponsoring Org.:
- USDOE National Nuclear Security Administration (NNSA)

- OSTI Identifier:
- 1417260

- Report Number(s):
- SAND-2018-0186R

659808

- DOE Contract Number:
- AC04-94AL85000

- Resource Type:
- Technical Report

- Country of Publication:
- United States

- Language:
- English

- Subject:
- 97 MATHEMATICS AND COMPUTING

### Citation Formats

```
Deveci, Mehmet, Trott, Christian Robert, and Rajamanickam, Sivasankaran.
```*Multi-threaded Sparse Matrix Sparse Matrix Multiplication for Many-Core and GPU Architectures.*. United States: N. p., 2018.
Web. doi:10.2172/1417260.

```
Deveci, Mehmet, Trott, Christian Robert, & Rajamanickam, Sivasankaran.
```*Multi-threaded Sparse Matrix Sparse Matrix Multiplication for Many-Core and GPU Architectures.*. United States. doi:10.2172/1417260.

```
Deveci, Mehmet, Trott, Christian Robert, and Rajamanickam, Sivasankaran. Mon .
"Multi-threaded Sparse Matrix Sparse Matrix Multiplication for Many-Core and GPU Architectures.". United States. doi:10.2172/1417260. https://www.osti.gov/servlets/purl/1417260.
```

```
@article{osti_1417260,
```

title = {Multi-threaded Sparse Matrix Sparse Matrix Multiplication for Many-Core and GPU Architectures.},

author = {Deveci, Mehmet and Trott, Christian Robert and Rajamanickam, Sivasankaran},

abstractNote = {Sparse Matrix-Matrix multiplication is a key kernel that has applications in several domains such as scientific computing and graph analysis. Several algorithms have been studied in the past for this foundational kernel. In this paper, we develop parallel algorithms for sparse matrix- matrix multiplication with a focus on performance portability across different high performance computing architectures. The performance of these algorithms depend on the data structures used in them. We compare different types of accumulators in these algorithms and demonstrate the performance difference between these data structures. Furthermore, we develop a meta-algorithm, kkSpGEMM, to choose the right algorithm and data structure based on the characteristics of the problem. We show performance comparisons on three architectures and demonstrate the need for the community to develop two phase sparse matrix-matrix multiplication implementations for efficient reuse of the data structures involved.},

doi = {10.2172/1417260},

journal = {},

number = ,

volume = ,

place = {United States},

year = {2018},

month = {1}

}