[Paper Review] A survey of sparse matrix-vector multiplication performance on large matrices
This paper evaluates sparse matrix-vector multiplication (SpMV) performance on large, industrial-scale matrices using Intel MKL, Trilinos, CUSPARSE, and CUSP across CPUs and GPUs. It finds that while GPU-based SpMV frameworks like CUSPARSE achieve up to 10.8× speedup on kernel-only execution, end-to-end performance is hampered by data transfer overhead, making CPU-based Trilinos and MKL more competitive in practice, with Trilinos matching or exceeding MKL performance on larger matrices.
We contribute a third-party survey of sparse matrix-vector (SpMV) product performance on industrial-strength, large matrices using: (1) The SpMV implementations in Intel MKL, the Trilinos project (Tpetra subpackage), the CUSPARSE library, and the CUSP library, each running on modern architectures. (2) NVIDIA GPUs and Intel multi-core CPUs (supported by each software package). (3) The CSR, BSR, COO, HYB, and ELL matrix formats (supported by each software package).
Motivation & Objective
- To evaluate the performance of SpMV on large, real-world sparse matrices arising from the Cahn–Hilliard equation discretization.
- To compare the efficiency of major software libraries—Intel MKL, Trilinos, CUSPARSE, and CUSP—across CPU and GPU platforms.
- To identify optimal matrix storage formats (CSR, BSR, COO, HYB, ELL) for each software stack and hardware platform.
- To assess the impact of data movement on end-to-end SpMV performance, particularly for GPU-based implementations.
- To guide future optimization by identifying the most promising software stacks—Trilinos and CUSPARSE—for further investigation in large-scale and distributed environments.
Proposed method
- The study uses six large, band-structured sparse matrices with 611K to 99.5M rows and low non-zero density (0.00001% to 0.00172%).
- SpMV performance is evaluated across four software libraries: Intel MKL (CPU), Trilinos (Tpetra, CPU), CUSPARSE (GPU), and CUSP (GPU), each using supported storage formats.
- For each matrix and software stack, multiple matrix formats and thread counts are tested, with the fastest median performance selected as optimal.
- Kernel-only execution times are measured to isolate algorithmic performance from data transfer costs, and end-to-end speedups include GPU memory transfer overhead.
- The evaluation is conducted on a system with an Intel X5660 CPU (12 cores, 48GB RAM) and an NVIDIA M2070 GPU (2.5GB GDDR5), using standard configurations for each library.
- Optimal formats are selected per library and matrix by testing CSR, BSR (with blocking factors ≤32), COO, HYB (ELL width 10–15), and ELL.
Experimental results
Research questions
- RQ1Which software library (MKL, Trilinos, CUSPARSE, CUSP) delivers the highest end-to-end SpMV performance on large sparse matrices across CPU and GPU platforms?
- RQ2How do different sparse matrix storage formats (CSR, BSR, COO, HYB, ELL) impact SpMV performance across the evaluated libraries and hardware platforms?
- RQ3To what extent do data transfer costs between host and device negate the performance advantages of GPU-based SpMV implementations?
- RQ4Can Trilinos match or exceed the performance of Intel MKL on large sparse matrices, particularly when using optimized CPU threading?
- RQ5What is the relative performance of CUSPARSE versus CUSP when kernel execution is isolated from memory transfer overhead?
Key findings
- The optimal matrix format for all libraries and matrices was CSR, despite prior work favoring ELL or HYB for GPUs, due to low non-zero density reducing memory coalescing benefits.
- CUSPARSE achieved up to 10.81× speedup over single-threaded MKL on kernel-only execution, while CUSP achieved up to 4.11× speedup.
- When including data transfer costs, both CUSPARSE and CUSP showed speedups below 1.0× relative to single-threaded MKL, indicating that GPU performance gains are negated by communication overhead.
- Trilinos matched or exceeded MKL performance on larger matrices, achieving up to 4.75× speedup with 2 threads on the largest matrix (F), suggesting its object-oriented API does not compromise performance.
- The best-performing CPU implementation (8-thread MKL) achieved up to 3.87× speedup over single-threaded MKL, and Trilinos outperformed MKL on matrices E and F.
- CUSP could not process the largest matrices (E and F) due to out-of-core limitations in its API, highlighting a key constraint in GPU library design.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.