Diagonally-Addressed Matrix Nicknack: How to improve SpMV performance

07/12/2023
by   Jens Saak, et al.
0

We suggest a technique to reduce the storage size of sparse matrices at no loss of information. We call this technique Diagonally-Adressed (DA) storage. It exploits the typically low matrix bandwidth of matrices arising in applications. For memory-bound algorithms, this traffic reduction has direct benefits for both uni-precision and multi-precision algorithms. In particular, we demonstrate how to apply DA storage to the Compressed Sparse Rows (CSR) format and compare the performance in computing the Sparse Matrix Vector (SpMV) product, which is a basic building block of many iterative algorithms. We investigate 1367 matrices from the SuiteSparse Matrix Collection fitting into the CSR format using signed 32 bit indices. More than 95 into the DA-CSR format using 16 bit column indices, potentially after Reverse Cuthill-McKee (RCM) reordering. Using IEEE 754 double precision scalars, we observe a performance uplift of 11 on average when the traffic exceeds the size of the last-level CPU cache. The predicted uplift in this scenario is 20 level 2 and level 3 caches, the multithreaded performance uplift is over 40 for a few test matrices.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/16/2018

Leveraging Sparsity to Speed Up Polynomial Feature Expansions of CSR Matrices Using K-Simplex Numbers

We provide an algorithm that speeds up polynomial and interaction featur...
research
12/01/2020

Assembly of stiffness matrices via atomics

Finite element methods require the composition of the global stiffness m...
research
09/11/2023

Compressed Real Numbers for AI: a case-study using a RISC-V CPU

As recently demonstrated, Deep Neural Networks (DNN), usually trained us...
research
11/20/2018

Practical Sparse Matrices in C++ with Hybrid Storage and Template-Based Expression Optimisation

Despite the importance of sparse matrices in numerous fields of science,...
research
12/10/2020

Efficient Distributed Transposition Of Large-Scale Multigraphs And High-Cardinality Sparse Matrices

Graph-based representations underlie a wide range of scientific problems...
research
05/11/2021

Accelerating the SpMV kernel on standard CPUs by exploiting the partially diagonal structures

Sparse Matrix Vector multiplication (SpMV) is one of basic building bloc...

Please sign up or login with your details

Forgot password? Click here to reset