Skip to content

Latest commit

 

History

History
2689 lines (2004 loc) · 90.2 KB

usermanual.rst

File metadata and controls

2689 lines (2004 loc) · 90.2 KB

User Manual

Introduction

rocSPARSE 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 used from C and C++ code. The functionality of rocSPARSE is organized in the following categories:

  • rocsparse_auxiliary_functions_ describe available helper functions that are required for subsequent library calls.
  • rocsparse_level1_functions_ describe operations between a vector in sparse format and a vector in dense format.
  • rocsparse_level2_functions_ describe operations between a matrix in sparse format and a vector in dense format.
  • rocsparse_level3_functions_ describe operations between a matrix in sparse format and multiple vectors in dense format.
  • rocsparse_extra_functions_ describe operations that manipulate sparse matrices.
  • rocsparse_precond_functions_ describe manipulations on a matrix in sparse format to obtain a preconditioner.
  • rocsparse_conversion_functions_ describe operations on a matrix in sparse format to obtain a different matrix format.
  • rocsparse_reordering_functions_ describe operations on a matrix in sparse format to obtain a reordering.

The code is open and hosted here: https://github.com/ROCmSoftwarePlatform/rocSPARSE

Building and Installing

Prerequisites

rocSPARSE requires a ROCm enabled platform, more information here.

Installing pre-built packages

rocSPARSE can be installed from AMD ROCm repository. For detailed instructions on how to set up ROCm on different platforms, see the AMD ROCm Platform Installation Guide for Linux.

rocSPARSE can be installed on e.g. Ubuntu using

$ sudo apt-get update
$ sudo apt-get install rocsparse

Once installed, rocSPARSE can be used just like any other library with a C API. The header file will need to be included in the user code in order to make calls into rocSPARSE, and the rocSPARSE shared library will become link-time and run-time dependent for the user application.

Building rocSPARSE from source

Building from source is not necessary, as rocSPARSE can be used after installing the pre-built packages as described above. If desired, the following instructions can be used to build rocSPARSE from source. Furthermore, the following compile-time dependencies must be met

Download rocSPARSE

The rocSPARSE source code is available at the rocSPARSE GitHub page. Download the master branch using:

$ git clone -b master https://github.com/ROCmSoftwarePlatform/rocSPARSE.git
$ cd rocSPARSE

Below are steps to build different packages of the library, including dependencies and clients. It is recommended to install rocSPARSE using the install.sh script.

Using install.sh to build rocSPARSE with dependencies

The following table lists common uses of install.sh to build dependencies + library.

X{5}{6}|

Command Description
./install.sh -h Print help information.
./install.sh -d Build dependencies and library in your local directory. The -d flag only needs to be used once. For subsequent invocations of install.sh it is not necessary to rebuild the dependencies.
./install.sh Build library in your local directory. It is assumed dependencies are available.
./install.sh -i Build library, then build and install rocSPARSE package in /opt/rocm/rocsparse. You will be prompted for sudo access. This will install for all users.

Using install.sh to build rocSPARSE with dependencies and clients

The client contains example code, unit tests and benchmarks. Common uses of install.sh to build them are listed in the table below.

X{5}{6}|

Command Description
./install.sh -h Print help information.
./install.sh -dc Build dependencies, library and client in your local directory. The -d flag only needs to be used once. For subsequent invocations of install.sh it is not necessary to rebuild the dependencies.
./install.sh -c Build library and client in your local directory. It is assumed dependencies are available.
./install.sh -idc Build library, dependencies and client, then build and install rocSPARSE package in /opt/rocm/rocsparse. You will be prompted for sudo access. This will install for all users.
./install.sh -ic Build library and client, then build and install rocSPARSE package in opt/rocm/rocsparse. You will be prompted for sudo access. This will install for all users.

Using individual commands to build rocSPARSE

CMake 3.5 or later is required in order to build rocSPARSE. The rocSPARSE library contains both, host and device code, therefore the HIP compiler must be specified during cmake configuration process.

rocSPARSE can be built using the following commands:

# Create and change to build directory
$ mkdir -p build/release ; cd build/release

# Default install path is /opt/rocm, use -DCMAKE_INSTALL_PREFIX=<path> to adjust it
$ CXX=/opt/rocm/bin/hipcc cmake ../..

# Compile rocSPARSE library
$ make -j$(nproc)

# Install rocSPARSE to /opt/rocm
$ make install

GoogleTest is required in order to build rocSPARSE clients.

rocSPARSE with dependencies and clients can be built using the following commands:

# Install googletest
$ mkdir -p build/release/deps ; cd build/release/deps
$ cmake ../../../deps
$ make -j$(nproc) install

# Change to build directory
$ cd ..

# Default install path is /opt/rocm, use -DCMAKE_INSTALL_PREFIX=<path> to adjust it
$ CXX=/opt/rocm/bin/hipcc cmake ../.. -DBUILD_CLIENTS_TESTS=ON \
                                      -DBUILD_CLIENTS_BENCHMARKS=ON \
                                      -DBUILD_CLIENTS_SAMPLES=ON

# Compile rocSPARSE library
$ make -j$(nproc)

# Install rocSPARSE to /opt/rocm
$ make install

Common build problems

  1. Issue: Could not find a package configuration file provided by "ROCM" with any of the following names: ROCMConfig.cmake, rocm-config.cmake

    Solution: Install ROCm cmake modules

Simple Test

You can test the installation by running one of the rocSPARSE examples, after successfully compiling the library with clients.

# Navigate to clients binary directory
$ cd rocSPARSE/build/release/clients/staging

# Execute rocSPARSE example
$ ./example_csrmv 1000

Supported Targets

Currently, rocSPARSE is supported under the following operating systems

To compile and run rocSPARSE, AMD ROCm Platform is required.

The following HIP capable devices are currently supported

  • gfx803 (e.g. Fiji)
  • gfx900 (e.g. Vega10, MI25)
  • gfx906 (e.g. Vega20, MI50, MI60)
  • gfx908

Device and Stream Management

:cpphipSetDevice and :cpphipGetDevice are HIP device management APIs. They are NOT part of the rocSPARSE API.

Asynchronous Execution

All rocSPARSE library functions, unless otherwise stated, are non blocking and executed asynchronously with respect to the host. They may return before the actual computation has finished. To force synchronization, :cpphipDeviceSynchronize or :cpphipStreamSynchronize can be used. This will ensure that all previously executed rocSPARSE functions on the device / this particular stream have completed.

HIP Device Management

Before a HIP kernel invocation, users need to call :cpphipSetDevice to set a device, e.g. device 1. If users do not explicitly call it, the system by default sets it as device 0. Unless users explicitly call :cpphipSetDevice to set to another device, their HIP kernels are always launched on device 0.

The above is a HIP (and CUDA) device management approach and has nothing to do with rocSPARSE. rocSPARSE honors the approach above and assumes users have already set the device before a rocSPARSE routine call.

Once users set the device, they create a handle with rocsparse_create_handle_.

Subsequent rocSPARSE routines take this handle as an input parameter. rocSPARSE ONLY queries (by :cpphipGetDevice) the user's device; rocSPARSE does NOT set the device for users. If rocSPARSE does not see a valid device, it returns an error message. It is the users' responsibility to provide a valid device to rocSPARSE and ensure the device safety.

Users CANNOT switch devices between rocsparse_create_handle_ and rocsparse_destroy_handle_. If users want to change device, they must destroy the current handle and create another rocSPARSE handle.

HIP Stream Management

HIP kernels are always launched in a queue (also known as stream).

If users do not explicitly specify a stream, the system provides a default stream, maintained by the system. Users cannot create or destroy the default stream. However, users can freely create new streams (with :cpphipStreamCreate) and bind it to the rocSPARSE handle using rocsparse_set_stream_. HIP kernels are invoked in rocSPARSE routines. The rocSPARSE handle is always associated with a stream, and rocSPARSE passes its stream to the kernels inside the routine. One rocSPARSE routine only takes one stream in a single invocation. If users create a stream, they are responsible for destroying it.

Multiple Streams and Multiple Devices

If the system under test has multiple HIP devices, users can run multiple rocSPARSE handles concurrently, but can NOT run a single rocSPARSE handle on different discrete devices. Each handle is associated with a particular singular device, and a new handle should be created for each additional device.

Storage Formats

COO storage format

The Coordinate (COO) storage format represents a m × n matrix by

m number of rows (integer).
n number of columns (integer).
nnz number of non-zero elements (integer).
coo_val array of nnz elements containing the data (floating point).
coo_row_ind array of nnz elements containing the row indices (integer).
coo_col_ind array of nnz elements containing the column indices (integer).

