Skip to main content
`Ctrl`+`K`

# What is hipSPARSE

hipSPARSE is a library that contains basic linear algebra subroutines for sparse matrices and vectors, written in HIP for GPU devices. It is designed to be called from C and C++ code.

hipSPARSE is a SPARSE marshalling library, with multiple supported backends. It lies between the application and a “worker” SPARSE library, marshalling inputs into the backend library and results back to the application. hipSPARSE exports a common interface that does not require the client to change, regardless of the chosen backend. It supports rocSPARSE and NVIDIA CUDA cuSPARSE as backends.

The hipSPARSE functionality is organized into the following categories:

- Sparse auxiliary functions: Available helper functions that are required for subsequent library calls.

- Sparse level 1 functions: Operations between a vector in sparse format and a vector in dense format.

- Sparse level 2 functions: Operations between a matrix in sparse format and a vector in dense format.

- Sparse level 3 functions: Operations between a matrix in sparse format and multiple vectors in dense format.

- Sparse extra functions: Operations that manipulate sparse matrices.

- Preconditioner functions: Operations that manipulate a matrix in sparse format to obtain a preconditioner.

- Sparse conversion functions: Operations on a matrix in sparse format to obtain a different matrix format.

- Sparse reordering functions: Operations on a matrix in sparse format to obtain a reordering.

- Sparse generic functions: Operations that manipulate sparse matrices.

The source code can be found at ROCm/rocm-libraries.

Note

hipSPARSE focuses on convenience and portability. If performance outweighs these factors, it’s better to use rocSPARSE directly. The rocSPARSE source code can be found on the rocSPARSE GitHub.