Skip to content

Commit

Permalink
Merge pull request #1055 from emankov/HIPIFY
Browse files Browse the repository at this point in the history
[HIPIFY][#674][rocSPARSE][feature] rocSPARSE support - Step 51 - functions `rocsparse_(s|d|c|z)srgemm_buffer_size`
  • Loading branch information
emankov authored Oct 8, 2023
2 parents 291878e + 11f145f commit 518dc6a
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 16 deletions.
4 changes: 4 additions & 0 deletions bin/hipify-perl
Original file line number Diff line number Diff line change
Expand Up @@ -1689,6 +1689,7 @@ sub rocSubstitutions {
subst("cusparseCcsr2gebsr_bufferSize", "rocsparse_ccsr2gebsr_buffer_size", "library");
subst("cusparseCcsr2hyb", "rocsparse_ccsr2hyb", "library");
subst("cusparseCcsrcolor", "rocsparse_ccsrcolor", "library");
subst("cusparseCcsrgemm2_bufferSizeExt", "rocsparse_ccsrgemm_buffer_size", "library");
subst("cusparseCcsric02", "rocsparse_ccsric0", "library");
subst("cusparseCcsric02_analysis", "rocsparse_ccsric0_analysis", "library");
subst("cusparseCcsric02_bufferSize", "rocsparse_ccsric0_buffer_size", "library");
Expand Down Expand Up @@ -1753,6 +1754,7 @@ sub rocSubstitutions {
subst("cusparseDcsr2gebsr_bufferSize", "rocsparse_dcsr2gebsr_buffer_size", "library");
subst("cusparseDcsr2hyb", "rocsparse_dcsr2hyb", "library");
subst("cusparseDcsrcolor", "rocsparse_dcsrcolor", "library");
subst("cusparseDcsrgemm2_bufferSizeExt", "rocsparse_dcsrgemm_buffer_size", "library");
subst("cusparseDcsric02", "rocsparse_dcsric0", "library");
subst("cusparseDcsric02_analysis", "rocsparse_dcsric0_analysis", "library");
subst("cusparseDcsric02_bufferSize", "rocsparse_dcsric0_buffer_size", "library");
Expand Down Expand Up @@ -1836,6 +1838,7 @@ sub rocSubstitutions {
subst("cusparseScsr2gebsr_bufferSize", "rocsparse_scsr2gebsr_buffer_size", "library");
subst("cusparseScsr2hyb", "rocsparse_scsr2hyb", "library");
subst("cusparseScsrcolor", "rocsparse_scsrcolor", "library");
subst("cusparseScsrgemm2_bufferSizeExt", "rocsparse_scsrgemm_buffer_size", "library");
subst("cusparseScsric02", "rocsparse_scsric0", "library");
subst("cusparseScsric02_analysis", "rocsparse_scsric0_analysis", "library");
subst("cusparseScsric02_bufferSize", "rocsparse_scsric0_buffer_size", "library");
Expand Down Expand Up @@ -1927,6 +1930,7 @@ sub rocSubstitutions {
subst("cusparseZcsr2gebsr_bufferSize", "rocsparse_zcsr2gebsr_buffer_size", "library");
subst("cusparseZcsr2hyb", "rocsparse_zcsr2hyb", "library");
subst("cusparseZcsrcolor", "rocsparse_zcsrcolor", "library");
subst("cusparseZcsrgemm2_bufferSizeExt", "rocsparse_zcsrgemm_buffer_size", "library");
subst("cusparseZcsric02", "rocsparse_zcsric0", "library");
subst("cusparseZcsric02_analysis", "rocsparse_zcsric0_analysis", "library");
subst("cusparseZcsric02_bufferSize", "rocsparse_zcsric0_buffer_size", "library");
Expand Down
8 changes: 4 additions & 4 deletions docs/tables/CUSPARSE_API_supported_by_HIP_and_ROC.md
Original file line number Diff line number Diff line change
Expand Up @@ -441,19 +441,19 @@
|`cusparseCcsrgeam2_bufferSizeExt`|10.0| | |`hipsparseCcsrgeam2_bufferSizeExt`|3.5.0| | | | | | | | |
|`cusparseCcsrgemm`| |10.2|11.0|`hipsparseCcsrgemm`|3.1.0| | | | | | | | |
|`cusparseCcsrgemm2`| |11.0|12.0|`hipsparseCcsrgemm2`|3.1.0| | | | | | | | |
|`cusparseCcsrgemm2_bufferSizeExt`| |11.0|12.0|`hipsparseCcsrgemm2_bufferSizeExt`|3.1.0| | | | | | | | |
|`cusparseCcsrgemm2_bufferSizeExt`| |11.0|12.0|`hipsparseCcsrgemm2_bufferSizeExt`|3.1.0| | | |`rocsparse_ccsrgemm_buffer_size`|2.8.0| | | |
|`cusparseDcsrgeam`| |10.2|11.0|`hipsparseDcsrgeam`|3.5.0| | | | | | | | |
|`cusparseDcsrgeam2`|10.0| | |`hipsparseDcsrgeam2`|3.5.0| | | | | | | | |
|`cusparseDcsrgeam2_bufferSizeExt`|10.0| | |`hipsparseDcsrgeam2_bufferSizeExt`|3.5.0| | | | | | | | |
|`cusparseDcsrgemm`| |10.2|11.0|`hipsparseDcsrgemm`|2.8.0| | | | | | | | |
|`cusparseDcsrgemm2`| |11.0|12.0|`hipsparseDcsrgemm2`|2.8.0| | | | | | | | |
|`cusparseDcsrgemm2_bufferSizeExt`| |11.0|12.0|`hipsparseDcsrgemm2_bufferSizeExt`|2.8.0| | | | | | | | |
|`cusparseDcsrgemm2_bufferSizeExt`| |11.0|12.0|`hipsparseDcsrgemm2_bufferSizeExt`|2.8.0| | | |`rocsparse_dcsrgemm_buffer_size`|2.8.0| | | |
|`cusparseScsrgeam`| |10.2|11.0|`hipsparseScsrgeam`|3.5.0| | | | | | | | |
|`cusparseScsrgeam2`|10.0| | |`hipsparseScsrgeam2`|3.5.0| | | | | | | | |
|`cusparseScsrgeam2_bufferSizeExt`|10.0| | |`hipsparseScsrgeam2_bufferSizeExt`|3.5.0| | | | | | | | |
|`cusparseScsrgemm`| |10.2|11.0|`hipsparseScsrgemm`|2.8.0| | | | | | | | |
|`cusparseScsrgemm2`| |11.0|12.0|`hipsparseScsrgemm2`|2.8.0| | | | | | | | |
|`cusparseScsrgemm2_bufferSizeExt`| |11.0|12.0|`hipsparseScsrgemm2_bufferSizeExt`|2.8.0| | | | | | | | |
|`cusparseScsrgemm2_bufferSizeExt`| |11.0|12.0|`hipsparseScsrgemm2_bufferSizeExt`|2.8.0| | | |`rocsparse_scsrgemm_buffer_size`|2.8.0| | | |
|`cusparseXcsrgeam2Nnz`|10.0| | |`hipsparseXcsrgeam2Nnz`|3.5.0| | | | | | | | |
|`cusparseXcsrgeamNnz`| |10.2|11.0|`hipsparseXcsrgeamNnz`|3.5.0| | | | | | | | |
|`cusparseXcsrgemm2Nnz`| |11.0|12.0|`hipsparseXcsrgemm2Nnz`|2.8.0| | | |`rocsparse_csrgemm_nnz`|2.8.0| | | |
Expand All @@ -463,7 +463,7 @@
|`cusparseZcsrgeam2_bufferSizeExt`|10.0| | |`hipsparseZcsrgeam2_bufferSizeExt`|3.5.0| | | | | | | | |
|`cusparseZcsrgemm`| |10.2|11.0|`hipsparseZcsrgemm`|3.1.0| | | | | | | | |
|`cusparseZcsrgemm2`| |11.0|12.0|`hipsparseZcsrgemm2`|3.1.0| | | | | | | | |
|`cusparseZcsrgemm2_bufferSizeExt`| |11.0|12.0|`hipsparseZcsrgemm2_bufferSizeExt`|3.1.0| | | | | | | | |
|`cusparseZcsrgemm2_bufferSizeExt`| |11.0|12.0|`hipsparseZcsrgemm2_bufferSizeExt`|3.1.0| | | |`rocsparse_zcsrgemm_buffer_size`|2.8.0| | | |

## **12. CUSPARSE Preconditioners Reference**

Expand Down
8 changes: 4 additions & 4 deletions docs/tables/CUSPARSE_API_supported_by_ROC.md
Original file line number Diff line number Diff line change
Expand Up @@ -441,19 +441,19 @@
|`cusparseCcsrgeam2_bufferSizeExt`|10.0| | | | | | | |
|`cusparseCcsrgemm`| |10.2|11.0| | | | | |
|`cusparseCcsrgemm2`| |11.0|12.0| | | | | |
|`cusparseCcsrgemm2_bufferSizeExt`| |11.0|12.0| | | | | |
|`cusparseCcsrgemm2_bufferSizeExt`| |11.0|12.0|`rocsparse_ccsrgemm_buffer_size`|2.8.0| | | |
|`cusparseDcsrgeam`| |10.2|11.0| | | | | |
|`cusparseDcsrgeam2`|10.0| | | | | | | |
|`cusparseDcsrgeam2_bufferSizeExt`|10.0| | | | | | | |
|`cusparseDcsrgemm`| |10.2|11.0| | | | | |
|`cusparseDcsrgemm2`| |11.0|12.0| | | | | |
|`cusparseDcsrgemm2_bufferSizeExt`| |11.0|12.0| | | | | |
|`cusparseDcsrgemm2_bufferSizeExt`| |11.0|12.0|`rocsparse_dcsrgemm_buffer_size`|2.8.0| | | |
|`cusparseScsrgeam`| |10.2|11.0| | | | | |
|`cusparseScsrgeam2`|10.0| | | | | | | |
|`cusparseScsrgeam2_bufferSizeExt`|10.0| | | | | | | |
|`cusparseScsrgemm`| |10.2|11.0| | | | | |
|`cusparseScsrgemm2`| |11.0|12.0| | | | | |
|`cusparseScsrgemm2_bufferSizeExt`| |11.0|12.0| | | | | |
|`cusparseScsrgemm2_bufferSizeExt`| |11.0|12.0|`rocsparse_scsrgemm_buffer_size`|2.8.0| | | |
|`cusparseXcsrgeam2Nnz`|10.0| | | | | | | |
|`cusparseXcsrgeamNnz`| |10.2|11.0| | | | | |
|`cusparseXcsrgemm2Nnz`| |11.0|12.0|`rocsparse_csrgemm_nnz`|2.8.0| | | |
Expand All @@ -463,7 +463,7 @@
|`cusparseZcsrgeam2_bufferSizeExt`|10.0| | | | | | | |
|`cusparseZcsrgemm`| |10.2|11.0| | | | | |
|`cusparseZcsrgemm2`| |11.0|12.0| | | | | |
|`cusparseZcsrgemm2_bufferSizeExt`| |11.0|12.0| | | | | |
|`cusparseZcsrgemm2_bufferSizeExt`| |11.0|12.0|`rocsparse_zcsrgemm_buffer_size`|2.8.0| | | |

## **12. CUSPARSE Preconditioners Reference**

Expand Down
12 changes: 8 additions & 4 deletions src/CUDA2HIP_SPARSE_API_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,10 @@ const std::map<llvm::StringRef, hipCounter> CUDA_SPARSE_FUNCTION_MAP {
{"cusparseZcsrgemm2", {"hipsparseZcsrgemm2", "", CONV_LIB_FUNC, API_SPARSE, 11, ROC_UNSUPPORTED | CUDA_DEPRECATED | CUDA_REMOVED}},
{"cusparseXcsrgemm2Nnz", {"hipsparseXcsrgemm2Nnz", "rocsparse_csrgemm_nnz", CONV_LIB_FUNC, API_SPARSE, 11, CUDA_DEPRECATED | CUDA_REMOVED}},

{"cusparseScsrgemm2_bufferSizeExt", {"hipsparseScsrgemm2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, 11, ROC_UNSUPPORTED | CUDA_DEPRECATED | CUDA_REMOVED}},
{"cusparseDcsrgemm2_bufferSizeExt", {"hipsparseDcsrgemm2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, 11, ROC_UNSUPPORTED | CUDA_DEPRECATED | CUDA_REMOVED}},
{"cusparseCcsrgemm2_bufferSizeExt", {"hipsparseCcsrgemm2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, 11, ROC_UNSUPPORTED | CUDA_DEPRECATED | CUDA_REMOVED}},
{"cusparseZcsrgemm2_bufferSizeExt", {"hipsparseZcsrgemm2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, 11, ROC_UNSUPPORTED | CUDA_DEPRECATED | CUDA_REMOVED}},
{"cusparseScsrgemm2_bufferSizeExt", {"hipsparseScsrgemm2_bufferSizeExt", "rocsparse_scsrgemm_buffer_size", CONV_LIB_FUNC, API_SPARSE, 11, CUDA_DEPRECATED | CUDA_REMOVED}},
{"cusparseDcsrgemm2_bufferSizeExt", {"hipsparseDcsrgemm2_bufferSizeExt", "rocsparse_dcsrgemm_buffer_size", CONV_LIB_FUNC, API_SPARSE, 11, CUDA_DEPRECATED | CUDA_REMOVED}},
{"cusparseCcsrgemm2_bufferSizeExt", {"hipsparseCcsrgemm2_bufferSizeExt", "rocsparse_ccsrgemm_buffer_size", CONV_LIB_FUNC, API_SPARSE, 11, CUDA_DEPRECATED | CUDA_REMOVED}},
{"cusparseZcsrgemm2_bufferSizeExt", {"hipsparseZcsrgemm2_bufferSizeExt", "rocsparse_zcsrgemm_buffer_size", CONV_LIB_FUNC, API_SPARSE, 11, CUDA_DEPRECATED | CUDA_REMOVED}},

// 12. cuSPARSE Preconditioners Reference
// 12.1. Incomplete Cholesky Factorization : level 0
Expand Down Expand Up @@ -2237,6 +2237,10 @@ const std::map<llvm::StringRef, hipAPIversions> HIP_SPARSE_FUNCTION_VER_MAP {
{"rocsparse_sbsric0_buffer_size", {HIP_3080, HIP_0, HIP_0 }},
{"rocsparse_bsric0_zero_pivot", {HIP_3080, HIP_0, HIP_0 }},
{"rocsparse_csrgemm_nnz", {HIP_2080, HIP_0, HIP_0 }},
{"rocsparse_zcsrgemm_buffer_size", {HIP_2080, HIP_0, HIP_0 }},
{"rocsparse_ccsrgemm_buffer_size", {HIP_2080, HIP_0, HIP_0 }},
{"rocsparse_dcsrgemm_buffer_size", {HIP_2080, HIP_0, HIP_0 }},
{"rocsparse_scsrgemm_buffer_size", {HIP_2080, HIP_0, HIP_0 }},
};

const std::map<unsigned int, llvm::StringRef> CUDA_SPARSE_API_SECTION_MAP {
Expand Down
25 changes: 23 additions & 2 deletions tests/unit_tests/synthetic/libraries/cusparse2hipsparse.cu
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ int main() {
int batchCount = 0;
int m = 0;
int n = 0;
int k = 0;
int mb = 0;
int nb = 0;
int nnza = 0;
Expand Down Expand Up @@ -1942,8 +1943,28 @@ int main() {

// CUDA: CUSPARSE_DEPRECATED(cusparseSpGEMM) cusparseStatus_t CUSPARSEAPI cusparseXcsrgemm2Nnz(cusparseHandle_t handle, int m, int n, int k, const cusparseMatDescr_t descrA, int nnzA, const int* csrSortedRowPtrA, const int* csrSortedColIndA, const cusparseMatDescr_t descrB, int nnzB, const int* csrSortedRowPtrB, const int* csrSortedColIndB, const cusparseMatDescr_t descrD, int nnzD, const int* csrSortedRowPtrD, const int* csrSortedColIndD, const cusparseMatDescr_t descrC, int* csrSortedRowPtrC, int* nnzTotalDevHostPtr, const csrgemm2Info_t info, void* pBuffer);
// HIP: DEPRECATED_CUDA_11000("The routine will be removed in CUDA 12") HIPSPARSE_EXPORT hipsparseStatus_t hipsparseXcsrgemm2Nnz(hipsparseHandle_t handle, int m, int n, int k, const hipsparseMatDescr_t descrA, int nnzA, const int* csrRowPtrA, const int* csrColIndA, const hipsparseMatDescr_t descrB, int nnzB, const int* csrRowPtrB, const int* csrColIndB, const hipsparseMatDescr_t descrD, int nnzD, const int* csrRowPtrD, const int* csrColIndD, const hipsparseMatDescr_t descrC, int* csrRowPtrC, int* nnzTotalDevHostPtr, const csrgemm2Info_t info, void* pBuffer);
// CHECK: status_t = hipsparseXcsrgemm2Nnz(handle_t, m, n, k, matDescr_A, nnza, &csrRowPtrA, &csrColIndA, matDescr_B, nnzB, &csrRowPtrB, &csrColIndB, matDescr_D, nnzD, &csrRowPtrD, &csrColIndD, matDescr_C, &csrRowPtrC, nnzTotalDevHostPtr, csrgemm2_info, pBuffer);
status_t = cusparseXcsrgemm2Nnz(handle_t, m, n, k, matDescr_A, nnza, &csrRowPtrA, &csrColIndA, matDescr_B, nnzB, &csrRowPtrB, &csrColIndB, matDescr_D, nnzD, &csrRowPtrD, &csrColIndD, matDescr_C, &csrRowPtrC, nnzTotalDevHostPtr, csrgemm2_info, pBuffer);
// CHECK: status_t = hipsparseXcsrgemm2Nnz(handle_t, m, n, k, matDescr_A, nnza, &csrRowPtrA, &csrColIndA, matDescr_B, nnzb, &csrRowPtrB, &csrColIndB, matDescr_D, nnzd, &csrRowPtrD, &csrColIndD, matDescr_C, &csrRowPtrC, &nnzTotalDevHostPtr, csrgemm2_info, pBuffer);
status_t = cusparseXcsrgemm2Nnz(handle_t, m, n, k, matDescr_A, nnza, &csrRowPtrA, &csrColIndA, matDescr_B, nnzb, &csrRowPtrB, &csrColIndB, matDescr_D, nnzd, &csrRowPtrD, &csrColIndD, matDescr_C, &csrRowPtrC, &nnzTotalDevHostPtr, csrgemm2_info, pBuffer);

// CUDA: CUSPARSE_DEPRECATED(cusparseSpGEMM) cusparseStatus_t CUSPARSEAPI cusparseZcsrgemm2_bufferSizeExt(cusparseHandle_t handle, int m, int n, int k, const cuDoubleComplex* alpha, const cusparseMatDescr_t descrA, int nnzA, const int* csrSortedRowPtrA, const int* csrSortedColIndA, const cusparseMatDescr_t descrB, int nnzB, const int* csrSortedRowPtrB, const int* csrSortedColIndB, const cuDoubleComplex* beta, const cusparseMatDescr_t descrD, int nnzD, const int* csrSortedRowPtrD, const int* csrSortedColIndD, csrgemm2Info_t info, size_t* pBufferSizeInBytes);
// HIP: DEPRECATED_CUDA_11000("The routine will be removed in CUDA 12") HIPSPARSE_EXPORT hipsparseStatus_t hipsparseZcsrgemm2_bufferSizeExt(hipsparseHandle_t handle, int m, int n, int k, const hipDoubleComplex* alpha, const hipsparseMatDescr_t descrA, int nnzA, const int* csrRowPtrA, const int* csrColIndA, const hipsparseMatDescr_t descrB, int nnzB, const int* csrRowPtrB, const int* csrColIndB, const hipDoubleComplex* beta, const hipsparseMatDescr_t descrD, int nnzD, const int* csrRowPtrD, const int* csrColIndD, csrgemm2Info_t info, size_t* pBufferSizeInBytes);
// CHECK: status_t = hipsparseZcsrgemm2_bufferSizeExt(handle_t, m, n, k, &dcomplexA, matDescr_A, nnza, &csrRowPtrA, &csrColIndA, matDescr_B, nnzb, &csrRowPtrB, &csrColIndB, &dcomplexB, matDescr_D, nnzd, &csrRowPtrD, &csrColIndD, csrgemm2_info, &bufferSize);
status_t = cusparseZcsrgemm2_bufferSizeExt(handle_t, m, n, k, &dcomplexA, matDescr_A, nnza, &csrRowPtrA, &csrColIndA, matDescr_B, nnzb, &csrRowPtrB, &csrColIndB, &dcomplexB, matDescr_D, nnzd, &csrRowPtrD, &csrColIndD, csrgemm2_info, &bufferSize);

// CUDA: CUSPARSE_DEPRECATED(cusparseSpGEMM) cusparseStatus_t CUSPARSEAPI cusparseCcsrgemm2_bufferSizeExt(cusparseHandle_t handle, int m, int n, int k, const cuComplex* alpha, const cusparseMatDescr_t descrA, int nnzA, const int* csrSortedRowPtrA, const int* csrSortedColIndA, const cusparseMatDescr_t descrB, int nnzB, const int* csrSortedRowPtrB, const int* csrSortedColIndB, const cuComplex* beta, const cusparseMatDescr_t descrD, int nnzD, const int* csrSortedRowPtrD, const int* csrSortedColIndD, csrgemm2Info_t info, size_t* pBufferSizeInBytes);
// HIP: DEPRECATED_CUDA_11000("The routine will be removed in CUDA 12") HIPSPARSE_EXPORT hipsparseStatus_t hipsparseCcsrgemm2_bufferSizeExt(hipsparseHandle_t handle, int m, int n, int k, const hipComplex* alpha, const hipsparseMatDescr_t descrA, int nnzA, const int* csrRowPtrA, const int* csrColIndA, const hipsparseMatDescr_t descrB, int nnzB, const int* csrRowPtrB, const int* csrColIndB, const hipComplex* beta, const hipsparseMatDescr_t descrD, int nnzD, const int* csrRowPtrD, const int* csrColIndD, csrgemm2Info_t info, size_t* pBufferSizeInBytes);
// CHECK: status_t = hipsparseCcsrgemm2_bufferSizeExt(handle_t, m, n, k, &complexA, matDescr_A, nnza, &csrRowPtrA, &csrColIndA, matDescr_B, nnzb, &csrRowPtrB, &csrColIndB, &complexB, matDescr_D, nnzd, &csrRowPtrD, &csrColIndD, csrgemm2_info, &bufferSize);
status_t = cusparseCcsrgemm2_bufferSizeExt(handle_t, m, n, k, &complexA, matDescr_A, nnza, &csrRowPtrA, &csrColIndA, matDescr_B, nnzb, &csrRowPtrB, &csrColIndB, &complexB, matDescr_D, nnzd, &csrRowPtrD, &csrColIndD, csrgemm2_info, &bufferSize);

// CUDA: CUSPARSE_DEPRECATED(cusparseSpGEMM) cusparseStatus_t CUSPARSEAPI cusparseDcsrgemm2_bufferSizeExt(cusparseHandle_t handle, int m, int n, int k, const double* alpha, const cusparseMatDescr_t descrA, int nnzA, const int* csrSortedRowPtrA, const int* csrSortedColIndA, const cusparseMatDescr_t descrB, int nnzB, const int* csrSortedRowPtrB, const int* csrSortedColIndB, const double* beta, const cusparseMatDescr_t descrD, int nnzD, const int* csrSortedRowPtrD, const int* csrSortedColIndD, csrgemm2Info_t info, size_t* pBufferSizeInBytes);
// HIP: DEPRECATED_CUDA_11000("The routine will be removed in CUDA 12") HIPSPARSE_EXPORT hipsparseStatus_t hipsparseDcsrgemm2_bufferSizeExt(hipsparseHandle_t handle, int m, int n, int k, const double* alpha, const hipsparseMatDescr_t descrA, int nnzA, const int* csrRowPtrA, const int* csrColIndA, const hipsparseMatDescr_t descrB, int nnzB, const int* csrRowPtrB, const int* csrColIndB, const double* beta, const hipsparseMatDescr_t descrD, int nnzD, const int* csrRowPtrD, const int* csrColIndD, csrgemm2Info_t info, size_t* pBufferSizeInBytes);
// CHECK: status_t = hipsparseDcsrgemm2_bufferSizeExt(handle_t, m, n, k, &dA, matDescr_A, nnza, &csrRowPtrA, &csrColIndA, matDescr_B, nnzb, &csrRowPtrB, &csrColIndB, &dB, matDescr_D, nnzd, &csrRowPtrD, &csrColIndD, csrgemm2_info, &bufferSize);
status_t = cusparseDcsrgemm2_bufferSizeExt(handle_t, m, n, k, &dA, matDescr_A, nnza, &csrRowPtrA, &csrColIndA, matDescr_B, nnzb, &csrRowPtrB, &csrColIndB, &dB, matDescr_D, nnzd, &csrRowPtrD, &csrColIndD, csrgemm2_info, &bufferSize);

// CUDA: CUSPARSE_DEPRECATED(cusparseSpGEMM) cusparseStatus_t CUSPARSEAPI cusparseScsrgemm2_bufferSizeExt(cusparseHandle_t handle, int m, int n, int k, const float* alpha, const cusparseMatDescr_t descrA, int nnzA, const int* csrSortedRowPtrA, const int* csrSortedColIndA, const cusparseMatDescr_t descrB, int nnzB, const int* csrSortedRowPtrB, const int* csrSortedColIndB, const float* beta, const cusparseMatDescr_t descrD, int nnzD, const int* csrSortedRowPtrD, const int* csrSortedColIndD, csrgemm2Info_t info, size_t* pBufferSizeInBytes);
// HIP: DEPRECATED_CUDA_11000("The routine will be removed in CUDA 12") HIPSPARSE_EXPORT hipsparseStatus_t hipsparseScsrgemm2_bufferSizeExt(hipsparseHandle_t handle, int m, int n, int k, const float* alpha, const hipsparseMatDescr_t descrA, int nnzA, const int* csrRowPtrA, const int* csrColIndA, const hipsparseMatDescr_t descrB, int nnzB, const int* csrRowPtrB, const int* csrColIndB, const float* beta, const hipsparseMatDescr_t descrD, int nnzD, const int* csrRowPtrD, const int* csrColIndD, csrgemm2Info_t info, size_t* pBufferSizeInBytes);
// CHECK: status_t = hipsparseScsrgemm2_bufferSizeExt(handle_t, m, n, k, &fA, matDescr_A, nnza, &csrRowPtrA, &csrColIndA, matDescr_B, nnzb, &csrRowPtrB, &csrColIndB, &fB, matDescr_D, nnzd, &csrRowPtrD, &csrColIndD, csrgemm2_info, &bufferSize);
status_t = cusparseScsrgemm2_bufferSizeExt(handle_t, m, n, k, &fA, matDescr_A, nnza, &csrRowPtrA, &csrColIndA, matDescr_B, nnzb, &csrRowPtrB, &csrColIndB, &fB, matDescr_D, nnzd, &csrRowPtrD, &csrColIndD, csrgemm2_info, &bufferSize);
#endif

#if CUDA_VERSION >= 12000
Expand Down
Loading

0 comments on commit 518dc6a

Please sign in to comment.