The COO matrix is expected to be sorted by row indices and column indices per row. Furthermore, each pair of indices should appear only once. Consider the following 3 × 5 matrix and the corresponding COO structures, with m = 3, n = 5 and nnz = 8 using zero based indexing:

$$\begin{aligned} A = \begin{pmatrix} 1.0 & 2.0 & 0.0 & 3.0 & 0.0 \\\ 0.0 & 4.0 & 5.0 & 0.0 & 0.0 \\\ 6.0 & 0.0 & 0.0 & 7.0 & 8.0 \\\ \end{pmatrix} \end{aligned}$$

where

$$\begin{aligned} \begin{array}{ll} \text{coo_val}[8] & = \{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0\} \\\ \text{coo_row_ind}[8] & = \{0, 0, 0, 1, 1, 2, 2, 2\} \\\ \text{coo_col_ind}[8] & = \{0, 1, 3, 1, 2, 0, 3, 4\} \end{array} \end{aligned}$$

COO (AoS) storage format

The Coordinate (COO) Array of Structure (AoS) storage format represents a m × n matrix by

m

number of rows (integer).

n

number of columns (integer).

nnz

number of non-zero elements (integer).

coo_val

array of nnz elements containing the data (floating point).

coo_ind

array of 2 * nnz elements containing alternating row and column indices (integer).

The COO (AoS) matrix is expected to be sorted by row indices and column indices per row. Furthermore, each pair of indices should appear only once. Consider the following 3 × 5 matrix and the corresponding COO (AoS) structures, with m = 3, n = 5 and nnz = 8 using zero based indexing:

$$\begin{aligned} A = \begin{pmatrix} 1.0 & 2.0 & 0.0 & 3.0 & 0.0 \\\ 0.0 & 4.0 & 5.0 & 0.0 & 0.0 \\\ 6.0 & 0.0 & 0.0 & 7.0 & 8.0 \\\ \end{pmatrix} \end{aligned}$$

where

$$\begin{aligned} \begin{array}{ll} \text{coo_val}[8] & = \{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0\} \\\ \text{coo_ind}[16] & = \{0, 0, 0, 1, 0, 3, 1, 1, 1, 2, 2, 0, 2, 3, 2, 4\} \\\ \end{array} \end{aligned}$$

CSR storage format

The Compressed Sparse Row (CSR) storage format represents a m × n matrix by

m number of rows (integer).
n number of columns (integer).
nnz number of non-zero elements (integer).
csr_val array of nnz elements containing the data (floating point).
csr_row_ptr array of m+1 elements that point to the start of every row (integer).
csr_col_ind array of nnz elements containing the column indices (integer).

The CSR matrix is expected to be sorted by column indices within each row. Furthermore, each pair of indices should appear only once. Consider the following 3 × 5 matrix and the corresponding CSR structures, with m = 3, n = 5 and nnz = 8 using one based indexing:

$$\begin{aligned} A = \begin{pmatrix} 1.0 & 2.0 & 0.0 & 3.0 & 0.0 \\\ 0.0 & 4.0 & 5.0 & 0.0 & 0.0 \\\ 6.0 & 0.0 & 0.0 & 7.0 & 8.0 \\\ \end{pmatrix} \end{aligned}$$

where

$$\begin{aligned} \begin{array}{ll} \text{csr_val}[8] & = \{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0\} \\\ \text{csr_row_ptr}[4] & = \{1, 4, 6, 9\} \\\ \text{csr_col_ind}[8] & = \{1, 2, 4, 2, 3, 1, 4, 5\} \end{array} \end{aligned}$$

BSR storage format

The Block Compressed Sparse Row (BSR) storage format represents a (mb ⋅ bsr_dim) × (nb ⋅ bsr_dim) matrix by

mb number of block rows (integer)
nb number of block columns (integer)
nnzb number of non-zero blocks (integer)
bsr_val array of nnzb * bsr_dim * bsr_dim elements containing the data (floating point). Blocks can be stored column-major or row-major.
bsr_row_ptr array of mb+1 elements that point to the start of every block row (integer).
bsr_col_ind array of nnzb elements containing the block column indices (integer).
bsr_dim dimension of each block (integer).

The BSR matrix is expected to be sorted by column indices within each row. If m or n are not evenly divisible by the block dimension, then zeros are padded to the matrix, such that mb = (m + bsr_dim − 1)/bsr_dim and nb = (n + bsr_dim − 1)/bsr_dim. Consider the following 4 × 3 matrix and the corresponding BSR structures, with bsr_dim = 2, mb = 2, nb = 2 and nnzb = 4 using zero based indexing and column-major storage:

$$\begin{aligned} A = \begin{pmatrix} 1.0 & 0.0 & 2.0 \\\ 3.0 & 0.0 & 4.0 \\\ 5.0 & 6.0 & 0.0 \\\ 7.0 & 0.0 & 8.0 \\\ \end{pmatrix} \end{aligned}$$

with the blocks Aij

$$\begin{aligned} A_{00} = \begin{pmatrix} 1.0 & 0.0 \\\ 3.0 & 0.0 \\\ \end{pmatrix}, A_{01} = \begin{pmatrix} 2.0 & 0.0 \\\ 4.0 & 0.0 \\\ \end{pmatrix}, A_{10} = \begin{pmatrix} 5.0 & 6.0 \\\ 7.0 & 0.0 \\\ \end{pmatrix}, A_{11} = \begin{pmatrix} 0.0 & 0.0 \\\ 8.0 & 0.0 \\\ \end{pmatrix} \end{aligned}$$

such that

$$\begin{aligned} A = \begin{pmatrix} A_{00} & A_{01} \\\ A_{10} & A_{11} \\\ \end{pmatrix} \end{aligned}$$

with arrays representation

$$\begin{aligned} \begin{array}{ll} \text{bsr_val}[16] & = \{1.0, 3.0, 0.0, 0.0, 2.0, 4.0, 0.0, 0.0, 5.0, 7.0, 6.0, 0.0, 0.0, 8.0, 0.0, 0.0\} \\\ \text{bsr_row_ptr}[3] & = \{0, 2, 4\} \\\ \text{bsr_col_ind}[4] & = \{0, 1, 0, 1\} \end{array} \end{aligned}$$

GEBSR storage format

The General Block Compressed Sparse Row (GEBSR) storage format represents a (mb ⋅ bsr_row_dim) × (nb ⋅ bsr_col_dim) matrix by

mb number of block rows (integer)
nb number of block columns (integer)
nnzb number of non-zero blocks (integer)
bsr_val array of nnzb * bsr_row_dim * bsr_col_dim elements containing the data (floating point). Blocks can be stored column-major or row-major.
bsr_row_ptr array of mb+1 elements that point to the start of every block row (integer).
bsr_col_ind array of nnzb elements containing the block column indices (integer).
bsr_row_dim row dimension of each block (integer).
bsr_col_dim column dimension of each block (integer).

