diff --git a/bin/hipify-perl b/bin/hipify-perl index 18105ada..f81d89aa 100755 --- a/bin/hipify-perl +++ b/bin/hipify-perl @@ -1762,6 +1762,7 @@ sub rocSubstitutions { subst("cusparseCbsrilu02", "rocsparse_cbsrilu0", "library"); subst("cusparseCbsrilu02_analysis", "rocsparse_cbsrilu0_analysis", "library"); subst("cusparseCbsrilu02_numericBoost", "rocsparse_dcbsrilu0_numeric_boost", "library"); + subst("cusparseCbsrmm", "rocsparse_cbsrmm", "library"); subst("cusparseCbsrsm2_analysis", "rocsparse_cbsrsm_analysis", "library"); subst("cusparseCbsrsm2_bufferSize", "rocsparse_cbsrsm_buffer_size", "library"); subst("cusparseCbsrsm2_solve", "rocsparse_cbsrsm_solve", "library"); @@ -1835,6 +1836,7 @@ sub rocSubstitutions { subst("cusparseDbsrilu02", "rocsparse_dbsrilu0", "library"); subst("cusparseDbsrilu02_analysis", "rocsparse_dbsrilu0_analysis", "library"); subst("cusparseDbsrilu02_numericBoost", "rocsparse_dbsrilu0_numeric_boost", "library"); + subst("cusparseDbsrmm", "rocsparse_dbsrmm", "library"); subst("cusparseDbsrsm2_analysis", "rocsparse_dbsrsm_analysis", "library"); subst("cusparseDbsrsm2_bufferSize", "rocsparse_dbsrsm_buffer_size", "library"); subst("cusparseDbsrsm2_solve", "rocsparse_dbsrsm_solve", "library"); @@ -1926,6 +1928,7 @@ sub rocSubstitutions { subst("cusparseSbsrilu02", "rocsparse_sbsrilu0", "library"); subst("cusparseSbsrilu02_analysis", "rocsparse_sbsrilu0_analysis", "library"); subst("cusparseSbsrilu02_numericBoost", "rocsparse_dsbsrilu0_numeric_boost", "library"); + subst("cusparseSbsrmm", "rocsparse_sbsrmm", "library"); subst("cusparseSbsrsm2_analysis", "rocsparse_sbsrsm_analysis", "library"); subst("cusparseSbsrsm2_bufferSize", "rocsparse_sbsrsm_buffer_size", "library"); subst("cusparseSbsrsm2_solve", "rocsparse_sbsrsm_solve", "library"); @@ -2030,6 +2033,7 @@ sub rocSubstitutions { subst("cusparseZbsrilu02", "rocsparse_zbsrilu0", "library"); subst("cusparseZbsrilu02_analysis", "rocsparse_zbsrilu0_analysis", "library"); subst("cusparseZbsrilu02_numericBoost", "rocsparse_zbsrilu0_numeric_boost", "library"); + subst("cusparseZbsrmm", "rocsparse_zbsrmm", "library"); subst("cusparseZbsrsm2_analysis", "rocsparse_zbsrsm_analysis", "library"); subst("cusparseZbsrsm2_bufferSize", "rocsparse_zbsrsm_buffer_size", "library"); subst("cusparseZbsrsm2_solve", "rocsparse_zbsrsm_solve", "library"); diff --git a/docs/tables/CUSPARSE_API_supported_by_HIP_and_ROC.md b/docs/tables/CUSPARSE_API_supported_by_HIP_and_ROC.md index b91f0739..e19afbc7 100644 --- a/docs/tables/CUSPARSE_API_supported_by_HIP_and_ROC.md +++ b/docs/tables/CUSPARSE_API_supported_by_HIP_and_ROC.md @@ -379,7 +379,7 @@ |**CUDA**|**A**|**D**|**C**|**R**|**HIP**|**A**|**D**|**C**|**R**|**E**|**ROC**|**A**|**D**|**C**|**R**|**E**| |:--|:-:|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:|:-:| -|`cusparseCbsrmm`| | | | |`hipsparseCbsrmm`|3.7.0| | | | | | | | | | | +|`cusparseCbsrmm`| | | | |`hipsparseCbsrmm`|3.7.0| | | | |`rocsparse_cbsrmm`|3.7.0| | | | | |`cusparseCbsrsm2_analysis`| |12.2| | |`hipsparseCbsrsm2_analysis`|4.5.0| | | | |`rocsparse_cbsrsm_analysis`|3.6.0| | | | | |`cusparseCbsrsm2_bufferSize`| |12.2| | |`hipsparseCbsrsm2_bufferSize`|4.5.0| | | | |`rocsparse_cbsrsm_buffer_size`|4.5.0| | | | | |`cusparseCbsrsm2_bufferSizeExt`| |12.2| | | | | | | | | | | | | | | @@ -392,7 +392,7 @@ |`cusparseCcsrsm_analysis`| |10.2| |11.0| | | | | | | | | | | | | |`cusparseCcsrsm_solve`| |10.2| |11.0| | | | | | | | | | | | | |`cusparseCgemmi`|8.0|11.0| |12.0|`hipsparseCgemmi`|3.7.0| | | | | | | | | | | -|`cusparseDbsrmm`| | | | |`hipsparseDbsrmm`|3.7.0| | | | | | | | | | | +|`cusparseDbsrmm`| | | | |`hipsparseDbsrmm`|3.7.0| | | | |`rocsparse_dbsrmm`|3.7.0| | | | | |`cusparseDbsrsm2_analysis`| |12.2| | |`hipsparseDbsrsm2_analysis`|4.5.0| | | | |`rocsparse_dbsrsm_analysis`|3.6.0| | | | | |`cusparseDbsrsm2_bufferSize`| |12.2| | |`hipsparseDbsrsm2_bufferSize`|4.5.0| | | | |`rocsparse_dbsrsm_buffer_size`|4.5.0| | | | | |`cusparseDbsrsm2_bufferSizeExt`| |12.2| | | | | | | | | | | | | | | @@ -405,7 +405,7 @@ |`cusparseDcsrsm_analysis`| |10.2| |11.0| | | | | | | | | | | | | |`cusparseDcsrsm_solve`| |10.2| |11.0| | | | | | | | | | | | | |`cusparseDgemmi`|8.0|11.0| |12.0|`hipsparseDgemmi`|3.7.0| | | | | | | | | | | -|`cusparseSbsrmm`| | | | |`hipsparseSbsrmm`|3.7.0| | | | | | | | | | | +|`cusparseSbsrmm`| | | | |`hipsparseSbsrmm`|3.7.0| | | | |`rocsparse_sbsrmm`|3.7.0| | | | | |`cusparseSbsrsm2_analysis`| |12.2| | |`hipsparseSbsrsm2_analysis`|4.5.0| | | | |`rocsparse_sbsrsm_analysis`|3.6.0| | | | | |`cusparseSbsrsm2_bufferSize`| |12.2| | |`hipsparseSbsrsm2_bufferSize`|4.5.0| | | | |`rocsparse_sbsrsm_buffer_size`|4.5.0| | | | | |`cusparseSbsrsm2_bufferSizeExt`| |12.2| | | | | | | | | | | | | | | @@ -420,7 +420,7 @@ |`cusparseSgemmi`|8.0|11.0| |12.0|`hipsparseSgemmi`|3.7.0| | | | | | | | | | | |`cusparseXbsrsm2_zeroPivot`| |12.2| | |`hipsparseXbsrsm2_zeroPivot`|4.5.0| | | | |`rocsparse_bsrsm_zero_pivot`|4.5.0| | | | | |`cusparseXcsrsm2_zeroPivot`|9.2|11.3| |12.0|`hipsparseXcsrsm2_zeroPivot`|3.1.0| | | | |`rocsparse_csrsm_zero_pivot`|3.1.0| | | | | -|`cusparseZbsrmm`| | | | |`hipsparseZbsrmm`|3.7.0| | | | | | | | | | | +|`cusparseZbsrmm`| | | | |`hipsparseZbsrmm`|3.7.0| | | | |`rocsparse_zbsrmm`|3.7.0| | | | | |`cusparseZbsrsm2_analysis`| |12.2| | |`hipsparseZbsrsm2_analysis`|4.5.0| | | | |`rocsparse_zbsrsm_analysis`|3.6.0| | | | | |`cusparseZbsrsm2_bufferSize`| |12.2| | |`hipsparseZbsrsm2_bufferSize`|4.5.0| | | | |`rocsparse_zbsrsm_buffer_size`|4.5.0| | | | | |`cusparseZbsrsm2_bufferSizeExt`| |12.2| | | | | | | | | | | | | | | diff --git a/docs/tables/CUSPARSE_API_supported_by_ROC.md b/docs/tables/CUSPARSE_API_supported_by_ROC.md index bf128cff..8e060798 100644 --- a/docs/tables/CUSPARSE_API_supported_by_ROC.md +++ b/docs/tables/CUSPARSE_API_supported_by_ROC.md @@ -379,7 +379,7 @@ |**CUDA**|**A**|**D**|**C**|**R**|**ROC**|**A**|**D**|**C**|**R**|**E**| |:--|:-:|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:|:-:| -|`cusparseCbsrmm`| | | | | | | | | | | +|`cusparseCbsrmm`| | | | |`rocsparse_cbsrmm`|3.7.0| | | | | |`cusparseCbsrsm2_analysis`| |12.2| | |`rocsparse_cbsrsm_analysis`|3.6.0| | | | | |`cusparseCbsrsm2_bufferSize`| |12.2| | |`rocsparse_cbsrsm_buffer_size`|4.5.0| | | | | |`cusparseCbsrsm2_bufferSizeExt`| |12.2| | | | | | | | | @@ -392,7 +392,7 @@ |`cusparseCcsrsm_analysis`| |10.2| |11.0| | | | | | | |`cusparseCcsrsm_solve`| |10.2| |11.0| | | | | | | |`cusparseCgemmi`|8.0|11.0| |12.0| | | | | | | -|`cusparseDbsrmm`| | | | | | | | | | | +|`cusparseDbsrmm`| | | | |`rocsparse_dbsrmm`|3.7.0| | | | | |`cusparseDbsrsm2_analysis`| |12.2| | |`rocsparse_dbsrsm_analysis`|3.6.0| | | | | |`cusparseDbsrsm2_bufferSize`| |12.2| | |`rocsparse_dbsrsm_buffer_size`|4.5.0| | | | | |`cusparseDbsrsm2_bufferSizeExt`| |12.2| | | | | | | | | @@ -405,7 +405,7 @@ |`cusparseDcsrsm_analysis`| |10.2| |11.0| | | | | | | |`cusparseDcsrsm_solve`| |10.2| |11.0| | | | | | | |`cusparseDgemmi`|8.0|11.0| |12.0| | | | | | | -|`cusparseSbsrmm`| | | | | | | | | | | +|`cusparseSbsrmm`| | | | |`rocsparse_sbsrmm`|3.7.0| | | | | |`cusparseSbsrsm2_analysis`| |12.2| | |`rocsparse_sbsrsm_analysis`|3.6.0| | | | | |`cusparseSbsrsm2_bufferSize`| |12.2| | |`rocsparse_sbsrsm_buffer_size`|4.5.0| | | | | |`cusparseSbsrsm2_bufferSizeExt`| |12.2| | | | | | | | | @@ -420,7 +420,7 @@ |`cusparseSgemmi`|8.0|11.0| |12.0| | | | | | | |`cusparseXbsrsm2_zeroPivot`| |12.2| | |`rocsparse_bsrsm_zero_pivot`|4.5.0| | | | | |`cusparseXcsrsm2_zeroPivot`|9.2|11.3| |12.0|`rocsparse_csrsm_zero_pivot`|3.1.0| | | | | -|`cusparseZbsrmm`| | | | | | | | | | | +|`cusparseZbsrmm`| | | | |`rocsparse_zbsrmm`|3.7.0| | | | | |`cusparseZbsrsm2_analysis`| |12.2| | |`rocsparse_zbsrsm_analysis`|3.6.0| | | | | |`cusparseZbsrsm2_bufferSize`| |12.2| | |`rocsparse_zbsrsm_buffer_size`|4.5.0| | | | | |`cusparseZbsrsm2_bufferSizeExt`| |12.2| | | | | | | | | diff --git a/src/CUDA2HIP_SPARSE_API_functions.cpp b/src/CUDA2HIP_SPARSE_API_functions.cpp index 9e1eda89..9f1019e9 100644 --- a/src/CUDA2HIP_SPARSE_API_functions.cpp +++ b/src/CUDA2HIP_SPARSE_API_functions.cpp @@ -254,10 +254,10 @@ const std::map CUDA_SPARSE_FUNCTION_MAP { {"cusparseZcsrsm2_solve", {"hipsparseZcsrsm2_solve", "rocsparse_zcsrsm_solve", CONV_LIB_FUNC, API_SPARSE, 10, CUDA_DEPRECATED | CUDA_REMOVED}}, {"cusparseXcsrsm2_zeroPivot", {"hipsparseXcsrsm2_zeroPivot", "rocsparse_csrsm_zero_pivot", CONV_LIB_FUNC, API_SPARSE, 10, CUDA_DEPRECATED | CUDA_REMOVED}}, - {"cusparseSbsrmm", {"hipsparseSbsrmm", "", CONV_LIB_FUNC, API_SPARSE, 10, ROC_UNSUPPORTED}}, - {"cusparseDbsrmm", {"hipsparseDbsrmm", "", CONV_LIB_FUNC, API_SPARSE, 10, ROC_UNSUPPORTED}}, - {"cusparseCbsrmm", {"hipsparseCbsrmm", "", CONV_LIB_FUNC, API_SPARSE, 10, ROC_UNSUPPORTED}}, - {"cusparseZbsrmm", {"hipsparseZbsrmm", "", CONV_LIB_FUNC, API_SPARSE, 10, ROC_UNSUPPORTED}}, + {"cusparseSbsrmm", {"hipsparseSbsrmm", "rocsparse_sbsrmm", CONV_LIB_FUNC, API_SPARSE, 10}}, + {"cusparseDbsrmm", {"hipsparseDbsrmm", "rocsparse_dbsrmm", CONV_LIB_FUNC, API_SPARSE, 10}}, + {"cusparseCbsrmm", {"hipsparseCbsrmm", "rocsparse_cbsrmm", CONV_LIB_FUNC, API_SPARSE, 10}}, + {"cusparseZbsrmm", {"hipsparseZbsrmm", "rocsparse_zbsrmm", CONV_LIB_FUNC, API_SPARSE, 10}}, {"cusparseSbsrsm2_bufferSize", {"hipsparseSbsrsm2_bufferSize", "rocsparse_sbsrsm_buffer_size", CONV_LIB_FUNC, API_SPARSE, 10, CUDA_DEPRECATED}}, {"cusparseSbsrsm2_bufferSizeExt", {"hipsparseSbsrsm2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, 10, UNSUPPORTED | CUDA_DEPRECATED}}, @@ -2307,6 +2307,10 @@ const std::map HIP_SPARSE_FUNCTION_VER_MAP { {"rocsparse_ccsrmm", {HIP_1090, HIP_0, HIP_0 }}, {"rocsparse_dcsrmm", {HIP_1090, HIP_0, HIP_0 }}, {"rocsparse_scsrmm", {HIP_1090, HIP_0, HIP_0 }}, + {"rocsparse_zbsrmm", {HIP_3070, HIP_0, HIP_0 }}, + {"rocsparse_cbsrmm", {HIP_3070, HIP_0, HIP_0 }}, + {"rocsparse_dbsrmm", {HIP_3070, HIP_0, HIP_0 }}, + {"rocsparse_sbsrmm", {HIP_3070, HIP_0, HIP_0 }}, }; const std::map CUDA_SPARSE_FUNCTION_CHANGED_VER_MAP { diff --git a/tests/unit_tests/synthetic/libraries/cusparse2hipsparse.cu b/tests/unit_tests/synthetic/libraries/cusparse2hipsparse.cu index f88d91c4..413a5708 100644 --- a/tests/unit_tests/synthetic/libraries/cusparse2hipsparse.cu +++ b/tests/unit_tests/synthetic/libraries/cusparse2hipsparse.cu @@ -126,6 +126,7 @@ int main() { int m = 0; int n = 0; int k = 0; + int kb = 0; int mb = 0; int nb = 0; int nnza = 0; @@ -1049,6 +1050,26 @@ int main() { // CHECK: status_t = hipsparseXbsrsm2_zeroPivot(handle_t, bsrsm2_info, &iposition); status_t = cusparseXbsrsm2_zeroPivot(handle_t, bsrsm2_info, &iposition); + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseZbsrmm(cusparseHandle_t handle, cusparseDirection_t dirA, cusparseOperation_t transA, cusparseOperation_t transB, int mb, int n, int kb, int nnzb, const cuDoubleComplex* alpha, const cusparseMatDescr_t descrA, const cuDoubleComplex* bsrSortedValA, const int* bsrSortedRowPtrA, const int* bsrSortedColIndA, const int blockSize, const cuDoubleComplex* B, const int ldb, const cuDoubleComplex* beta, cuDoubleComplex* C, int ldc); + // HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseZbsrmm(hipsparseHandle_t handle, hipsparseDirection_t dirA, hipsparseOperation_t transA, hipsparseOperation_t transB, int mb, int n, int kb, int nnzb, const hipDoubleComplex* alpha, const hipsparseMatDescr_t descrA, const hipDoubleComplex* bsrValA, const int* bsrRowPtrA, const int* bsrColIndA, int blockDim, const hipDoubleComplex* B, int ldb, const hipDoubleComplex* beta, hipDoubleComplex* C, int ldc); + // CHECK: status_t = hipsparseZbsrmm(handle_t, direction_t, opA, opB, mb, n, kb, nnzb, &dcomplexA, matDescr_A, &dcomplex, &bsrRowPtrA, &bsrColIndA, blockDim, &dcomplexB, ldb, &dcomplexBeta, &dcomplexC, ldc); + status_t = cusparseZbsrmm(handle_t, direction_t, opA, opB, mb, n, kb, nnzb, &dcomplexA, matDescr_A, &dcomplex, &bsrRowPtrA, &bsrColIndA, blockDim, &dcomplexB, ldb, &dcomplexBeta, &dcomplexC, ldc); + + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseCbsrmm(cusparseHandle_t handle, cusparseDirection_t dirA, cusparseOperation_t transA, cusparseOperation_t transB, int mb, int n, int kb, int nnzb, const cuComplex* alpha, const cusparseMatDescr_t descrA, const cuComplex* bsrSortedValA, const int* bsrSortedRowPtrA, const int* bsrSortedColIndA, const int blockSize, const cuComplex* B, const int ldb, const cuComplex* beta, cuComplex* C, int ldc); + // HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseCbsrmm(hipsparseHandle_t handle, hipsparseDirection_t dirA, hipsparseOperation_t transA, hipsparseOperation_t transB, int mb, int n, int kb, int nnzb, const hipComplex* alpha, const hipsparseMatDescr_t descrA, const hipComplex* bsrValA, const int* bsrRowPtrA, const int* bsrColIndA, int blockDim, const hipComplex* B, int ldb, const hipComplex* beta, hipComplex* C, int ldc); + // CHECK: status_t = hipsparseCbsrmm(handle_t, direction_t, opA, opB, mb, n, kb, nnzb, &complexA, matDescr_A, &complex, &bsrRowPtrA, &bsrColIndA, blockDim, &complexB, ldb, &complexBeta, &complexC, ldc); + status_t = cusparseCbsrmm(handle_t, direction_t, opA, opB, mb, n, kb, nnzb, &complexA, matDescr_A, &complex, &bsrRowPtrA, &bsrColIndA, blockDim, &complexB, ldb, &complexBeta, &complexC, ldc); + + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseDbsrmm(cusparseHandle_t handle, cusparseDirection_t dirA, cusparseOperation_t transA, cusparseOperation_t transB, int mb, int n, int kb, int nnzb, const double* alpha, const cusparseMatDescr_t descrA, const double* bsrSortedValA, const int* bsrSortedRowPtrA, const int* bsrSortedColIndA, const int blockSize, const double* B, const int ldb, const double* beta, double* C, int ldc); + // HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseDbsrmm(hipsparseHandle_t handle, hipsparseDirection_t dirA, hipsparseOperation_t transA, hipsparseOperation_t transB, int mb, int n, int kb, int nnzb, const double* alpha, const hipsparseMatDescr_t descrA, const double* bsrValA, const int* bsrRowPtrA, const int* bsrColIndA, int blockDim, const double* B, int ldb, const double* beta, double* C, int ldc); + // CHECK: status_t = hipsparseDbsrmm(handle_t, direction_t, opA, opB, mb, n, kb, nnzb, &dA, matDescr_A, &dbscVal, &bsrRowPtrA, &bsrColIndA, blockDim, &dB, ldb, &dBeta, &dC, ldc); + status_t = cusparseDbsrmm(handle_t, direction_t, opA, opB, mb, n, kb, nnzb, &dA, matDescr_A, &dbscVal, &bsrRowPtrA, &bsrColIndA, blockDim, &dB, ldb, &dBeta, &dC, ldc); + + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseSbsrmm(cusparseHandle_t handle, cusparseDirection_t dirA, cusparseOperation_t transA, cusparseOperation_t transB, int mb, int n, int kb, int nnzb, const float* alpha, const cusparseMatDescr_t descrA, const float* bsrSortedValA, const int* bsrSortedRowPtrA, const int* bsrSortedColIndA, const int blockSize, const float* B, const int ldb, const float* beta, float* C, int ldc); + // HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseSbsrmm(hipsparseHandle_t handle, hipsparseDirection_t dirA, hipsparseOperation_t transA, hipsparseOperation_t transB, int mb, int n, int kb, int nnzb, const float* alpha, const hipsparseMatDescr_t descrA, const float* bsrValA, const int* bsrRowPtrA, const int* bsrColIndA, int blockDim, const float* B, int ldb, const float* beta, float* C, int ldc); + // CHECK: status_t = hipsparseSbsrmm(handle_t, direction_t, opA, opB, mb, n, kb, nnzb, &fA, matDescr_A, &fbscVal, &bsrRowPtrA, &bsrColIndA, blockDim, &fB, ldb, &fBeta, &fC, ldc); + status_t = cusparseSbsrmm(handle_t, direction_t, opA, opB, mb, n, kb, nnzb, &fA, matDescr_A, &fbscVal, &bsrRowPtrA, &bsrColIndA, blockDim, &fB, ldb, &fBeta, &fC, ldc); + #if CUDA_VERSION >= 8000 // CHECK: hipDataType dataType_t; // CHECK-NEXT: hipDataType dataType; diff --git a/tests/unit_tests/synthetic/libraries/cusparse2rocsparse.cu b/tests/unit_tests/synthetic/libraries/cusparse2rocsparse.cu index 7c6094b8..3459d004 100644 --- a/tests/unit_tests/synthetic/libraries/cusparse2rocsparse.cu +++ b/tests/unit_tests/synthetic/libraries/cusparse2rocsparse.cu @@ -126,6 +126,7 @@ int main() { int m = 0; int n = 0; int k = 0; + int kb = 0; int mb = 0; int nb = 0; int nnza = 0; @@ -1042,6 +1043,26 @@ int main() { // CHECK: status_t = rocsparse_bsrsm_zero_pivot(handle_t, bsrsm2_info, &iposition); status_t = cusparseXbsrsm2_zeroPivot(handle_t, bsrsm2_info, &iposition); + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseZbsrmm(cusparseHandle_t handle, cusparseDirection_t dirA, cusparseOperation_t transA, cusparseOperation_t transB, int mb, int n, int kb, int nnzb, const cuDoubleComplex* alpha, const cusparseMatDescr_t descrA, const cuDoubleComplex* bsrSortedValA, const int* bsrSortedRowPtrA, const int* bsrSortedColIndA, const int blockSize, const cuDoubleComplex* B, const int ldb, const cuDoubleComplex* beta, cuDoubleComplex* C, int ldc); + // ROC: ROCSPARSE_EXPORT rocsparse_status rocsparse_zbsrmm(rocsparse_handle handle, rocsparse_direction dir, rocsparse_operation trans_A, rocsparse_operation trans_B, rocsparse_int mb, rocsparse_int n, rocsparse_int kb, rocsparse_int nnzb, const rocsparse_double_complex* alpha, const rocsparse_mat_descr descr, const rocsparse_double_complex* bsr_val, const rocsparse_int* bsr_row_ptr, const rocsparse_int* bsr_col_ind, rocsparse_int block_dim, const rocsparse_double_complex* B, rocsparse_int ldb, const rocsparse_double_complex* beta, rocsparse_double_complex* C, rocsparse_int ldc); + // CHECK: status_t = rocsparse_zbsrmm(handle_t, direction_t, opA, opB, mb, n, kb, nnzb, &dcomplexA, matDescr_A, &dcomplex, &bsrRowPtrA, &bsrColIndA, blockDim, &dcomplexB, ldb, &dcomplexBeta, &dcomplexC, ldc); + status_t = cusparseZbsrmm(handle_t, direction_t, opA, opB, mb, n, kb, nnzb, &dcomplexA, matDescr_A, &dcomplex, &bsrRowPtrA, &bsrColIndA, blockDim, &dcomplexB, ldb, &dcomplexBeta, &dcomplexC, ldc); + + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseCbsrmm(cusparseHandle_t handle, cusparseDirection_t dirA, cusparseOperation_t transA, cusparseOperation_t transB, int mb, int n, int kb, int nnzb, const cuComplex* alpha, const cusparseMatDescr_t descrA, const cuComplex* bsrSortedValA, const int* bsrSortedRowPtrA, const int* bsrSortedColIndA, const int blockSize, const cuComplex* B, const int ldb, const cuComplex* beta, cuComplex* C, int ldc); + // ROC: ROCSPARSE_EXPORT rocsparse_status rocsparse_cbsrmm(rocsparse_handle handle, rocsparse_direction dir, rocsparse_operation trans_A, rocsparse_operation trans_B, rocsparse_int mb, rocsparse_int n, rocsparse_int kb, rocsparse_int nnzb, const rocsparse_float_complex* alpha, const rocsparse_mat_descr descr, const rocsparse_float_complex* bsr_val, const rocsparse_int* bsr_row_ptr, const rocsparse_int* bsr_col_ind, rocsparse_int block_dim, const rocsparse_float_complex* B, rocsparse_int ldb, const rocsparse_float_complex* beta, rocsparse_float_complex* C, rocsparse_int ldc); + // CHECK: status_t = rocsparse_cbsrmm(handle_t, direction_t, opA, opB, mb, n, kb, nnzb, &complexA, matDescr_A, &complex, &bsrRowPtrA, &bsrColIndA, blockDim, &complexB, ldb, &complexBeta, &complexC, ldc); + status_t = cusparseCbsrmm(handle_t, direction_t, opA, opB, mb, n, kb, nnzb, &complexA, matDescr_A, &complex, &bsrRowPtrA, &bsrColIndA, blockDim, &complexB, ldb, &complexBeta, &complexC, ldc); + + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseDbsrmm(cusparseHandle_t handle, cusparseDirection_t dirA, cusparseOperation_t transA, cusparseOperation_t transB, int mb, int n, int kb, int nnzb, const double* alpha, const cusparseMatDescr_t descrA, const double* bsrSortedValA, const int* bsrSortedRowPtrA, const int* bsrSortedColIndA, const int blockSize, const double* B, const int ldb, const double* beta, double* C, int ldc); + // ROC: ROCSPARSE_EXPORT rocsparse_status rocsparse_dbsrmm(rocsparse_handle handle, rocsparse_direction dir, rocsparse_operation trans_A, rocsparse_operation trans_B, rocsparse_int mb, rocsparse_int n, rocsparse_int kb, rocsparse_int nnzb, const double* alpha, const rocsparse_mat_descr descr, const double* bsr_val, const rocsparse_int* bsr_row_ptr, const rocsparse_int* bsr_col_ind, rocsparse_int block_dim, const double* B, rocsparse_int ldb, const double* beta, double* C, rocsparse_int ldc); + // CHECK: status_t = rocsparse_dbsrmm(handle_t, direction_t, opA, opB, mb, n, kb, nnzb, &dA, matDescr_A, &dbscVal, &bsrRowPtrA, &bsrColIndA, blockDim, &dB, ldb, &dBeta, &dC, ldc); + status_t = cusparseDbsrmm(handle_t, direction_t, opA, opB, mb, n, kb, nnzb, &dA, matDescr_A, &dbscVal, &bsrRowPtrA, &bsrColIndA, blockDim, &dB, ldb, &dBeta, &dC, ldc); + + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseSbsrmm(cusparseHandle_t handle, cusparseDirection_t dirA, cusparseOperation_t transA, cusparseOperation_t transB, int mb, int n, int kb, int nnzb, const float* alpha, const cusparseMatDescr_t descrA, const float* bsrSortedValA, const int* bsrSortedRowPtrA, const int* bsrSortedColIndA, const int blockSize, const float* B, const int ldb, const float* beta, float* C, int ldc); + // ROC: ROCSPARSE_EXPORT rocsparse_status rocsparse_sbsrmm(rocsparse_handle handle, rocsparse_direction dir, rocsparse_operation trans_A, rocsparse_operation trans_B, rocsparse_int mb, rocsparse_int n, rocsparse_int kb, rocsparse_int nnzb, const float* alpha, const rocsparse_mat_descr descr, const float* bsr_val, const rocsparse_int* bsr_row_ptr, const rocsparse_int* bsr_col_ind, rocsparse_int block_dim, const float* B, rocsparse_int ldb, const float* beta, float* C, rocsparse_int ldc); + // CHECK: status_t = rocsparse_sbsrmm(handle_t, direction_t, opA, opB, mb, n, kb, nnzb, &fA, matDescr_A, &fbscVal, &bsrRowPtrA, &bsrColIndA, blockDim, &fB, ldb, &fBeta, &fC, ldc); + status_t = cusparseSbsrmm(handle_t, direction_t, opA, opB, mb, n, kb, nnzb, &fA, matDescr_A, &fbscVal, &bsrRowPtrA, &bsrColIndA, blockDim, &fB, ldb, &fBeta, &fC, ldc); + #if CUDA_VERSION >= 8000 // TODO: [#899] There should be rocsparse_datatype instead of hipDataType cudaDataType_t dataType_t;