Skip to main content
QUICK REVIEW

[Paper Review] CSR5: An Efficient Storage Format for Cross-Platform Sparse Matrix-Vector Multiplication

Weifeng Liu, Brian Vinter|arXiv (Cornell University)|Mar 17, 2015
Parallel Computing and Optimization TechniquesComputer Science30 references27 citations
TL;DR

CSR5 is a novel sparse matrix storage format that enables high-throughput, cross-platform sparse matrix-vector multiplication (SpMV) on CPUs, GPUs, and Xeon Phi by minimizing format conversion overhead and ensuring consistent performance across both regular and irregular matrices. It achieves this through a structure-insensitive, SIMD-friendly design with only two tuning parameters, delivering up to 943.3% higher performance than prior methods on Xeon Phi for irregular matrices.

ABSTRACT

Sparse matrix-vector multiplication (SpMV) is a fundamental building block for numerous applications. In this paper, we propose CSR5 (Compressed Sparse Row 5), a new storage format, which offers high-throughput SpMV on various platforms including CPUs, GPUs and Xeon Phi. First, the CSR5 format is insensitive to the sparsity structure of the input matrix. Thus the single format can support an SpMV algorithm that is efficient both for regular matrices and for irregular matrices. Furthermore, we show that the overhead of the format conversion from the CSR to the CSR5 can be as low as the cost of a few SpMV operations. We compare the CSR5-based SpMV algorithm with 11 state-of-the-art formats and algorithms on four mainstream processors using 14 regular and 10 irregular matrices as a benchmark suite. For the 14 regular matrices in the suite, we achieve comparable or better performance over the previous work. For the 10 irregular matrices, the CSR5 obtains average performance improvement of 17.6\%, 28.5\%, 173.0\% and 293.3\% (up to 213.3\%, 153.6\%, 405.1\% and 943.3\%) over the best existing work on dual-socket Intel CPUs, an nVidia GPU, an AMD GPU and an Intel Xeon Phi, respectively. For real-world applications such as a solver with only tens of iterations, the CSR5 format can be more practical because of its low-overhead for format conversion. The source code of this work is downloadable at https://github.com/bhSPARSE/Benchmark_SpMV_using_CSR5

Motivation & Objective

  • To address the high overhead of format conversion between CSR and specialized SpMV formats, especially when only tens of iterations are used in solvers.
  • To design a single storage format that delivers high performance for both regular and irregular sparse matrices across diverse architectures.
  • To minimize structure-dependent parameter tuning, which hinders practical deployment of optimized SpMV formats.
  • To enable efficient SpMV on CPUs, GPUs, and Xeon Phi using a unified, low-overhead format.
  • To reduce the performance gap between optimized formats and the standard CSR format in iteration-based scientific computing.

Proposed method

  • Extends the classic CSR format by storing two of its three arrays in an in-place tile-transposed order, preserving one array unchanged.
  • Introduces two new auxiliary data groups that are short and structure-independent, reducing memory overhead.
  • Employs a redesigned, low-overhead segmented sum algorithm optimized for SIMD execution on modern processors.
  • Uses only two tuning parameters: one hardware-dependent and one sparsity-dependent (but not structure-dependent), enabling fast format conversion.
  • Supports efficient SpMV on CPUs, NVIDIA and AMD GPUs, and Intel Xeon Phi through consistent data layout and high SIMD utilization.
  • Maintains compatibility with standard CSR-based tools by allowing fast conversion with overhead comparable to just a few SpMV operations.

Experimental results

Research questions

  • RQ1Can a single storage format achieve high SpMV performance across both regular and irregular sparse matrices without structure-dependent tuning?
  • RQ2What is the minimal format conversion cost required to enable high-performance SpMV on diverse platforms?
  • RQ3How does CSR5 compare to 11 state-of-the-art SpMV formats in terms of isolated SpMV and iteration-based workloads?
  • RQ4Can CSR5 outperform CSR-based SpMV in real-world solvers with only tens of iterations, where format conversion cost is critical?
  • RQ5Is CSR5 the only format that achieves consistently high performance across CPUs, GPUs, and Xeon Phi simultaneously?

Key findings

  • For 10 irregular matrices, CSR5 achieved an average performance improvement of 17.6%, 28.5%, 173.0%, and 293.3% over the best existing work on dual-socket Intel CPUs, NVIDIA GPU, AMD GPU, and Intel Xeon Phi, respectively.
  • On the Xeon Phi, CSR5 achieved up to 943.3% higher performance than the best prior method for irregular matrices.
  • In iteration-based scenarios with 50 iterations, CSR5 achieved higher overall speedups than all other formats, including those with lower preprocessing costs.
  • For 500 iterations, CSR5 maintained the highest overall speedups on all platforms, demonstrating sustained efficiency.
  • CSR5 is the only format that outperforms the standard CSR format when only 50 iterations are performed, due to its minimal conversion overhead.
  • The format conversion cost from CSR to CSR5 is as low as the cost of a few SpMV operations, making it practical for real-world solvers with limited iterations.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.