The GEBSR matrix is expected to be sorted by column indices within each row. If m is not evenly divisible by the row block dimension or n is not evenly divisible by the column block dimension, then zeros are padded to the matrix, such that mb = (m + bsr_row_dim − 1)/bsr_row_dim and nb = (n + bsr_col_dim − 1)/bsr_col_dim. Consider the following 4 × 5 matrix and the corresponding GEBSR structures, with bsr_row_dim = 2, bsr_col_dim = 3, mb = 2, nb = 2` and nnzb = 4 using zero based indexing and column-major storage:

$$\begin{aligned} A = \begin{pmatrix} 1.0 & 0.0 & 0.0 & 2.0 & 0.0 \\\ 3.0 & 0.0 & 4.0 & 0.0 & 0.0 \\\ 5.0 & 6.0 & 0.0 & 7.0 & 0.0 \\\ 0.0 & 0.0 & 8.0 & 0.0 & 9.0 \\\ \end{pmatrix} \end{aligned}$$

with the blocks Aij

$$\begin{aligned} A_{00} = \begin{pmatrix} 1.0 & 0.0 & 0.0 \\\ 3.0 & 0.0 & 4.0 \\\ \end{pmatrix}, A_{01} = \begin{pmatrix} 2.0 & 0.0 & 0.0 \\\ 0.0 & 0.0 & 0.0 \\\ \end{pmatrix}, A_{10} = \begin{pmatrix} 5.0 & 6.0 & 0.0 \\\ 0.0 & 0.0 & 8.0 \\\ \end{pmatrix}, A_{11} = \begin{pmatrix} 7.0 & 0.0 & 0.0 \\\ 0.0 & 9.0 & 0.0 \\\ \end{pmatrix} \end{aligned}$$

such that

$$\begin{aligned} A = \begin{pmatrix} A_{00} & A_{01} \\\ A_{10} & A_{11} \\\ \end{pmatrix} \end{aligned}$$

with arrays representation

$$\begin{aligned} \begin{array}{ll} \text{bsr_val}[24] & = \{1.0, 3.0, 0.0, 0.0, 0.0, 4.0, 2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 5.0, 0.0, 6.0, 0.0, 0.0, 8.0, 7.0, 0.0, 0.0, 9.0, 0.0, 0.0\} \\\ \text{bsr_row_ptr}[3] & = \{0, 2, 4\} \\\ \text{bsr_col_ind}[4] & = \{0, 1, 0, 1\} \end{array} \end{aligned}$$

ELL storage format

The Ellpack-Itpack (ELL) storage format represents a m × n matrix by

m number of rows (integer).
n number of columns (integer).
ell_width maximum number of non-zero elements per row (integer)
ell_val array of m times ell_width elements containing the data (floating point).
ell_col_ind array of m times ell_width elements containing the column indices (integer).

The ELL matrix is assumed to be stored in column-major format. Rows with less than ell_width non-zero elements are padded with zeros (ell_val) and  − 1 (ell_col_ind). Consider the following 3 × 5 matrix and the corresponding ELL structures, with m = 3, n = 5 and ell_width = 3 using zero based indexing:

$$\begin{aligned} A = \begin{pmatrix} 1.0 & 2.0 & 0.0 & 3.0 & 0.0 \\\ 0.0 & 4.0 & 5.0 & 0.0 & 0.0 \\\ 6.0 & 0.0 & 0.0 & 7.0 & 8.0 \\\ \end{pmatrix} \end{aligned}$$

where

$$\begin{aligned} \begin{array}{ll} \text{ell_val}[9] & = \{1.0, 4.0, 6.0, 2.0, 5.0, 7.0, 3.0, 0.0, 8.0\} \\\ \text{ell_col_ind}[9] & = \{0, 1, 0, 1, 2, 3, 3, -1, 4\} \end{array} \end{aligned}$$

HYB storage format

The Hybrid (HYB) storage format represents a m × n matrix by

m number of rows (integer).
n number of columns (integer).
nnz number of non-zero elements of the COO part (integer)
ell_width maximum number of non-zero elements per row of the ELL part (integer)
ell_val array of m times ell_width elements containing the ELL part data (floating point).
ell_col_ind array of m times ell_width elements containing the ELL part column indices (integer).
coo_val array of nnz elements containing the COO part data (floating point).
coo_row_ind array of nnz elements containing the COO part row indices (integer).
coo_col_ind array of nnz elements containing the COO part column indices (integer).

The HYB format is a combination of the ELL and COO sparse matrix formats. Typically, the regular part of the matrix is stored in ELL storage format, and the irregular part of the matrix is stored in COO storage format. Three different partitioning schemes can be applied when converting a CSR matrix to a matrix in HYB storage format. For further details on the partitioning schemes, see rocsparse_hyb_partition_.

Types

rocsparse_handle

rocsparse_handle

rocsparse_mat_descr

rocsparse_mat_descr

rocsparse_mat_info

rocsparse_mat_info

rocsparse_hyb_mat

rocsparse_hyb_mat

For more details on the HYB format, see HYB storage format.

rocsparse_action

rocsparse_action

rocsparse_hyb_partition

rocsparse_hyb_partition

rocsparse_index_base

rocsparse_index_base

rocsparse_matrix_type

rocsparse_matrix_type

rocsparse_fill_mode

rocsparse_fill_mode

rocsparse_diag_type

rocsparse_diag_type

rocsparse_operation

rocsparse_operation

rocsparse_pointer_mode

rocsparse_pointer_mode

rocsparse_analysis_policy

rocsparse_analysis_policy

rocsparse_solve_policy

rocsparse_solve_policy

rocsparse_layer_mode

rocsparse_layer_mode

For more details on logging, see rocsparse_logging.

rocsparse_status

rocsparse_status

rocsparse_indextype

rocsparse_indextype

rocsparse_datatype

rocsparse_datatype

rocsparse_format

rocsparse_format

rocsparse_spmv_alg

rocsparse_spmv_alg

rocsparse_spsv_alg

rocsparse_spsv_alg

rocsparse_spsv_stage

rocsparse_spsv_stage

rocsparse_spsm_alg

rocsparse_spsm_alg

rocsparse_spsm_stage

rocsparse_spsm_stage

rocsparse_spmm_alg

rocsparse_spmm_alg

rocsparse_spmm_stage

rocsparse_spmm_stage

rocsparse_sddmm_alg

rocsparse_sddmm_alg

rocsparse_spgemm_stage

rocsparse_spgemm_stage

rocsparse_spgemm_alg

rocsparse_spgemm_alg

rocsparse_sparse_to_dense_alg

rocsparse_sparse_to_dense_alg

rocsparse_dense_to_sparse_alg

rocsparse_dense_to_sparse_alg

rocsparse_gtsv_interleaved_alg

rocsparse_gtsv_interleaved_alg

Logging

Three different environment variables can be set to enable logging in rocSPARSE: ROCSPARSE_LAYER, ROCSPARSE_LOG_TRACE_PATH and ROCSPARSE_LOG_BENCH_PATH.

ROCSPARSE_LAYER is a bit mask, where several logging modes (rocsparse_layer_mode_) can be combined as follows:

ROCSPARSE_LAYER unset logging is disabled.
ROCSPARSE_LAYER set to 1 trace logging is enabled.
ROCSPARSE_LAYER set to 2 bench logging is enabled.
ROCSPARSE_LAYER set to 3 trace logging and bench logging is enabled.

When logging is enabled, each rocSPARSE function call will write the function name as well as function arguments to the logging stream. The default logging stream is stderr.

If the user sets the environment variable ROCSPARSE_LOG_TRACE_PATH to the full path name for a file, the file is opened and trace logging is streamed to that file. If the user sets the environment variable ROCSPARSE_LOG_BENCH_PATH to the full path name for a file, the file is opened and bench logging is streamed to that file. If the file cannot be opened, logging output is stream to stderr.

Note that performance will degrade when logging is enabled. By default, the environment variable ROCSPARSE_LAYER is unset and logging is disabled.

Exported Sparse Functions

Auxiliary Functions

Function name
:cpprocsparse_create_handle
:cpprocsparse_destroy_handle
:cpprocsparse_set_stream
:cpprocsparse_get_stream
:cpprocsparse_set_pointer_mode
:cpprocsparse_get_pointer_mode
:cpprocsparse_get_version
:cpprocsparse_get_git_rev
:cpprocsparse_create_mat_descr
:cpprocsparse_destroy_mat_descr
:cpprocsparse_copy_mat_descr
:cpprocsparse_set_mat_index_base
:cpprocsparse_get_mat_index_base
:cpprocsparse_set_mat_type
:cpprocsparse_get_mat_type
:cpprocsparse_set_mat_fill_mode
:cpprocsparse_get_mat_fill_mode
:cpprocsparse_set_mat_diag_type
:cpprocsparse_get_mat_diag_type
:cpprocsparse_create_hyb_mat
:cpprocsparse_destroy_hyb_mat
:cpprocsparse_create_mat_info
:cpprocsparse_copy_mat_info
:cpprocsparse_destroy_mat_info
:cpprocsparse_create_spvec_descr
:cpprocsparse_destroy_spvec_descr
:cpprocsparse_spvec_get
:cpprocsparse_spvec_get_index_base
:cpprocsparse_spvec_get_values
:cpprocsparse_spvec_set_values
:cpprocsparse_create_coo_descr
:cpprocsparse_create_csr_descr
:cpprocsparse_create_csc_descr
:cpprocsparse_create_ell_descr
:cpprocsparse_destroy_spmat_descr
:cpprocsparse_coo_get
:cpprocsparse_csr_get
:cpprocsparse_ell_get
:cpprocsparse_coo_set_pointers
:cpprocsparse_csr_set_pointers
:cpprocsparse_csc_set_pointers
:cpprocsparse_ell_set_pointers
:cpprocsparse_spmat_get_size
:cpprocsparse_spmat_get_index_base
:cpprocsparse_spmat_get_values
:cpprocsparse_spmat_set_values
:cpprocsparse_create_dnvec_descr
:cpprocsparse_destroy_dnvec_descr
:cpprocsparse_dnvec_get
:cpprocsparse_dnvec_get_values
:cpprocsparse_dnvec_set_values

Sparse Level 1 Functions

Function name single double single complex double complex
:cpprocsparse_Xaxpyi() <rocsparse_saxpyi> x x x x

:cpprocsparse_Xdoti() <rocsparse_sdoti> :cpprocsparse_Xdotci() <rocsparse_cdotci>

x

x

x x

x x

:cpprocsparse_Xgthr() <rocsparse_sgthr> x x x x

:cpprocsparse_Xgthrz() <rocsparse_sgthrz> :cpprocsparse_Xroti() <rocsparse_sroti>

x x

x x

x

x

:cpprocsparse_Xsctr() <rocsparse_ssctr> x x x x

Sparse Level 2 Functions

Function name single double single complex double complex
:cpprocsparse_Xbsrmv() <rocsparse_sbsrmv> x x x x
:cpprocsparse_Xbsrxmv() <rocsparse_sbsrxmv> x x x x
:cpprocsparse_Xbsrsv_buffer_size() <rocsparse_sbsrsv_buffer_size> x x x x

:cpprocsparse_Xbsrsv_analysis() <rocsparse_sbsrsv_analysis> :cpprocsparse_bsrsv_zero_pivot :cpprocsparse_bsrsv_clear

x

x

x

x

:cpprocsparse_Xbsrsv_solve() <rocsparse_sbsrsv_solve> x x x x
:cpprocsparse_Xcoomv() <rocsparse_scoomv> x x x x

:cpprocsparse_Xcsrmv_analysis() <rocsparse_scsrmv_analysis> :cpprocsparse_csrmv_clear

x

x

x

x

:cpprocsparse_Xcsrmv() <rocsparse_scsrmv> x x x x
:cpprocsparse_Xcsrsv_buffer_size() <rocsparse_scsrsv_buffer_size> x x x x

:cpprocsparse_Xcsrsv_analysis() <rocsparse_scsrsv_analysis> :cpprocsparse_csrsv_zero_pivot :cpprocsparse_csrsv_clear

x

x

x

x

:cpprocsparse_Xcsrsv_solve() <rocsparse_scsrsv_solve> x x x x
:cpprocsparse_Xellmv() <rocsparse_sellmv> x x x x
:cpprocsparse_Xhybmv() <rocsparse_shybmv> x x x x
:cpprocsparse_Xgebsrmv() <rocsparse_sgebsrmv> x x x x
:cpprocsparse_Xgemvi_buffer_size() <rocsparse_sgemvi_buffer_size> x x x x
:cpprocsparse_Xgemvi() <rocsparse_sgemvi> x x x x

Sparse Level 3 Functions

Function name single double single complex double complex
:cpprocsparse_Xbsrmm() <rocsparse_sbsrmm> x x x x
:cpprocsparse_Xgebsrmm() <rocsparse_sgebsrmm> x x x x
:cpprocsparse_Xcsrmm() <rocsparse_scsrmm> x x x x
:cpprocsparse_Xcsrsm_buffer_size() <rocsparse_scsrsm_buffer_size> x x x x

:cpprocsparse_Xcsrsm_analysis() <rocsparse_scsrsm_analysis> :cpprocsparse_csrsm_zero_pivot :cpprocsparse_csrsm_clear

x

x

x

x

:cpprocsparse_Xcsrsm_solve() <rocsparse_scsrsm_solve> x x x x
:cpprocsparse_Xbsrsm_buffer_size() <rocsparse_sbsrsm_buffer_size> x x x x

:cpprocsparse_Xbsrsm_analysis() <rocsparse_sbsrsm_analysis> :cpprocsparse_bsrsm_zero_pivot :cpprocsparse_bsrsm_clear

x

x

x

x

:cpprocsparse_Xbsrsm_solve() <rocsparse_sbsrsm_solve> x x x x
:cpprocsparse_Xgemmi() <rocsparse_sgemmi> x x x x

Sparse Extra Functions

Function name single double single complex double complex
:cpprocsparse_csrgeam_nnz
:cpprocsparse_Xcsrgeam() <rocsparse_scsrgeam> x x x x

:cpprocsparse_Xcsrgemm_buffer_size() <rocsparse_scsrgemm_buffer_size> :cpprocsparse_csrgemm_nnz :cpprocsparse_csrgemm_symbolic

x

x

x

x

:cpprocsparse_Xcsrgemm() <rocsparse_scsrgemm> x x x x
:cpprocsparse_Xcsrgemm_numeric() <rocsparse_scsrgemm_numeric> x x x x

Preconditioner Functions

Function name single double single complex double complex
:cpprocsparse_Xbsric0_buffer_size() <rocsparse_sbsric0_buffer_size> x x x x

:cpprocsparse_Xbsric0_analysis() <rocsparse_sbsric0_analysis> :cpprocsparse_bsric0_zero_pivot :cpprocsparse_bsric0_clear

x

x

x

x

:cpprocsparse_Xbsric0() <rocsparse_sbsric0> x x x x
:cpprocsparse_Xbsrilu0_buffer_size() <rocsparse_sbsrilu0_buffer_size> x x x x

:cpprocsparse_Xbsrilu0_analysis() <rocsparse_sbsrilu0_analysis> :cpprocsparse_bsrilu0_zero_pivot

x

x

x

x

:cpprocsparse_Xbsrilu0_numeric_boost() <rocsparse_sbsrilu0_numeric_boost> :cpprocsparse_bsrilu0_clear

x

x

x

x

:cpprocsparse_Xbsrilu0() <rocsparse_sbsrilu0> x x x x
:cpprocsparse_Xcsric0_buffer_size() <rocsparse_scsric0_buffer_size> x x x x

:cpprocsparse_Xcsric0_analysis() <rocsparse_scsric0_analysis> :cpprocsparse_csric0_zero_pivot :cpprocsparse_csric0_clear

x

x

x

x

:cpprocsparse_Xcsric0() <rocsparse_scsric0> x x x x
:cpprocsparse_Xcsrilu0_buffer_size() <rocsparse_scsrilu0_buffer_size> x x x x
:cpprocsparse_Xcsrilu0_numeric_boost() <rocsparse_scsrilu0_numeric_boost> x x x x

:cpprocsparse_Xcsrilu0_analysis() <rocsparse_scsrilu0_analysis> :cpprocsparse_csrilu0_zero_pivot :cpprocsparse_csrilu0_clear

x

x

x

x

:cpprocsparse_Xcsrilu0() <rocsparse_scsrilu0> x x x x
:cpprocsparse_Xgtsv_buffer_size() <rocsparse_sgtsv_buffer_size> x x x x
:cpprocsparse_Xgtsv() <rocsparse_sgtsv> x x x x
:cpprocsparse_Xgtsv_no_pivot_buffer_size() <rocsparse_sgtsv_no_pivot_buffer_size> x x x x
:cpprocsparse_Xgtsv_no_pivot() <rocsparse_sgtsv_no_pivot> x x x x
:cpprocsparse_Xgtsv_no_pivot_strided_batch_buffer_size() <rocsparse_sgtsv_no_pivot_strided_batch_buffer_size> x x x x
:cpprocsparse_Xgtsv_no_pivot_strided_batch() <rocsparse_sgtsv_no_pivot_strided_batch> x x x x
:cpprocsparse_Xgtsv_interleaved_batch_buffer_size() <rocsparse_sgtsv_interleaved_batch_buffer_size> x x x x
:cpprocsparse_Xgtsv_interleaved_batch() <rocsparse_sgtsv_interleaved_batch> x x x x
:cpprocsparse_Xgpsv_interleaved_batch_buffer_size() <rocsparse_sgpsv_interleaved_batch_buffer_size> x x x x

:cpprocsparse_Xgpsv_interleaved_batch() <rocsparse_sgpsv_interleaved_batch>

Conversion Functions

x

x

x

x

====================================================================================================================== === === === === === =========== === ==============
Function name

sin

gle dou ble single comp lex double complex

====================================================================================================================== :cpprocsparse_csr2coo :cpprocsparse_csr2csc_buffer_size

=== ===

=== ===

=== ===========

=== ==============

:cpprocsparse_Xcsr2csc() <rocsparse_scsr2csc>

x

x

x

x

:cpprocsparse_Xgebsr2gebsc_buffer_size

x

x

x

x

:cpprocsparse_Xgebsr2gebsc() <rocsparse_sgebsr2gebsc> :cpprocsparse_csr2ell_width

x

x

x

x

:cpprocsparse_Xcsr2ell() <rocsparse_scsr2ell>

x

x

x

x

:cpprocsparse_Xcsr2hyb() <rocsparse_scsr2hyb> :cpprocsparse_csr2bsr_nnz

x

x

x

x

:cpprocsparse_Xcsr2bsr() <rocsparse_scsr2bsr> :cpprocsparse_csr2gebsr_nnz

x

x

x

x

:cpprocsparse_Xcsr2gebsr_buffer_size() <rocsparse_scsr2gebsr_buffer_size>

x

x

x

x

:cpprocsparse_Xcsr2gebsr() <rocsparse_scsr2gebsr> :cpprocsparse_coo2csr :cpprocsparse_ell2csr_nnz

x

x

x

x

:cpprocsparse_Xell2csr() <rocsparse_sell2csr> :cpprocsparse_hyb2csr_buffer_size

x

x

x

x

:cpprocsparse_Xhyb2csr() <rocsparse_shyb2csr>

x

x

x

x

:cpprocsparse_Xbsr2csr() <rocsparse_sbsr2csr>

x

x

x

x

:cpprocsparse_Xgebsr2csr() <rocsparse_sgebsr2csr>

x

x

x

x

:cpprocsparse_Xgebsr2gebsr_buffer_size() <rocsparse_sgebsr2gebsr_buffer_size> :cpprocsparse_gebsr2gebsr_nnz()

x

x

x

x

:cpprocsparse_Xgebsr2gebsr() <rocsparse_sgebsr2gebsr>

x

x

x

x

:cpprocsparse_Xcsr2csr_compress() <rocsparse_scsr2csr_compress> :cpprocsparse_create_identity_permutation :cpprocsparse_cscsort_buffer_size :cpprocsparse_cscsort :cpprocsparse_csrsort_buffer_size :cpprocsparse_csrsort :cpprocsparse_coosort_buffer_size :cpprocsparse_coosort_by_row :cpprocsparse_coosort_by_column

x

x

x

x

:cpprocsparse_Xdense2csr() <rocsparse_sdense2csr>

x

x

x

x

:cpprocsparse_Xdense2csc() <rocsparse_sdense2csc>

x

x

x

x

:cpprocsparse_Xdense2coo() <rocsparse_sdense2coo>

x

x

x

x

:cpprocsparse_Xcsr2dense() <rocsparse_scsr2dense>

x

x

x

x

:cpprocsparse_Xcsc2dense() <rocsparse_scsc2dense>

x

x

x

x

:cpprocsparse_Xcoo2dense() <rocsparse_scoo2dense>

x

x

x

x

:cpprocsparse_Xnnz_compress() <rocsparse_snnz_compress>

x

x

x

x

:cpprocsparse_Xnnz() <rocsparse_snnz> :cpprocsparse_Xprune_dense2csr_buffer_size() <rocsparse_sprune_dense2csr_buffer_size> :cpprocsparse_Xprune_dense2csr_nnz() <rocsparse_sprune_dense2csr_nnz> :cpprocsparse_Xprune_dense2csr() <rocsparse_sprune_dense2csr> :cpprocsparse_Xprune_csr2csr_buffer_size() <rocsparse_sprune_csr2csr_buffer_size> :cpprocsparse_Xprune_csr2csr_nnz() <rocsparse_sprune_csr2csr_nnz> :cpprocsparse_Xprune_csr2csr() <rocsparse_sprune_csr2csr> :cpprocsparse_Xprune_dense2csr_by_percentage_buffer_size() <rocsparse_sprune_dense2csr_by_percentage_buffer_siz :cpp:func:`rocsparse_Xprune_dense2csr_nnz_by_percentage() <rocsparse_sprune_dense2csr_nnz_by_percentage> :cpprocsparse_Xprune_dense2csr_by_percentage() <rocsparse_sprune_dense2csr_by_percentage> :cpprocsparse_Xprune_csr2csr_by_percentage_buffer_size() <rocsparse_sprune_csr2csr_by_percentage_buffer_size> :cpprocsparse_Xprune_csr2csr_nnz_by_percentage() <rocsparse_sprune_csr2csr_nnz_by_percentage> :cpprocsparse_Xprune_csr2csr_by_percentage() <rocsparse_sprune_csr2csr_by_percentage>

