Home Knowledge Base Sparse Matrix-Vector Multiplication (SpMV)

Sparse Matrix-Vector Multiplication (SpMV) is the operation y = A×x where A is a sparse matrix — a fundamental kernel in scientific computing, graph algorithms, and machine learning where most matrix elements are zero and storing them explicitly wastes memory and compute.

Why Sparsity Matters

Sparse Storage Formats

CSR (Compressed Sparse Row) — Most Common:

A = [1 0 2]   row_ptr = [0, 2, 3, 5]
    [0 3 0]   col_idx  = [0, 2, 1, 0, 2]
    [4 0 5]   values   = [1, 2, 3, 4, 5]

COO (Coordinate Format):

ELL (ELLPACK):

CSC (Compressed Sparse Column):

GPU SpMV

Applications

SpMV performance is memory-bandwidth limited — the ratio of NNZ to unique memory accesses determines efficiency, and format selection based on matrix structure (regular, irregular, banded) is the primary optimization lever.

sparse matrix vectorspmvcsr formatsparse computationcompressed sparse row

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.