Skip to content

Commit

Permalink
[HIPIFY][ROCm#674][rocSPARSE][feature] rocSPARSE support - Step 19 - …
Browse files Browse the repository at this point in the history
…functions

+ Updated synthetic tests and the regenerated hipify-perl and SPARSE docs
  • Loading branch information
emankov committed Jul 15, 2023
1 parent c51ecc5 commit eeddf18
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 18 deletions.
6 changes: 6 additions & 0 deletions bin/hipify-perl
Original file line number Diff line number Diff line change
Expand Up @@ -1476,6 +1476,7 @@ sub rocSubstitutions {
subst("cusparseCreateDnMat", "rocsparse_create_dnmat_descr", "library");
subst("cusparseCreateDnVec", "rocsparse_create_dnvec_descr", "library");
subst("cusparseCreateHybMat", "rocsparse_create_hyb_mat", "library");
subst("cusparseCreateIdentityPermutation", "rocsparse_create_identity_permutation", "library");
subst("cusparseCreateMatDescr", "rocsparse_create_mat_descr", "library");
subst("cusparseCreateSpVec", "rocsparse_create_spvec_descr", "library");
subst("cusparseCscSetPointers", "rocsparse_csc_set_pointers", "library");
Expand Down Expand Up @@ -1543,6 +1544,11 @@ sub rocSubstitutions {
subst("cusparseSpVecSetValues", "rocsparse_spvec_set_values", "library");
subst("cusparseXcoosortByColumn", "rocsparse_coosort_by_column", "library");
subst("cusparseXcoosortByRow", "rocsparse_coosort_by_row", "library");
subst("cusparseXcoosort_bufferSizeExt", "rocsparse_coosort_buffer_size", "library");
subst("cusparseXcscsort", "rocsparse_cscsort", "library");
subst("cusparseXcscsort_bufferSizeExt", "rocsparse_cscsort_buffer_size", "library");
subst("cusparseXcsrsort", "rocsparse_csrsort", "library");
subst("cusparseXcsrsort_bufferSizeExt", "rocsparse_csrsort_buffer_size", "library");
subst("cusparseXgebsr2gebsrNnz", "rocsparse_gebsr2gebsr_nnz", "library");
subst("cusparseZbsr2csr", "rocsparse_zbsr2csr", "library");
subst("cusparseZcsrcolor", "rocsparse_zcsrcolor", "library");
Expand Down
12 changes: 6 additions & 6 deletions docs/tables/CUSPARSE_API_supported_by_HIP_and_ROC.md
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@
|`cusparseCnnz`| | | |`hipsparseCnnz`|3.2.0| | | | | | | | |
|`cusparseCnnz_compress`|8.0| | |`hipsparseCnnz_compress`|3.5.0| | | | | | | | |
|`cusparseCreateCsru2csrInfo`| | | |`hipsparseCreateCsru2csrInfo`|4.2.0| | | | | | | | |
|`cusparseCreateIdentityPermutation`| | | |`hipsparseCreateIdentityPermutation`|1.9.2| | | | | | | | |
|`cusparseCreateIdentityPermutation`| | | |`hipsparseCreateIdentityPermutation`|1.9.2| | | |`rocsparse_create_identity_permutation`|1.9.0| | | |
|`cusparseCsr2cscEx`|8.0|10.2|11.0| | | | | | | | | | |
|`cusparseCsr2cscEx2`|10.1| | |`hipsparseCsr2cscEx2`|5.4.0| | | | | | | | |
|`cusparseCsr2cscEx2_bufferSize`|10.1| | |`hipsparseCsr2cscEx2_bufferSize`|5.4.0| | | | | | | | |
Expand Down Expand Up @@ -747,14 +747,14 @@
|`cusparseXcoo2csr`| | | |`hipsparseXcoo2csr`|1.9.2| | | | | | | | |
|`cusparseXcoosortByColumn`| | | |`hipsparseXcoosortByColumn`|1.9.2| | | |`rocsparse_coosort_by_column`|1.9.0| | | |
|`cusparseXcoosortByRow`| | | |`hipsparseXcoosortByRow`|1.9.2| | | |`rocsparse_coosort_by_row`|1.9.0| | | |
|`cusparseXcoosort_bufferSizeExt`| | | |`hipsparseXcoosort_bufferSizeExt`|1.9.2| | | | | | | | |
|`cusparseXcscsort`| | | |`hipsparseXcscsort`|2.10.0| | | | | | | | |
|`cusparseXcscsort_bufferSizeExt`| | | |`hipsparseXcscsort_bufferSizeExt`|2.10.0| | | | | | | | |
|`cusparseXcoosort_bufferSizeExt`| | | |`hipsparseXcoosort_bufferSizeExt`|1.9.2| | | |`rocsparse_coosort_buffer_size`|1.9.0| | | |
|`cusparseXcscsort`| | | |`hipsparseXcscsort`|2.10.0| | | |`rocsparse_cscsort`|2.10.0| | | |
|`cusparseXcscsort_bufferSizeExt`| | | |`hipsparseXcscsort_bufferSizeExt`|2.10.0| | | |`rocsparse_cscsort_buffer_size`|2.10.0| | | |
|`cusparseXcsr2bsrNnz`| | | |`hipsparseXcsr2bsrNnz`|3.5.0| | | | | | | | |
|`cusparseXcsr2coo`| | | |`hipsparseXcsr2coo`|1.9.2| | | | | | | | |
|`cusparseXcsr2gebsrNnz`| | | |`hipsparseXcsr2gebsrNnz`|4.1.0| | | | | | | | |
|`cusparseXcsrsort`| | | |`hipsparseXcsrsort`|1.9.2| | | | | | | | |
|`cusparseXcsrsort_bufferSizeExt`| | | |`hipsparseXcsrsort_bufferSizeExt`|1.9.2| | | | | | | | |
|`cusparseXcsrsort`| | | |`hipsparseXcsrsort`|1.9.2| | | |`rocsparse_csrsort`|1.9.0| | | |
|`cusparseXcsrsort_bufferSizeExt`| | | |`hipsparseXcsrsort_bufferSizeExt`|1.9.2| | | |`rocsparse_csrsort_buffer_size`|1.9.0| | | |
|`cusparseXgebsr2csr`| | | | | | | | | | | | | |
|`cusparseXgebsr2gebsrNnz`| | | |`hipsparseXgebsr2gebsrNnz`|4.1.0| | | |`rocsparse_gebsr2gebsr_nnz`|4.1.0| | | |
|`cusparseZbsr2csr`| | | |`hipsparseZbsr2csr`|3.5.0| | | |`rocsparse_zbsr2csr`|3.10.0| | | |
Expand Down
12 changes: 6 additions & 6 deletions docs/tables/CUSPARSE_API_supported_by_ROC.md
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@
|`cusparseCnnz`| | | | | | | | |
|`cusparseCnnz_compress`|8.0| | | | | | | |
|`cusparseCreateCsru2csrInfo`| | | | | | | | |
|`cusparseCreateIdentityPermutation`| | | | | | | | |
|`cusparseCreateIdentityPermutation`| | | |`rocsparse_create_identity_permutation`|1.9.0| | | |
|`cusparseCsr2cscEx`|8.0|10.2|11.0| | | | | |
|`cusparseCsr2cscEx2`|10.1| | | | | | | |
|`cusparseCsr2cscEx2_bufferSize`|10.1| | | | | | | |
Expand Down Expand Up @@ -747,14 +747,14 @@
|`cusparseXcoo2csr`| | | | | | | | |
|`cusparseXcoosortByColumn`| | | |`rocsparse_coosort_by_column`|1.9.0| | | |
|`cusparseXcoosortByRow`| | | |`rocsparse_coosort_by_row`|1.9.0| | | |
|`cusparseXcoosort_bufferSizeExt`| | | | | | | | |
|`cusparseXcscsort`| | | | | | | | |
|`cusparseXcscsort_bufferSizeExt`| | | | | | | | |
|`cusparseXcoosort_bufferSizeExt`| | | |`rocsparse_coosort_buffer_size`|1.9.0| | | |
|`cusparseXcscsort`| | | |`rocsparse_cscsort`|2.10.0| | | |
|`cusparseXcscsort_bufferSizeExt`| | | |`rocsparse_cscsort_buffer_size`|2.10.0| | | |
|`cusparseXcsr2bsrNnz`| | | | | | | | |
|`cusparseXcsr2coo`| | | | | | | | |
|`cusparseXcsr2gebsrNnz`| | | | | | | | |
|`cusparseXcsrsort`| | | | | | | | |
|`cusparseXcsrsort_bufferSizeExt`| | | | | | | | |
|`cusparseXcsrsort`| | | |`rocsparse_csrsort`|1.9.0| | | |
|`cusparseXcsrsort_bufferSizeExt`| | | |`rocsparse_csrsort_buffer_size`|1.9.0| | | |
|`cusparseXgebsr2csr`| | | | | | | | |
|`cusparseXgebsr2gebsrNnz`| | | |`rocsparse_gebsr2gebsr_nnz`|4.1.0| | | |
|`cusparseZbsr2csr`| | | |`rocsparse_zbsr2csr`|3.10.0| | | |
Expand Down
18 changes: 12 additions & 6 deletions src/CUDA2HIP_SPARSE_API_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -630,17 +630,17 @@ const std::map<llvm::StringRef, hipCounter> CUDA_SPARSE_FUNCTION_MAP {
{"cusparseCnnz", {"hipsparseCnnz", "", CONV_LIB_FUNC, API_SPARSE, 14, ROC_UNSUPPORTED}},
{"cusparseZnnz", {"hipsparseZnnz", "", CONV_LIB_FUNC, API_SPARSE, 14, ROC_UNSUPPORTED}},

{"cusparseCreateIdentityPermutation", {"hipsparseCreateIdentityPermutation", "", CONV_LIB_FUNC, API_SPARSE, 14, ROC_UNSUPPORTED}},
{"cusparseCreateIdentityPermutation", {"hipsparseCreateIdentityPermutation", "rocsparse_create_identity_permutation", CONV_LIB_FUNC, API_SPARSE, 14}},

{"cusparseXcoosort_bufferSizeExt", {"hipsparseXcoosort_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, 14, ROC_UNSUPPORTED}},
{"cusparseXcoosort_bufferSizeExt", {"hipsparseXcoosort_bufferSizeExt", "rocsparse_coosort_buffer_size", CONV_LIB_FUNC, API_SPARSE, 14}},
{"cusparseXcoosortByRow", {"hipsparseXcoosortByRow", "rocsparse_coosort_by_row", CONV_LIB_FUNC, API_SPARSE, 14}},
{"cusparseXcoosortByColumn", {"hipsparseXcoosortByColumn", "rocsparse_coosort_by_column", CONV_LIB_FUNC, API_SPARSE, 14}},

{"cusparseXcsrsort_bufferSizeExt", {"hipsparseXcsrsort_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, 14, ROC_UNSUPPORTED}},
{"cusparseXcsrsort", {"hipsparseXcsrsort", "", CONV_LIB_FUNC, API_SPARSE, 14, ROC_UNSUPPORTED}},
{"cusparseXcsrsort_bufferSizeExt", {"hipsparseXcsrsort_bufferSizeExt", "rocsparse_csrsort_buffer_size", CONV_LIB_FUNC, API_SPARSE, 14}},
{"cusparseXcsrsort", {"hipsparseXcsrsort", "rocsparse_csrsort", CONV_LIB_FUNC, API_SPARSE, 14}},

{"cusparseXcscsort_bufferSizeExt", {"hipsparseXcscsort_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, 14, ROC_UNSUPPORTED}},
{"cusparseXcscsort", {"hipsparseXcscsort", "", CONV_LIB_FUNC, API_SPARSE, 14, ROC_UNSUPPORTED}},
{"cusparseXcscsort_bufferSizeExt", {"hipsparseXcscsort_bufferSizeExt", "rocsparse_cscsort_buffer_size", CONV_LIB_FUNC, API_SPARSE, 14}},
{"cusparseXcscsort", {"hipsparseXcscsort", "rocsparse_cscsort", CONV_LIB_FUNC, API_SPARSE, 14}},

{"cusparseCreateCsru2csrInfo", {"hipsparseCreateCsru2csrInfo", "", CONV_LIB_FUNC, API_SPARSE, 14, ROC_UNSUPPORTED}},
{"cusparseDestroyCsru2csrInfo", {"hipsparseDestroyCsru2csrInfo", "", CONV_LIB_FUNC, API_SPARSE, 14, ROC_UNSUPPORTED}},
Expand Down Expand Up @@ -1895,6 +1895,12 @@ const std::map<llvm::StringRef, hipAPIversions> HIP_SPARSE_FUNCTION_VER_MAP {
{"rocsparse_sbsr2csr", {HIP_3100, HIP_0, HIP_0 }},
{"rocsparse_coosort_by_column", {HIP_1090, HIP_0, HIP_0 }},
{"rocsparse_coosort_by_row", {HIP_1090, HIP_0, HIP_0 }},
{"rocsparse_coosort_buffer_size", {HIP_1090, HIP_0, HIP_0 }},
{"rocsparse_cscsort", {HIP_2100, HIP_0, HIP_0 }},
{"rocsparse_cscsort_buffer_size", {HIP_2100, HIP_0, HIP_0 }},
{"rocsparse_csrsort", {HIP_1090, HIP_0, HIP_0 }},
{"rocsparse_csrsort_buffer_size", {HIP_1090, HIP_0, HIP_0 }},
{"rocsparse_create_identity_permutation", {HIP_1090, HIP_0, HIP_0 }},
};

const std::map<unsigned int, llvm::StringRef> CUDA_SPARSE_API_SECTION_MAP {
Expand Down
32 changes: 32 additions & 0 deletions tests/unit_tests/synthetic/libraries/cusparse2hipsparse.cu
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ int main() {
int nnzb = 0;
int innz = 0;
int blockDim = 0;
int cscRowIndA = 0;
int cscColPtrA = 0;
int csrRowPtrA = 0;
int csrColIndA = 0;
int ncolors = 0;
Expand Down Expand Up @@ -412,6 +414,36 @@ int main() {
// CHECK: status_t = hipsparseXcoosortByRow(handle_t, m, n, innz, &icooRows, &icooColumns, P, pBuffer);
status_t = cusparseXcoosortByRow(handle_t, m, n, innz, &icooRows, &icooColumns, P, pBuffer);

// CUDA: cusparseStatus_t CUSPARSEAPI cusparseXcoosort_bufferSizeExt(cusparseHandle_t handle, int m, int n, int nnz, const int* cooRowsA, const int* cooColsA, size_t* pBufferSizeInBytes);
// HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseXcoosort_bufferSizeExt(hipsparseHandle_t handle, int m, int n, int nnz, const int* cooRows, const int* cooCols, size_t* pBufferSizeInBytes);
// CHECK: status_t = hipsparseXcoosort_bufferSizeExt(handle_t, m, n, innz, &icooRows, &icooColumns, &bufferSize);
status_t = cusparseXcoosort_bufferSizeExt(handle_t, m, n, innz, &icooRows, &icooColumns, &bufferSize);

// CUDA: cusparseStatus_t CUSPARSEAPI cusparseXcscsort(cusparseHandle_t handle, int m, int n, int nnz, const cusparseMatDescr_t descrA, const int* cscColPtrA, int* cscRowIndA, int* P, void* pBuffer);
// HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseXcscsort(hipsparseHandle_t handle, int m, int n, int nnz, const hipsparseMatDescr_t descrA, const int* cscColPtr, int* cscRowInd, int* P, void* pBuffer);
// CHECK: status_t = hipsparseXcscsort(handle_t, m, n, innz, matDescr_A, &cscColPtrA, &cscRowIndA, P, pBuffer);
status_t = cusparseXcscsort(handle_t, m, n, innz, matDescr_A, &cscColPtrA, &cscRowIndA, P, pBuffer);

// CUDA: cusparseStatus_t CUSPARSEAPI cusparseXcscsort_bufferSizeExt(cusparseHandle_t handle, int m, int n, int nnz, const int* cscColPtrA, const int* cscRowIndA, size_t* pBufferSizeInBytes);
// HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseXcscsort_bufferSizeExt(hipsparseHandle_t handle, int m, int n, int nnz, const int* cscColPtr, const int* cscRowInd, size_t* pBufferSizeInBytes);
// CHECK: status_t = hipsparseXcscsort_bufferSizeExt(handle_t, m, n, innz, &cscColPtrA, &cscRowIndA, &bufferSize);
status_t = cusparseXcscsort_bufferSizeExt(handle_t, m, n, innz, &cscColPtrA, &cscRowIndA, &bufferSize);

// CUDA: cusparseStatus_t CUSPARSEAPI cusparseXcsrsort(cusparseHandle_t handle, int m, int n, int nnz, const cusparseMatDescr_t descrA, const int* csrRowPtrA, int* csrColIndA, int* P, void* pBuffer);
// HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseXcsrsort(hipsparseHandle_t handle, int m, int n, int nnz, const hipsparseMatDescr_t descrA, const int* csrRowPtr, int* csrColInd, int* P, void* pBuffer);
// CHECK: status_t = hipsparseXcsrsort(handle_t, m, n, innz, matDescr_A, &cscRowIndA, &cscColPtrA, P, pBuffer);
status_t = cusparseXcsrsort(handle_t, m, n, innz, matDescr_A, &cscRowIndA, &cscColPtrA, P, pBuffer);

// CUDA: cusparseStatus_t CUSPARSEAPI cusparseXcsrsort_bufferSizeExt(cusparseHandle_t handle, int m, int n, int nnz, const int* csrRowPtrA, const int* csrColIndA, size_t* pBufferSizeInBytes);
// HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseXcsrsort_bufferSizeExt(hipsparseHandle_t handle, int m, int n, int nnz, const int* csrRowPtr, const int* csrColInd, size_t* pBufferSizeInBytes);
// CHECK: status_t = hipsparseXcsrsort_bufferSizeExt(handle_t, m, n, innz, &cscRowIndA, &cscColPtrA, &bufferSize);
status_t = cusparseXcsrsort_bufferSizeExt(handle_t, m, n, innz, &cscRowIndA, &cscColPtrA, &bufferSize);

// CUDA: cusparseStatus_t CUSPARSEAPI cusparseCreateIdentityPermutation(cusparseHandle_t handle, int n, int* p);
// HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseCreateIdentityPermutation(hipsparseHandle_t handle, int n, int* p);
// CHECK: status_t = hipsparseCreateIdentityPermutation(handle_t, n, P);
status_t = cusparseCreateIdentityPermutation(handle_t, n, P);

#if CUDA_VERSION >= 8000
// CHECK: hipDataType dataType_t;
// CHECK-NEXT: hipDataType dataType;
Expand Down
32 changes: 32 additions & 0 deletions tests/unit_tests/synthetic/libraries/cusparse2rocsparse.cu
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ int main() {
int nnzb = 0;
int innz = 0;
int blockDim = 0;
int cscRowIndA = 0;
int cscColPtrA = 0;
int csrRowPtrA = 0;
int csrColIndA = 0;
int ncolors = 0;
Expand Down Expand Up @@ -416,6 +418,36 @@ int main() {
// CHECK: status_t = rocsparse_coosort_by_row(handle_t, m, n, innz, &icooRows, &icooColumns, P, pBuffer);
status_t = cusparseXcoosortByRow(handle_t, m, n, innz, &icooRows, &icooColumns, P, pBuffer);

// CUDA: cusparseStatus_t CUSPARSEAPI cusparseXcoosort_bufferSizeExt(cusparseHandle_t handle, int m, int n, int nnz, const int* cooRowsA, const int* cooColsA, size_t* pBufferSizeInBytes);
// ROC: ROCSPARSE_EXPORT rocsparse_status rocsparse_coosort_buffer_size(rocsparse_handle handle, rocsparse_int m, rocsparse_int n, rocsparse_int nnz, const rocsparse_int* coo_row_ind, const rocsparse_int* coo_col_ind, size_t* buffer_size);
// CHECK: status_t = rocsparse_coosort_buffer_size(handle_t, m, n, innz, &icooRows, &icooColumns, &bufferSize);
status_t = cusparseXcoosort_bufferSizeExt(handle_t, m, n, innz, &icooRows, &icooColumns, &bufferSize);

// CUDA: cusparseStatus_t CUSPARSEAPI cusparseXcscsort(cusparseHandle_t handle, int m, int n, int nnz, const cusparseMatDescr_t descrA, const int* cscColPtrA, int* cscRowIndA, int* P, void* pBuffer);
// ROC: ROCSPARSE_EXPORT rocsparse_status rocsparse_cscsort(rocsparse_handle handle, rocsparse_int m, rocsparse_int n, rocsparse_int nnz, const rocsparse_mat_descr descr, const rocsparse_int* csc_col_ptr, rocsparse_int* csc_row_ind, rocsparse_int* perm, void* temp_buffer);
// CHECK: status_t = rocsparse_cscsort(handle_t, m, n, innz, matDescr_A, &cscColPtrA, &cscRowIndA, P, pBuffer);
status_t = cusparseXcscsort(handle_t, m, n, innz, matDescr_A, &cscColPtrA, &cscRowIndA, P, pBuffer);

// CUDA: cusparseStatus_t CUSPARSEAPI cusparseXcscsort_bufferSizeExt(cusparseHandle_t handle, int m, int n, int nnz, const int* cscColPtrA, const int* cscRowIndA, size_t* pBufferSizeInBytes);
// ROC: ROCSPARSE_EXPORT rocsparse_status rocsparse_cscsort_buffer_size(rocsparse_handle handle, rocsparse_int m, rocsparse_int n, rocsparse_int nnz, const rocsparse_int* csc_col_ptr, const rocsparse_int* csc_row_ind, size_t* buffer_size);
// CHECK: status_t = rocsparse_cscsort_buffer_size(handle_t, m, n, innz, &cscColPtrA, &cscRowIndA, &bufferSize);
status_t = cusparseXcscsort_bufferSizeExt(handle_t, m, n, innz, &cscColPtrA, &cscRowIndA, &bufferSize);

// CUDA: cusparseStatus_t CUSPARSEAPI cusparseXcsrsort(cusparseHandle_t handle, int m, int n, int nnz, const cusparseMatDescr_t descrA, const int* csrRowPtrA, int* csrColIndA, int* P, void* pBuffer);
// ROC: ROCSPARSE_EXPORT rocsparse_status rocsparse_csrsort(rocsparse_handle handle, rocsparse_int m, rocsparse_int n, rocsparse_int nnz, const rocsparse_mat_descr descr, const rocsparse_int* csr_row_ptr, rocsparse_int* csr_col_ind, rocsparse_int* perm, void* temp_buffer);
// CHECK: status_t = rocsparse_csrsort(handle_t, m, n, innz, matDescr_A, &cscRowIndA, &cscColPtrA, P, pBuffer);
status_t = cusparseXcsrsort(handle_t, m, n, innz, matDescr_A, &cscRowIndA, &cscColPtrA, P, pBuffer);

// CUDA: cusparseStatus_t CUSPARSEAPI cusparseXcsrsort_bufferSizeExt(cusparseHandle_t handle, int m, int n, int nnz, const int* csrRowPtrA, const int* csrColIndA, size_t* pBufferSizeInBytes);
// ROC: ROCSPARSE_EXPORT rocsparse_status rocsparse_csrsort_buffer_size(rocsparse_handle handle, rocsparse_int m, rocsparse_int n, rocsparse_int nnz, const rocsparse_int* csr_row_ptr, const rocsparse_int* csr_col_ind, size_t* buffer_size);
// CHECK: status_t = rocsparse_csrsort_buffer_size(handle_t, m, n, innz, &cscRowIndA, &cscColPtrA, &bufferSize);
status_t = cusparseXcsrsort_bufferSizeExt(handle_t, m, n, innz, &cscRowIndA, &cscColPtrA, &bufferSize);

// CUDA: cusparseStatus_t CUSPARSEAPI cusparseCreateIdentityPermutation(cusparseHandle_t handle, int n, int* p);
// ROC: ROCSPARSE_EXPORT rocsparse_status rocsparse_create_identity_permutation(rocsparse_handle handle, rocsparse_int n, rocsparse_int* p);
// CHECK: status_t = rocsparse_create_identity_permutation(handle_t, n, P);
status_t = cusparseCreateIdentityPermutation(handle_t, n, P);

#if CUDA_VERSION >= 8000
// CHECK: hipDataType dataType_t;
// TODO: [#899] There should be rocsparse_datatype
Expand Down

0 comments on commit eeddf18

Please sign in to comment.