x x x x x x x

e>` x

x x x x x

x x x x x x x x x x x x x

x

x

Reordering Functions

Function name single double single complex double complex
:cpprocsparse_Xcsrcolor() <rocsparse_scsrcolor> x x x x

Sparse Generic Functions

Function name single double single complex double complex
:cpprocsparse_axpby() x x x x
:cpprocsparse_gather() x x x x
:cpprocsparse_scatter() x x x x
:cpprocsparse_rot() x x x x
:cpprocsparse_spvv() x x x x
:cpprocsparse_sparse_to_dense() x x x x
:cpprocsparse_dense_to_sparse() x x x x
:cpprocsparse_spmv() x x x x
:cpprocsparse_spsv() x x x x
:cpprocsparse_spmm() x x x x
:cpprocsparse_spsm() x x x x
:cpprocsparse_spgemm() x x x x
:cpprocsparse_sddmm() x x x x

Storage schemes and indexing base

rocSPARSE supports 0 and 1 based indexing. The index base is selected by the :cpprocsparse_index_base type which is either passed as standalone parameter or as part of the :cpprocsparse_mat_descr type.

Furthermore, dense vectors are represented with a 1D array, stored linearly in memory. Sparse vectors are represented by a 1D data array stored linearly in memory that hold all non-zero elements and a 1D indexing array stored linearly in memory that hold the positions of the corresponding non-zero elements.

Pointer mode

The auxiliary functions :cpprocsparse_set_pointer_mode and :cpprocsparse_get_pointer_mode are used to set and get the value of the state variable :cpprocsparse_pointer_mode. If :cpprocsparse_pointer_mode is equal to :cpprocsparse_pointer_mode_host, then scalar parameters must be allocated on the host. If :cpprocsparse_pointer_mode is equal to :cpprocsparse_pointer_mode_device, then scalar parameters must be allocated on the device.

There are two types of scalar parameter:

  1. Scaling parameters, such as alpha and beta used in e.g. :cpprocsparse_scsrmv, :cpprocsparse_scoomv, ...
  2. Scalar results from functions such as :cpprocsparse_sdoti, :cpprocsparse_cdotci, ...

For scalar parameters such as alpha and beta, memory can be allocated on the host heap or stack, when :cpprocsparse_pointer_mode is equal to :cpprocsparse_pointer_mode_host. The kernel launch is asynchronous, and if the scalar parameter is on the heap, it can be freed after the return from the kernel launch. When :cpprocsparse_pointer_mode is equal to :cpprocsparse_pointer_mode_device, the scalar parameter must not be changed till the kernel completes.

For scalar results, when :cpprocsparse_pointer_mode is equal to :cpprocsparse_pointer_mode_host, the function blocks the CPU till the GPU has copied the result back to the host. Using :cpprocsparse_pointer_mode equal to :cpprocsparse_pointer_mode_device, the function will return after the asynchronous launch. Similarly to vector and matrix results, the scalar result is only available when the kernel has completed execution.

Asynchronous API

Except a functions having memory allocation inside preventing asynchronicity, all rocSPARSE functions are configured to operate in non-blocking fashion with respect to CPU, meaning these library functions return immediately.

hipSPARSE

hipSPARSE is a SPARSE marshalling library, with multiple supported backends. It sits between the application and a worker SPARSE library, marshalling inputs into the backend library and marshalling results back to the application. hipSPARSE exports an interface that does not require the client to change, regardless of the chosen backend. Currently, hipSPARSE supports rocSPARSE and cuSPARSE as backends. hipSPARSE focuses on convenience and portability. If performance outweighs these factors, then using rocSPARSE itself is highly recommended. hipSPARSE can be found on GitHub.

Sparse Auxiliary Functions

This module holds all sparse auxiliary functions.

The functions that are contained in the auxiliary module describe all available helper functions that are required for subsequent library calls.

rocsparse_create_handle()

rocsparse_create_handle

rocsparse_destroy_handle()

rocsparse_destroy_handle

rocsparse_set_stream()

rocsparse_set_stream

rocsparse_get_stream()

rocsparse_get_stream

rocsparse_set_pointer_mode()

rocsparse_set_pointer_mode

rocsparse_get_pointer_mode()

rocsparse_get_pointer_mode

rocsparse_get_version()

rocsparse_get_version

rocsparse_get_git_rev()

rocsparse_get_git_rev

rocsparse_create_mat_descr()

rocsparse_create_mat_descr

rocsparse_destroy_mat_descr()

rocsparse_destroy_mat_descr

rocsparse_copy_mat_descr()

rocsparse_copy_mat_descr

rocsparse_set_mat_index_base()

rocsparse_set_mat_index_base

rocsparse_get_mat_index_base()

rocsparse_get_mat_index_base

rocsparse_set_mat_type()

rocsparse_set_mat_type

rocsparse_get_mat_type()

rocsparse_get_mat_type

rocsparse_set_mat_fill_mode()

rocsparse_set_mat_fill_mode

rocsparse_get_mat_fill_mode()

rocsparse_get_mat_fill_mode

rocsparse_set_mat_diag_type()

rocsparse_set_mat_diag_type

rocsparse_get_mat_diag_type()

rocsparse_get_mat_diag_type

rocsparse_create_hyb_mat()

rocsparse_create_hyb_mat

rocsparse_destroy_hyb_mat()

rocsparse_destroy_hyb_mat

rocsparse_create_mat_info()

rocsparse_create_mat_info

rocsparse_copy_mat_info()

rocsparse_copy_mat_info

rocsparse_destroy_mat_info()

rocsparse_destroy_mat_info

rocsparse_create_spvec_descr()

rocsparse_create_spvec_descr

rocsparse_destroy_spvec_descr()

rocsparse_destroy_spvec_descr

rocsparse_spvec_get()

rocsparse_spvec_get

rocsparse_spvec_get_index_base()

rocsparse_spvec_get_index_base

rocsparse_spvec_get_values()

rocsparse_spvec_get_values

rocsparse_spvec_set_values()

rocsparse_spvec_set_values

rocsparse_create_coo_descr

rocsparse_create_coo_descr

rocsparse_create_csr_descr

rocsparse_create_csr_descr

rocsparse_create_csc_descr

rocsparse_create_csc_descr

rocsparse_create_ell_descr

rocsparse_create_ell_descr

rocsparse_destroy_spmat_descr

rocsparse_destroy_spmat_descr

rocsparse_coo_get

rocsparse_coo_get

rocsparse_csr_get

rocsparse_csr_get

rocsparse_ell_get

rocsparse_ell_get

rocsparse_coo_set_pointers

rocsparse_coo_set_pointers

rocsparse_csr_set_pointers

rocsparse_csr_set_pointers

rocsparse_csc_set_pointers

rocsparse_csc_set_pointers

rocsparse_ell_set_pointers

rocsparse_ell_set_pointers

rocsparse_spmat_get_size

rocsparse_spmat_get_size

rocsparse_spmat_get_index_base

rocsparse_spmat_get_index_base

rocsparse_spmat_get_values

rocsparse_spmat_get_values

rocsparse_spmat_set_values

rocsparse_spmat_set_values

rocsparse_create_dnvec_descr

rocsparse_create_dnvec_descr

rocsparse_destroy_dnvec_descr

rocsparse_destroy_dnvec_descr

rocsparse_dnvec_get

rocsparse_dnvec_get

rocsparse_dnvec_get_values

rocsparse_dnvec_get_values

rocsparse_dnvec_set_values

rocsparse_dnvec_set_values

Sparse Level 1 Functions

The sparse level 1 routines describe operations between a vector in sparse format and a vector in dense format. This section describes all rocSPARSE level 1 sparse linear algebra functions.

rocsparse_axpyi()

rocsparse_saxpyi

rocsparse_daxpyi

rocsparse_caxpyi

rocsparse_zaxpyi

rocsparse_doti()

rocsparse_sdoti

rocsparse_ddoti

rocsparse_cdoti

rocsparse_zdoti

rocsparse_dotci()

rocsparse_cdotci

rocsparse_zdotci

rocsparse_gthr()

rocsparse_sgthr

rocsparse_dgthr

rocsparse_cgthr

rocsparse_zgthr

rocsparse_gthrz()

rocsparse_sgthrz

rocsparse_dgthrz

rocsparse_cgthrz

rocsparse_zgthrz

rocsparse_roti()

rocsparse_sroti

rocsparse_droti

rocsparse_sctr()

rocsparse_ssctr

rocsparse_dsctr

rocsparse_csctr

rocsparse_zsctr

Sparse Level 2 Functions

This module holds all sparse level 2 routines.

The sparse level 2 routines describe operations between a matrix in sparse format and a vector in dense format.

rocsparse_bsrmv()

rocsparse_sbsrmv

rocsparse_dbsrmv

rocsparse_cbsrmv

rocsparse_zbsrmv

rocsparse_bsrxmv()

rocsparse_sbsrxmv

rocsparse_dbsrxmv

rocsparse_cbsrxmv

rocsparse_zbsrxmv

rocsparse_bsrsv_zero_pivot()

rocsparse_bsrsv_zero_pivot

rocsparse_bsrsv_buffer_size()

rocsparse_sbsrsv_buffer_size

rocsparse_dbsrsv_buffer_size

rocsparse_cbsrsv_buffer_size

rocsparse_zbsrsv_buffer_size

rocsparse_bsrsv_analysis()

rocsparse_sbsrsv_analysis

rocsparse_dbsrsv_analysis

rocsparse_cbsrsv_analysis

rocsparse_zbsrsv_analysis

rocsparse_bsrsv_solve()

rocsparse_sbsrsv_solve

rocsparse_dbsrsv_solve

rocsparse_cbsrsv_solve

rocsparse_zbsrsv_solve

rocsparse_bsrsv_clear()

rocsparse_bsrsv_clear

rocsparse_coomv()

rocsparse_scoomv

rocsparse_dcoomv

rocsparse_ccoomv

rocsparse_zcoomv

rocsparse_csrmv_analysis()

rocsparse_scsrmv_analysis

rocsparse_dcsrmv_analysis

rocsparse_ccsrmv_analysis

rocsparse_zcsrmv_analysis

rocsparse_csrmv()

rocsparse_scsrmv

rocsparse_dcsrmv

rocsparse_ccsrmv

rocsparse_zcsrmv

rocsparse_csrmv_analysis_clear()

rocsparse_csrmv_clear

rocsparse_csrsv_zero_pivot()

rocsparse_csrsv_zero_pivot

rocsparse_csrsv_buffer_size()

rocsparse_scsrsv_buffer_size

rocsparse_dcsrsv_buffer_size

rocsparse_ccsrsv_buffer_size

rocsparse_zcsrsv_buffer_size

rocsparse_csrsv_analysis()

rocsparse_scsrsv_analysis

rocsparse_dcsrsv_analysis

rocsparse_ccsrsv_analysis

rocsparse_zcsrsv_analysis

rocsparse_csrsv_solve()

rocsparse_scsrsv_solve

rocsparse_dcsrsv_solve

rocsparse_ccsrsv_solve

rocsparse_zcsrsv_solve

rocsparse_csrsv_clear()

rocsparse_csrsv_clear

rocsparse_ellmv()

rocsparse_sellmv

rocsparse_dellmv

rocsparse_cellmv

rocsparse_zellmv

rocsparse_hybmv()

rocsparse_shybmv

rocsparse_dhybmv

rocsparse_chybmv

rocsparse_zhybmv

rocsparse_gebsrmv()

rocsparse_sgebsrmv

rocsparse_dgebsrmv

rocsparse_cgebsrmv

rocsparse_zgebsrmv

rocsparse_gemvi_buffer_size()

rocsparse_sgemvi_buffer_size

rocsparse_dgemvi_buffer_size

rocsparse_cgemvi_buffer_size

rocsparse_zgemvi_buffer_size

rocsparse_gemvi()

rocsparse_sgemvi

rocsparse_dgemvi

rocsparse_cgemvi

rocsparse_zgemvi

Sparse Level 3 Functions

This module holds all sparse level 3 routines.

The sparse level 3 routines describe operations between a matrix in sparse format and multiple vectors in dense format that can also be seen as a dense matrix.

rocsparse_bsrmm()

rocsparse_sbsrmm

rocsparse_dbsrmm

rocsparse_cbsrmm

rocsparse_zbsrmm

rocsparse_gebsrmm()

rocsparse_sgebsrmm

rocsparse_dgebsrmm

rocsparse_cgebsrmm

rocsparse_zgebsrmm

rocsparse_csrmm()

rocsparse_scsrmm

rocsparse_dcsrmm

rocsparse_ccsrmm

rocsparse_zcsrmm

rocsparse_csrsm_zero_pivot()

rocsparse_csrsm_zero_pivot

rocsparse_csrsm_buffer_size()

rocsparse_scsrsm_buffer_size

rocsparse_dcsrsm_buffer_size

rocsparse_ccsrsm_buffer_size

rocsparse_zcsrsm_buffer_size

rocsparse_csrsm_analysis()

rocsparse_scsrsm_analysis

rocsparse_dcsrsm_analysis

rocsparse_ccsrsm_analysis

rocsparse_zcsrsm_analysis

rocsparse_csrsm_solve()

rocsparse_scsrsm_solve

rocsparse_dcsrsm_solve

rocsparse_ccsrsm_solve

rocsparse_zcsrsm_solve

rocsparse_csrsm_clear()

rocsparse_csrsm_clear

rocsparse_bsrsm_zero_pivot()

rocsparse_bsrsm_zero_pivot

rocsparse_bsrsm_buffer_size()

rocsparse_sbsrsm_buffer_size

rocsparse_dbsrsm_buffer_size

rocsparse_cbsrsm_buffer_size

rocsparse_zbsrsm_buffer_size

rocsparse_bsrsm_analysis()

rocsparse_sbsrsm_analysis

rocsparse_dbsrsm_analysis

rocsparse_cbsrsm_analysis

rocsparse_zbsrsm_analysis

rocsparse_bsrsm_solve()

rocsparse_sbsrsm_solve

rocsparse_dbsrsm_solve

rocsparse_cbsrsm_solve

rocsparse_zbsrsm_solve

rocsparse_bsrsm_clear()

rocsparse_bsrsm_clear

rocsparse_gemmi()

rocsparse_sgemmi

rocsparse_dgemmi

rocsparse_cgemmi

rocsparse_zgemmi

Sparse Extra Functions

This module holds all sparse extra routines.

The sparse extra routines describe operations that manipulate sparse matrices.

rocsparse_csrgeam_nnz()

rocsparse_csrgeam_nnz

rocsparse_csrgeam()

rocsparse_scsrgeam

rocsparse_dcsrgeam

rocsparse_ccsrgeam

rocsparse_zcsrgeam

rocsparse_csrgemm_buffer_size()

rocsparse_scsrgemm_buffer_size

rocsparse_dcsrgemm_buffer_size

rocsparse_ccsrgemm_buffer_size

rocsparse_zcsrgemm_buffer_size

rocsparse_csrgemm_nnz()

rocsparse_csrgemm_nnz

rocsparse_csrgemm_symbolic()

rocsparse_csrgemm_symbolic

rocsparse_csrgemm()

rocsparse_scsrgemm

rocsparse_dcsrgemm

rocsparse_ccsrgemm

rocsparse_zcsrgemm

rocsparse_csrgemm_numeric()

rocsparse_scsrgemm_numeric

rocsparse_dcsrgemm_numeric

rocsparse_ccsrgemm_numeric

rocsparse_zcsrgemm_numeric

Preconditioner Functions

This module holds all sparse preconditioners.

The sparse preconditioners describe manipulations on a matrix in sparse format to obtain a sparse preconditioner matrix.

rocsparse_bsric0_zero_pivot()

rocsparse_bsric0_zero_pivot

rocsparse_bsric0_buffer_size()

rocsparse_sbsric0_buffer_size

rocsparse_dbsric0_buffer_size

rocsparse_cbsric0_buffer_size

rocsparse_zbsric0_buffer_size

rocsparse_bsric0_analysis()

rocsparse_sbsric0_analysis

rocsparse_dbsric0_analysis

rocsparse_cbsric0_analysis

rocsparse_zbsric0_analysis

rocsparse_bsric0()

rocsparse_sbsric0

rocsparse_dbsric0

rocsparse_cbsric0

rocsparse_zbsric0

rocsparse_bsric0_clear()

rocsparse_bsric0_clear

rocsparse_bsrilu0_zero_pivot()

rocsparse_bsrilu0_zero_pivot

rocsparse_bsrilu0_numeric_boost()

rocsparse_sbsrilu0_numeric_boost

rocsparse_dbsrilu0_numeric_boost

rocsparse_cbsrilu0_numeric_boost

rocsparse_zbsrilu0_numeric_boost

rocsparse_bsrilu0_buffer_size()

rocsparse_sbsrilu0_buffer_size

rocsparse_dbsrilu0_buffer_size

rocsparse_cbsrilu0_buffer_size

rocsparse_zbsrilu0_buffer_size

rocsparse_bsrilu0_analysis()

rocsparse_sbsrilu0_analysis

rocsparse_dbsrilu0_analysis

rocsparse_cbsrilu0_analysis

rocsparse_zbsrilu0_analysis

rocsparse_bsrilu0()

rocsparse_sbsrilu0

rocsparse_dbsrilu0

rocsparse_cbsrilu0

rocsparse_zbsrilu0

rocsparse_bsrilu0_clear()

rocsparse_bsrilu0_clear

rocsparse_csric0_zero_pivot()

rocsparse_csric0_zero_pivot

rocsparse_csric0_buffer_size()

rocsparse_scsric0_buffer_size

rocsparse_dcsric0_buffer_size

rocsparse_ccsric0_buffer_size

rocsparse_zcsric0_buffer_size

rocsparse_csric0_analysis()

rocsparse_scsric0_analysis

rocsparse_dcsric0_analysis

rocsparse_ccsric0_analysis

rocsparse_zcsric0_analysis

rocsparse_csric0()

rocsparse_scsric0

rocsparse_dcsric0

rocsparse_ccsric0

rocsparse_zcsric0

rocsparse_csric0_clear()

rocsparse_csric0_clear

rocsparse_csrilu0_zero_pivot()

rocsparse_csrilu0_zero_pivot

rocsparse_csrilu0_numeric_boost()

rocsparse_scsrilu0_numeric_boost

rocsparse_dcsrilu0_numeric_boost

rocsparse_ccsrilu0_numeric_boost

rocsparse_zcsrilu0_numeric_boost

rocsparse_csrilu0_buffer_size()

rocsparse_scsrilu0_buffer_size

rocsparse_dcsrilu0_buffer_size

rocsparse_ccsrilu0_buffer_size

rocsparse_zcsrilu0_buffer_size

rocsparse_csrilu0_analysis()

rocsparse_scsrilu0_analysis

rocsparse_dcsrilu0_analysis

rocsparse_ccsrilu0_analysis

rocsparse_zcsrilu0_analysis

rocsparse_csrilu0()

rocsparse_scsrilu0

rocsparse_dcsrilu0

rocsparse_ccsrilu0

rocsparse_zcsrilu0

rocsparse_csrilu0_clear()

rocsparse_csrilu0_clear

rocsparse_gtsv_buffer_size()

rocsparse_sgtsv_buffer_size

rocsparse_dgtsv_buffer_size

rocsparse_cgtsv_buffer_size

rocsparse_zgtsv_buffer_size

rocsparse_gtsv()

rocsparse_sgtsv

rocsparse_dgtsv

rocsparse_cgtsv

rocsparse_zgtsv

rocsparse_gtsv_no_pivot_buffer_size()

rocsparse_sgtsv_no_pivot_buffer_size

rocsparse_dgtsv_no_pivot_buffer_size

rocsparse_cgtsv_no_pivot_buffer_size

rocsparse_zgtsv_no_pivot_buffer_size

rocsparse_gtsv_no_pivot()

rocsparse_sgtsv_no_pivot

rocsparse_dgtsv_no_pivot

rocsparse_cgtsv_no_pivot

rocsparse_zgtsv_no_pivot

rocsparse_gtsv_no_pivot_strided_batch_buffer_size()

rocsparse_sgtsv_no_pivot_strided_batch_buffer_size

rocsparse_dgtsv_no_pivot_strided_batch_buffer_size

rocsparse_cgtsv_no_pivot_strided_batch_buffer_size

rocsparse_zgtsv_no_pivot_strided_batch_buffer_size

rocsparse_gtsv_no_pivot_strided_batch()

rocsparse_sgtsv_no_pivot_strided_batch

rocsparse_dgtsv_no_pivot_strided_batch

rocsparse_cgtsv_no_pivot_strided_batch

rocsparse_zgtsv_no_pivot_strided_batch

rocsparse_gtsv_interleaved_batch_buffer_size()

rocsparse_sgtsv_interleaved_batch_buffer_size

rocsparse_dgtsv_interleaved_batch_buffer_size

rocsparse_cgtsv_interleaved_batch_buffer_size

rocsparse_zgtsv_interleaved_batch_buffer_size

rocsparse_gtsv_interleaved_batch()

rocsparse_sgtsv_interleaved_batch

rocsparse_dgtsv_interleaved_batch

rocsparse_cgtsv_interleaved_batch

rocsparse_zgtsv_interleaved_batch

rocsparse_gpsv_interleaved_batch_buffer_size()

rocsparse_sgpsv_interleaved_batch_buffer_size

rocsparse_dgpsv_interleaved_batch_buffer_size

rocsparse_cgpsv_interleaved_batch_buffer_size

rocsparse_zgpsv_interleaved_batch_buffer_size

rocsparse_gpsv_interleaved_batch()

rocsparse_sgpsv_interleaved_batch

rocsparse_dgpsv_interleaved_batch

rocsparse_cgpsv_interleaved_batch

rocsparse_zgpsv_interleaved_batch

Sparse Conversion Functions

This module holds all sparse conversion routines.

The sparse conversion routines describe operations on a matrix in sparse format to obtain a matrix in a different sparse format.

rocsparse_csr2coo()

rocsparse_csr2coo

rocsparse_coo2csr()

rocsparse_coo2csr

rocsparse_csr2csc_buffer_size()

rocsparse_csr2csc_buffer_size

rocsparse_csr2csc()

rocsparse_scsr2csc

rocsparse_dcsr2csc

rocsparse_ccsr2csc

rocsparse_zcsr2csc

rocsparse_gebsr2gebsc_buffer_size()

rocsparse_sgebsr2gebsc_buffer_size

rocsparse_dgebsr2gebsc_buffer_size

rocsparse_cgebsr2gebsc_buffer_size

rocsparse_zgebsr2gebsc_buffer_size

rocsparse_gebsr2gebsc()

rocsparse_sgebsr2gebsc

rocsparse_dgebsr2gebsc

rocsparse_cgebsr2gebsc

rocsparse_zgebsr2gebsc

rocsparse_csr2ell_width()

rocsparse_csr2ell_width

rocsparse_csr2ell()

rocsparse_scsr2ell

rocsparse_dcsr2ell

rocsparse_ccsr2ell

rocsparse_zcsr2ell

rocsparse_ell2csr_nnz()

rocsparse_ell2csr_nnz

rocsparse_ell2csr()

rocsparse_sell2csr

rocsparse_dell2csr

rocsparse_cell2csr

rocsparse_zell2csr

rocsparse_csr2hyb()

rocsparse_scsr2hyb

rocsparse_dcsr2hyb

rocsparse_ccsr2hyb

rocsparse_zcsr2hyb

rocsparse_hyb2csr_buffer_size()

rocsparse_hyb2csr_buffer_size

rocsparse_hyb2csr()

rocsparse_shyb2csr

rocsparse_dhyb2csr

rocsparse_chyb2csr

rocsparse_zhyb2csr

rocsparse_bsr2csr()

rocsparse_sbsr2csr

rocsparse_dbsr2csr

rocsparse_cbsr2csr

rocsparse_zbsr2csr

rocsparse_gebsr2csr()

rocsparse_sgebsr2csr

rocsparse_dgebsr2csr

rocsparse_cgebsr2csr

rocsparse_zgebsr2csr

rocsparse_gebsr2gebsr_buffer_size()

rocsparse_sgebsr2gebsr_buffer_size

rocsparse_dgebsr2gebsr_buffer_size

rocsparse_cgebsr2gebsr_buffer_size

rocsparse_zgebsr2gebsr_buffer_size

rocsparse_gebsr2gebsr_nnz()

rocsparse_gebsr2gebsr_nnz

rocsparse_gebsr2gebsr()

rocsparse_sgebsr2gebsr

rocsparse_dgebsr2gebsr

rocsparse_cgebsr2gebsr

rocsparse_zgebsr2gebsr

rocsparse_csr2bsr_nnz()

rocsparse_csr2bsr_nnz

rocsparse_csr2bsr()

rocsparse_scsr2bsr

rocsparse_dcsr2bsr

rocsparse_ccsr2bsr

rocsparse_zcsr2bsr

rocsparse_csr2gebsr_nnz()

rocsparse_csr2gebsr_nnz

rocsparse_csr2gebsr_buffer_size()

rocsparse_scsr2gebsr_buffer_size

rocsparse_dcsr2gebsr_buffer_size

rocsparse_ccsr2gebsr_buffer_size

rocsparse_zcsr2gebsr_buffer_size

rocsparse_csr2gebsr()

rocsparse_scsr2gebsr

rocsparse_dcsr2gebsr

rocsparse_ccsr2gebsr

rocsparse_zcsr2gebsr

rocsparse_csr2csr_compress()

rocsparse_scsr2csr_compress

rocsparse_dcsr2csr_compress

rocsparse_ccsr2csr_compress

rocsparse_zcsr2csr_compress

rocsparse_create_identity_permutation()

rocsparse_create_identity_permutation

rocsparse_csrsort_buffer_size()

rocsparse_csrsort_buffer_size

rocsparse_csrsort()

rocsparse_csrsort

rocsparse_cscsort_buffer_size()

rocsparse_cscsort_buffer_size

rocsparse_cscsort()

rocsparse_cscsort

rocsparse_coosort_buffer_size()

rocsparse_coosort_buffer_size

rocsparse_coosort_by_row()

rocsparse_coosort_by_row

rocsparse_coosort_by_column()

rocsparse_coosort_by_column

rocsparse_nnz_compress()

rocsparse_snnz_compress

rocsparse_dnnz_compress

rocsparse_cnnz_compress

rocsparse_znnz_compress

rocsparse_nnz()

rocsparse_snnz

rocsparse_dnnz

rocsparse_cnnz

rocsparse_znnz

rocsparse_dense2csr()

rocsparse_sdense2csr

rocsparse_ddense2csr

rocsparse_cdense2csr

rocsparse_zdense2csr

rocsparse_dense2csc()

rocsparse_sdense2csc

rocsparse_ddense2csc

rocsparse_cdense2csc

rocsparse_zdense2csc

rocsparse_dense2coo()

rocsparse_sdense2coo

rocsparse_ddense2coo

rocsparse_cdense2coo

rocsparse_zdense2coo

rocsparse_csr2dense()

rocsparse_scsr2dense

rocsparse_dcsr2dense

rocsparse_ccsr2dense

rocsparse_zcsr2dense

rocsparse_csc2dense()

rocsparse_scsc2dense

rocsparse_dcsc2dense

rocsparse_ccsc2dense

rocsparse_zcsc2dense

rocsparse_coo2dense()

rocsparse_scoo2dense

rocsparse_dcoo2dense

rocsparse_ccoo2dense

rocsparse_zcoo2dense

rocsparse_prune_dense2csr_buffer_size()

rocsparse_sprune_dense2csr_buffer_size

rocsparse_dprune_dense2csr_buffer_size

rocsparse_prune_dense2csr_nnz()

rocsparse_sprune_dense2csr_nnz

rocsparse_dprune_dense2csr_nnz

rocsparse_prune_dense2csr()

rocsparse_sprune_dense2csr

rocsparse_dprune_dense2csr

rocsparse_prune_csr2csr_buffer_size()

rocsparse_sprune_csr2csr_buffer_size

rocsparse_dprune_csr2csr_buffer_size

rocsparse_prune_csr2csr_nnz()

rocsparse_sprune_csr2csr_nnz

rocsparse_dprune_csr2csr_nnz

rocsparse_prune_csr2csr()

rocsparse_sprune_csr2csr

rocsparse_dprune_csr2csr

rocsparse_prune_dense2csr_by_percentage_buffer_size()

rocsparse_sprune_dense2csr_by_percentage_buffer_size

rocsparse_dprune_dense2csr_by_percentage_buffer_size

rocsparse_prune_dense2csr_nnz_by_percentage()

rocsparse_sprune_dense2csr_nnz_by_percentage

rocsparse_dprune_dense2csr_nnz_by_percentage

rocsparse_prune_dense2csr_by_percentage()

rocsparse_sprune_dense2csr_by_percentage

rocsparse_dprune_dense2csr_by_percentage

rocsparse_prune_csr2csr_by_percentage_buffer_size()

rocsparse_sprune_csr2csr_by_percentage_buffer_size

rocsparse_dprune_csr2csr_by_percentage_buffer_size

rocsparse_prune_csr2csr_nnz_by_percentage()

rocsparse_sprune_csr2csr_nnz_by_percentage

rocsparse_dprune_csr2csr_nnz_by_percentage

rocsparse_prune_csr2csr_by_percentage()

rocsparse_sprune_csr2csr_by_percentage

rocsparse_dprune_csr2csr_by_percentage

Reordering Functions

This module holds all sparse reordering routines.

The sparse reordering routines describe algorithm for reordering sparse matrices.

rocsparse_csrcolor()

rocsparse_scsrcolor

rocsparse_dcsrcolor

rocsparse_ccsrcolor

rocsparse_zcsrcolor

Sparse Generic Functions

This module holds all sparse generic routines.

The sparse generic routines describe operations that manipulate sparse matrices.

rocsparse_axpby()

rocsparse_axpby

rocsparse_gather()

rocsparse_gather

rocsparse_scatter()

rocsparse_scatter

rocsparse_rot()

rocsparse_rot

rocsparse_spvv()

rocsparse_spvv

rocsparse_spmv()

rocsparse_spmv

rocsparse_spsv()

rocsparse_spsv

rocsparse_spsm()

rocsparse_spsm

rocsparse_spmm()

rocsparse_spmm

rocsparse_spgemm()

rocsparse_spgemm

rocsparse_sddmm()

rocsparse_sddmm