Skip to main content
QUICK REVIEW

[Paper Review] New Row-grouped CSR format for storing the sparse matrices on GPU with implementation in CUDA

Tomáš Oberhuber, Atsushi Suzuki|arXiv (Cornell University)|Dec 10, 2010
Parallel Computing and Optimization TechniquesComputer Science13 references36 citations
TL;DR

This paper proposes a new Row-grouped CSR (RgCSR) format for storing sparse matrices on GPUs, optimizing for coalesced memory access and reduced artificial padding through row grouping and intelligent ordering. Evaluated on 1,600 matrices, RgCSR outperforms the Hybrid format in general, especially on matrices with regular row non-zero patterns, but degrades significantly on highly irregular matrices due to excessive artificial nonzeros, highlighting the need for effective row reordering to improve cache utilization.

ABSTRACT

In this article we present a new format for storing sparse matrices. The format is designed to perform well mainly on the GPU devices. We present its implementation in CUDA. The performance has been tested on 1,600 different types of matrices and we compare our format with the Hybrid format. We give detailed comparison of both formats and show their strong and weak parts.

Motivation & Objective

  • To design a sparse matrix format that improves memory coalescing and reduces artificial padding on GPU devices.
  • To address the performance bottleneck in SpMV (Sparse Matrix-Vector multiplication) caused by low arithmetic intensity and memory bandwidth limitations.
  • To evaluate and compare the new RgCSR format against the existing Hybrid format across a diverse set of 1,600 real-world sparse matrices.
  • To investigate the impact of row reordering (descending and AMD ordering) on artificial nonzero count and texture cache utilization in RgCSR.
  • To identify the strengths and weaknesses of RgCSR in comparison to Hybrid format under both single and double precision computations.

Proposed method

  • The RgCSR format groups rows of a sparse matrix into contiguous blocks to enable coalesced memory access on GPU multiprocessors.
  • Each group is padded with artificial zeros to align data size to 32-byte boundaries, improving memory coalescing within warps.
  • The format stores row offsets, column indices, and values in separate, continuous arrays, with group-level metadata to enable efficient indexing.
  • The SpMV kernel is implemented in CUDA, launching one thread per row group, with each thread processing all non-zero elements in its group.
  • Row reordering techniques—descending order by non-zero count and AMD (approximate minimum degree) ordering—are applied to minimize artificial nonzeros and improve texture cache reuse.
  • Performance is evaluated using CUDA profiler to measure cache hit/miss ratios, artificial zero counts, and GFLOPS across 1,600 matrices from standard benchmarks.

Experimental results

Research questions

  • RQ1How does the Row-grouped CSR format compare to the Hybrid format in terms of SpMV performance across diverse sparse matrices on GPU?
  • RQ2To what extent does row reordering (descending and AMD ordering) reduce artificial nonzeros and improve texture cache utilization in RgCSR?
  • RQ3Why does RgCSR perform poorly on matrices with highly irregular row non-zero patterns despite its design for coalesced access?
  • RQ4What is the trade-off between memory coalescing benefits and artificial nonzero overhead in RgCSR, especially for matrices with large variation in row non-zero counts?
  • RQ5Can the performance of RgCSR be significantly enhanced through intelligent row ordering, and if so, which ordering strategy offers the best balance of reduced padding and improved cache usage?

Key findings

  • RgCSR outperforms the Hybrid format on 1,600 matrices overall, achieving higher GFLOPS on matrices with regular non-zero patterns such as Hohn/fd18 and AMD/G2_circuit.
  • For Hohn/fd18, RgCSR achieved 4.845 GFLOPS with descending ordering (0.34% artificial nonzeros), compared to 4.690 GFLOPS without ordering.
  • For AMD/G2_circuit, RgCSR achieved 9.210 GFLOPS with descending ordering (0.05% artificial nonzeros), outperforming the 9.364 GFLOPS of the Hybrid format in some cases.
  • On irregular matrices like IBM_EDA/trans4 and Rajat/Raj1, RgCSR performance dropped drastically—achieving only 0.0189 GFLOPS and 0.0578 GFLOPS respectively—due to excessive artificial nonzeros (up to 2,118.1% with no ordering).
  • AMD ordering improved texture cache hit rates (e.g., 3,448 hits vs. 11,951 misses for AMD/G2_circuit) but increased artificial nonzeros compared to descending order, indicating a trade-off between cache efficiency and memory footprint.
  • The study confirms that cache miss ratio is not the primary performance bottleneck; instead, the high number of artificial nonzeros due to poor row grouping is the main cause of performance degradation in irregular matrices.

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.