Bitwise reproducibility#

Some routines do not produce deterministic results from run to run. This is typically the case when HIP atomics are used. This page catalogues the run-to-run reproducibility of each routine.

Sparse level 1 functions#

Sparse level 2 functions#

The reproducibility of rocsparse_Xbsrmv(), rocsparse_Xbsrxmv(), rocsparse_Xcoomv(), rocsparse_Xcsrmv(), rocsparse_Xellmv(), rocsparse_Xhybmv(), and rocsparse_Xgebsrmv() is more complicated, depending on whether A is transposed or not. See the chart below to determine whether these routines are deterministic.

Routine

A non-transpose

A transpose

Yes

No

Yes

No

rocsparse_Xbsrmv

x

N/A

N/A

rocsparse_Xbsrxmv

x

N/A

N/A

rocsparse_Xcoomv

x

x

rocsparse_Xcsrmv

x

x

rocsparse_Xcsrmv (info != NULL)

x

x

rocsparse_Xellmv

x

x

rocsparse_Xhybmv

x

x

rocsparse_Xgebsrmv

x

N/A

N/A

Sparse level 3 functions#

The reproducibility of rocsparse_Xbsrmm(), rocsparse_Xgebsrmm(), and rocsparse_Xcsrmm() is more complicated, depending on whether A is transposed or not. See the chart below to determine whether these routines are deterministic.

Routine

A non-transpose

A transpose

Yes

No

Yes

No

rocsparse_Xbsrmm

x

N/A

N/A

rocsparse_Xgebsrmm

x

N/A

N/A

rocsparse_Xcsrmm

x

x

Sparse extra functions#

Preconditioner functions#

Conversion functions#

Function name

yes

no

rocsparse_csr2coo()

x

rocsparse_csr2csc_buffer_size()

x

rocsparse_Xcsr2csc()

x

rocsparse_Xgebsr2gebsc_buffer_size()

x

rocsparse_Xgebsr2gebsc()

x

rocsparse_csr2ell_width()

x

rocsparse_Xcsr2ell()

x

rocsparse_Xcsr2hyb()

x

rocsparse_csr2bsr_nnz()

x

rocsparse_Xcsr2bsr()

x

rocsparse_csr2gebsr_nnz()

x

rocsparse_Xcsr2gebsr_buffer_size()

x

rocsparse_Xcsr2gebsr()

x

rocsparse_coo2csr()

x

rocsparse_ell2csr_nnz()

x

rocsparse_Xell2csr()

x

rocsparse_hyb2csr_buffer_size()

x

rocsparse_Xhyb2csr()

x

rocsparse_Xbsr2csr()

x

rocsparse_Xgebsr2csr()

x

rocsparse_Xgebsr2gebsr_buffer_size()

x

rocsparse_gebsr2gebsr_nnz()

x

rocsparse_Xgebsr2gebsr()

x

rocsparse_Xcsr2csr_compress()

x

rocsparse_create_identity_permutation()

x

rocsparse_inverse_permutation()

x

rocsparse_cscsort_buffer_size()

x

rocsparse_cscsort()

x

rocsparse_csrsort_buffer_size()

x

rocsparse_csrsort()

x

rocsparse_coosort_buffer_size()

x

rocsparse_coosort_by_row()

x

rocsparse_coosort_by_column()

x

rocsparse_Xdense2csr()

x

rocsparse_Xdense2csc()

x

rocsparse_Xdense2coo()

x

rocsparse_Xcsr2dense()

x

rocsparse_Xcsc2dense()

x

rocsparse_Xcoo2dense()

x

rocsparse_Xnnz_compress()

x

rocsparse_Xnnz()

x

rocsparse_Xprune_dense2csr_buffer_size()

x

rocsparse_Xprune_dense2csr_nnz()

x

rocsparse_Xprune_dense2csr()

x

rocsparse_Xprune_csr2csr_buffer_size()

x

rocsparse_Xprune_csr2csr_nnz()

x

rocsparse_Xprune_csr2csr()

x

rocsparse_Xprune_dense2csr_by_percentage_buffer_size()

x

rocsparse_Xprune_dense2csr_nnz_by_percentage()

x

rocsparse_Xprune_dense2csr_by_percentage()

x

rocsparse_Xprune_csr2csr_by_percentage_buffer_size()

x

rocsparse_Xprune_csr2csr_nnz_by_percentage()

x

rocsparse_Xprune_csr2csr_by_percentage()

x

rocsparse_Xbsrpad_value()

x

Reordering functions#

Function name

yes

no

rocsparse_Xcsrcolor()

x

Utility functions#

Sparse generic functions#

The reproducibility of rocsparse_spmv() and rocsparse_v2_spmv() is more complicated because these generic routines support multiple sparse matrix formats and algorithms. See the chart below to determine whether a given algorithm is deterministic.

Bit-wise reproducibility of SpMV/v2_SpMV

Algorithm

A non-transpose

A transpose

Yes

No

Yes

No

rocsparse_spmv_alg_csr_stream

x

x

rocsparse_spmv_alg_csr_rowsplit

x

x

rocsparse_spmv_alg_csr_adaptive

x

x

rocsparse_spmv_alg_csr_lrb

x

x

rocsparse_spmv_alg_csr_stream (CSC FORMAT)

x

x

rocsparse_spmv_alg_csr_rowsplit (CSC FORMAT)

x

x

rocsparse_spmv_alg_csr_adaptive (CSC FORMAT)

x

x

rocsparse_spmv_alg_csr_lrb (CSC FORMAT)

x

x

rocsparse_spmv_alg_coo

x

x

rocsparse_spmv_alg_coo_atomic

x

x

rocsparse_spmv_alg_ell

x

N/A

N/A

rocsparse_spmv_alg_bsr

x

N/A

N/A

The reproducibility of rocsparse_spmm() is more complicated because this generic routine supports multiple sparse matrix formats and algorithms. See the chart below to determine whether a given algorithm is deterministic.

Bit-wise reproducibility of SpMM

Algorithm

A non-transpose

A transpose

Yes

No

Yes

No

rocsparse_spmm_alg_csr

x

x

rocsparse_spmm_alg_csr_row_split

x

x

rocsparse_spmm_alg_csr_nnz_split

x

x

rocsparse_spmm_alg_csr_merge_path

x

x

rocsparse_spmm_alg_csr (CSC FORMAT)

x

x

rocsparse_spmm_alg_csr_row_split (CSC FORMAT)

x

x

rocsparse_spmm_alg_csr_nnz_split (CSC FORMAT)

x

x

rocsparse_spmm_alg_csr_merge_path (CSC FORMAT)

x

x

rocsparse_spmm_alg_coo_segmented

x

x

rocsparse_spmm_alg_coo_atomic

x

x

rocsparse_spmm_alg_coo_segmented_atomic

x

x

rocsparse_spmm_alg_bell

x

N/A

N/A

rocsparse_spmm_alg_bsr

x

N/A

N/A