diff --git a/bin/hipify-perl b/bin/hipify-perl index 21217aae..3e8f2a77 100755 --- a/bin/hipify-perl +++ b/bin/hipify-perl @@ -1758,6 +1758,7 @@ sub rocSubstitutions { subst("cusparseCbsrilu02", "rocsparse_cbsrilu0", "library"); subst("cusparseCbsrilu02_analysis", "rocsparse_cbsrilu0_analysis", "library"); subst("cusparseCbsrilu02_numericBoost", "rocsparse_dcbsrilu0_numeric_boost", "library"); + subst("cusparseCbsrsm2_solve", "rocsparse_cbsrsm_solve", "library"); subst("cusparseCcsc2dense", "rocsparse_ccsc2dense", "library"); subst("cusparseCcsr2bsr", "rocsparse_ccsr2bsr", "library"); subst("cusparseCcsr2csr_compress", "rocsparse_ccsr2csr_compress", "library"); @@ -1824,6 +1825,7 @@ sub rocSubstitutions { subst("cusparseDbsrilu02", "rocsparse_dbsrilu0", "library"); subst("cusparseDbsrilu02_analysis", "rocsparse_dbsrilu0_analysis", "library"); subst("cusparseDbsrilu02_numericBoost", "rocsparse_dbsrilu0_numeric_boost", "library"); + subst("cusparseDbsrsm2_solve", "rocsparse_dbsrsm_solve", "library"); subst("cusparseDcsc2dense", "rocsparse_dcsc2dense", "library"); subst("cusparseDcsr2bsr", "rocsparse_dcsr2bsr", "library"); subst("cusparseDcsr2csr_compress", "rocsparse_dcsr2csr_compress", "library"); @@ -1908,6 +1910,7 @@ sub rocSubstitutions { subst("cusparseSbsrilu02", "rocsparse_sbsrilu0", "library"); subst("cusparseSbsrilu02_analysis", "rocsparse_sbsrilu0_analysis", "library"); subst("cusparseSbsrilu02_numericBoost", "rocsparse_dsbsrilu0_numeric_boost", "library"); + subst("cusparseSbsrsm2_solve", "rocsparse_sbsrsm_solve", "library"); subst("cusparseScatter", "rocsparse_scatter", "library"); subst("cusparseScsc2dense", "rocsparse_scsc2dense", "library"); subst("cusparseScsr2bsr", "rocsparse_scsr2bsr", "library"); @@ -1989,6 +1992,7 @@ sub rocSubstitutions { subst("cusparseXcsr2bsrNnz", "rocsparse_csr2bsr_nnz", "library"); subst("cusparseXcsr2coo", "rocsparse_csr2coo", "library"); subst("cusparseXcsr2gebsrNnz", "rocsparse_csr2gebsr_nnz", "library"); + subst("cusparseXcsrgeamNnz", "rocsparse_csrgeam_nnz", "library"); subst("cusparseXcsrgemm2Nnz", "rocsparse_csrgemm_nnz", "library"); subst("cusparseXcsric02_zeroPivot", "rocsparse_csric0_zero_pivot", "library"); subst("cusparseXcsrilu02_zeroPivot", "rocsparse_csrilu0_zero_pivot", "library"); @@ -2002,6 +2006,7 @@ sub rocSubstitutions { subst("cusparseZbsrilu02", "rocsparse_zbsrilu0", "library"); subst("cusparseZbsrilu02_analysis", "rocsparse_zbsrilu0_analysis", "library"); subst("cusparseZbsrilu02_numericBoost", "rocsparse_zbsrilu0_numeric_boost", "library"); + subst("cusparseZbsrsm2_solve", "rocsparse_zbsrsm_solve", "library"); subst("cusparseZcsc2dense", "rocsparse_zcsc2dense", "library"); subst("cusparseZcsr2bsr", "rocsparse_zcsr2bsr", "library"); subst("cusparseZcsr2csr_compress", "rocsparse_zcsr2csr_compress", "library"); @@ -2047,6 +2052,8 @@ sub rocSubstitutions { subst("bsric02Info_t", "rocsparse_mat_info", "type"); subst("bsrilu02Info", "_rocsparse_mat_info", "type"); subst("bsrilu02Info_t", "rocsparse_mat_info", "type"); + subst("bsrsm2Info", "_rocsparse_mat_info", "type"); + subst("bsrsm2Info_t", "rocsparse_mat_info", "type"); subst("csrgemm2Info", "_rocsparse_mat_info", "type"); subst("csrgemm2Info_t", "rocsparse_mat_info", "type"); subst("csric02Info", "_rocsparse_mat_info", "type"); 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 6b2fcecf..86edc347 100644 --- a/docs/tables/CUSPARSE_API_supported_by_HIP_and_ROC.md +++ b/docs/tables/CUSPARSE_API_supported_by_HIP_and_ROC.md @@ -112,8 +112,8 @@ |`bsric02Info_t`| | | | |`bsric02Info_t`|3.8.0| | | | |`rocsparse_mat_info`|1.9.0| | | | | |`bsrilu02Info`| |12.2| | |`bsrilu02Info`|3.9.0| | | | |`_rocsparse_mat_info`|1.9.0| | | | | |`bsrilu02Info_t`| |12.2| | |`bsrilu02Info_t`|3.9.0| | | | |`rocsparse_mat_info`|1.9.0| | | | | -|`bsrsm2Info`| |12.2| | |`bsrsm2Info`|4.5.0| | | | | | | | | | | -|`bsrsm2Info_t`| |12.2| | |`bsrsm2Info_t`|4.5.0| | | | | | | | | | | +|`bsrsm2Info`| |12.2| | |`bsrsm2Info`|4.5.0| | | | |`_rocsparse_mat_info`|1.9.0| | | | | +|`bsrsm2Info_t`| |12.2| | |`bsrsm2Info_t`|4.5.0| | | | |`rocsparse_mat_info`|1.9.0| | | | | |`bsrsv2Info`| |12.2| | |`bsrsv2Info`|3.6.0| | | | | | | | | | | |`bsrsv2Info_t`| |12.2| | |`bsrsv2Info_t`|3.6.0| | | | | | | | | | | |`csrgemm2Info`| | | |12.0|`csrgemm2Info`|2.8.0| | | | |`_rocsparse_mat_info`|1.9.0| | | | | @@ -383,7 +383,7 @@ |`cusparseCbsrsm2_analysis`| |12.2| | |`hipsparseCbsrsm2_analysis`|4.5.0| | | | | | | | | | | |`cusparseCbsrsm2_bufferSize`| |12.2| | |`hipsparseCbsrsm2_bufferSize`|4.5.0| | | | | | | | | | | |`cusparseCbsrsm2_bufferSizeExt`| |12.2| | | | | | | | | | | | | | | -|`cusparseCbsrsm2_solve`| |12.2| | |`hipsparseCbsrsm2_solve`|4.5.0| | | | | | | | | | | +|`cusparseCbsrsm2_solve`| |12.2| | |`hipsparseCbsrsm2_solve`|4.5.0| | | | |`rocsparse_cbsrsm_solve`|4.5.0| | | | | |`cusparseCcsrmm`| |10.2| |11.0|`hipsparseCcsrmm`|3.1.0| | | | | | | | | | | |`cusparseCcsrmm2`| |10.2| |11.0|`hipsparseCcsrmm2`|3.1.0| | | | | | | | | | | |`cusparseCcsrsm2_analysis`|10.0|11.3| |12.0|`hipsparseCcsrsm2_analysis`|3.1.0| | | | | | | | | | | @@ -396,7 +396,7 @@ |`cusparseDbsrsm2_analysis`| |12.2| | |`hipsparseDbsrsm2_analysis`|4.5.0| | | | | | | | | | | |`cusparseDbsrsm2_bufferSize`| |12.2| | |`hipsparseDbsrsm2_bufferSize`|4.5.0| | | | | | | | | | | |`cusparseDbsrsm2_bufferSizeExt`| |12.2| | | | | | | | | | | | | | | -|`cusparseDbsrsm2_solve`| |12.2| | |`hipsparseDbsrsm2_solve`|4.5.0| | | | | | | | | | | +|`cusparseDbsrsm2_solve`| |12.2| | |`hipsparseDbsrsm2_solve`|4.5.0| | | | |`rocsparse_dbsrsm_solve`|4.5.0| | | | | |`cusparseDcsrmm`| |10.2| |11.0|`hipsparseDcsrmm`|1.9.2| | | | | | | | | | | |`cusparseDcsrmm2`| |10.2| |11.0|`hipsparseDcsrmm2`|1.9.2| | | | | | | | | | | |`cusparseDcsrsm2_analysis`|10.0|11.3| |12.0|`hipsparseDcsrsm2_analysis`|3.1.0| | | | | | | | | | | @@ -409,7 +409,7 @@ |`cusparseSbsrsm2_analysis`| |12.2| | |`hipsparseSbsrsm2_analysis`|4.5.0| | | | | | | | | | | |`cusparseSbsrsm2_bufferSize`| |12.2| | |`hipsparseSbsrsm2_bufferSize`|4.5.0| | | | | | | | | | | |`cusparseSbsrsm2_bufferSizeExt`| |12.2| | | | | | | | | | | | | | | -|`cusparseSbsrsm2_solve`| |12.2| | |`hipsparseSbsrsm2_solve`|4.5.0| | | | | | | | | | | +|`cusparseSbsrsm2_solve`| |12.2| | |`hipsparseSbsrsm2_solve`|4.5.0| | | | |`rocsparse_sbsrsm_solve`|4.5.0| | | | | |`cusparseScsrmm`| |10.2| |11.0|`hipsparseScsrmm`|1.9.2| | | | | | | | | | | |`cusparseScsrmm2`| |10.2| |11.0|`hipsparseScsrmm2`|1.9.2| | | | | | | | | | | |`cusparseScsrsm2_analysis`|10.0|11.3| |12.0|`hipsparseScsrsm2_analysis`|3.1.0| | | | | | | | | | | @@ -424,7 +424,7 @@ |`cusparseZbsrsm2_analysis`| |12.2| | |`hipsparseZbsrsm2_analysis`|4.5.0| | | | | | | | | | | |`cusparseZbsrsm2_bufferSize`| |12.2| | |`hipsparseZbsrsm2_bufferSize`|4.5.0| | | | | | | | | | | |`cusparseZbsrsm2_bufferSizeExt`| |12.2| | | | | | | | | | | | | | | -|`cusparseZbsrsm2_solve`| |12.2| | |`hipsparseZbsrsm2_solve`|4.5.0| | | | | | | | | | | +|`cusparseZbsrsm2_solve`| |12.2| | |`hipsparseZbsrsm2_solve`|4.5.0| | | | |`rocsparse_zbsrsm_solve`|4.5.0| | | | | |`cusparseZcsrmm`| |10.2| |11.0|`hipsparseZcsrmm`|3.1.0| | | | | | | | | | | |`cusparseZcsrmm2`| |10.2| |11.0|`hipsparseZcsrmm2`|3.1.0| | | | | | | | | | | |`cusparseZcsrsm2_analysis`|10.0|11.3| |12.0|`hipsparseZcsrsm2_analysis`|3.1.0| | | | | | | | | | | @@ -457,7 +457,7 @@ |`cusparseScsrgemm2`| |11.0| |12.0|`hipsparseScsrgemm2`|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| | | | | | | | | | | +|`cusparseXcsrgeamNnz`| |10.2| |11.0|`hipsparseXcsrgeamNnz`|3.5.0| | | | |`rocsparse_csrgeam_nnz`|3.5.0| | | | | |`cusparseXcsrgemm2Nnz`| |11.0| |12.0|`hipsparseXcsrgemm2Nnz`|2.8.0| | | | |`rocsparse_csrgemm_nnz`|2.8.0| | | | | |`cusparseXcsrgemmNnz`| |10.2| |11.0|`hipsparseXcsrgemmNnz`|2.8.0| | | | | | | | | | | |`cusparseZcsrgeam`| |10.2| |11.0|`hipsparseZcsrgeam`|3.5.0| | | | |`rocsparse_zcsrgeam`|3.5.0| | | | | diff --git a/docs/tables/CUSPARSE_API_supported_by_ROC.md b/docs/tables/CUSPARSE_API_supported_by_ROC.md index bd9e075c..be27b3a9 100644 --- a/docs/tables/CUSPARSE_API_supported_by_ROC.md +++ b/docs/tables/CUSPARSE_API_supported_by_ROC.md @@ -112,8 +112,8 @@ |`bsric02Info_t`| | | | |`rocsparse_mat_info`|1.9.0| | | | | |`bsrilu02Info`| |12.2| | |`_rocsparse_mat_info`|1.9.0| | | | | |`bsrilu02Info_t`| |12.2| | |`rocsparse_mat_info`|1.9.0| | | | | -|`bsrsm2Info`| |12.2| | | | | | | | | -|`bsrsm2Info_t`| |12.2| | | | | | | | | +|`bsrsm2Info`| |12.2| | |`_rocsparse_mat_info`|1.9.0| | | | | +|`bsrsm2Info_t`| |12.2| | |`rocsparse_mat_info`|1.9.0| | | | | |`bsrsv2Info`| |12.2| | | | | | | | | |`bsrsv2Info_t`| |12.2| | | | | | | | | |`csrgemm2Info`| | | |12.0|`_rocsparse_mat_info`|1.9.0| | | | | @@ -383,7 +383,7 @@ |`cusparseCbsrsm2_analysis`| |12.2| | | | | | | | | |`cusparseCbsrsm2_bufferSize`| |12.2| | | | | | | | | |`cusparseCbsrsm2_bufferSizeExt`| |12.2| | | | | | | | | -|`cusparseCbsrsm2_solve`| |12.2| | | | | | | | | +|`cusparseCbsrsm2_solve`| |12.2| | |`rocsparse_cbsrsm_solve`|4.5.0| | | | | |`cusparseCcsrmm`| |10.2| |11.0| | | | | | | |`cusparseCcsrmm2`| |10.2| |11.0| | | | | | | |`cusparseCcsrsm2_analysis`|10.0|11.3| |12.0| | | | | | | @@ -396,7 +396,7 @@ |`cusparseDbsrsm2_analysis`| |12.2| | | | | | | | | |`cusparseDbsrsm2_bufferSize`| |12.2| | | | | | | | | |`cusparseDbsrsm2_bufferSizeExt`| |12.2| | | | | | | | | -|`cusparseDbsrsm2_solve`| |12.2| | | | | | | | | +|`cusparseDbsrsm2_solve`| |12.2| | |`rocsparse_dbsrsm_solve`|4.5.0| | | | | |`cusparseDcsrmm`| |10.2| |11.0| | | | | | | |`cusparseDcsrmm2`| |10.2| |11.0| | | | | | | |`cusparseDcsrsm2_analysis`|10.0|11.3| |12.0| | | | | | | @@ -409,7 +409,7 @@ |`cusparseSbsrsm2_analysis`| |12.2| | | | | | | | | |`cusparseSbsrsm2_bufferSize`| |12.2| | | | | | | | | |`cusparseSbsrsm2_bufferSizeExt`| |12.2| | | | | | | | | -|`cusparseSbsrsm2_solve`| |12.2| | | | | | | | | +|`cusparseSbsrsm2_solve`| |12.2| | |`rocsparse_sbsrsm_solve`|4.5.0| | | | | |`cusparseScsrmm`| |10.2| |11.0| | | | | | | |`cusparseScsrmm2`| |10.2| |11.0| | | | | | | |`cusparseScsrsm2_analysis`|10.0|11.3| |12.0| | | | | | | @@ -424,7 +424,7 @@ |`cusparseZbsrsm2_analysis`| |12.2| | | | | | | | | |`cusparseZbsrsm2_bufferSize`| |12.2| | | | | | | | | |`cusparseZbsrsm2_bufferSizeExt`| |12.2| | | | | | | | | -|`cusparseZbsrsm2_solve`| |12.2| | | | | | | | | +|`cusparseZbsrsm2_solve`| |12.2| | |`rocsparse_zbsrsm_solve`|4.5.0| | | | | |`cusparseZcsrmm`| |10.2| |11.0| | | | | | | |`cusparseZcsrmm2`| |10.2| |11.0| | | | | | | |`cusparseZcsrsm2_analysis`|10.0|11.3| |12.0| | | | | | | @@ -457,7 +457,7 @@ |`cusparseScsrgemm2`| |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| | | | | | | +|`cusparseXcsrgeamNnz`| |10.2| |11.0|`rocsparse_csrgeam_nnz`|3.5.0| | | | | |`cusparseXcsrgemm2Nnz`| |11.0| |12.0|`rocsparse_csrgemm_nnz`|2.8.0| | | | | |`cusparseXcsrgemmNnz`| |10.2| |11.0| | | | | | | |`cusparseZcsrgeam`| |10.2| |11.0|`rocsparse_zcsrgeam`|3.5.0| | | | | diff --git a/src/CUDA2HIP_SPARSE_API_functions.cpp b/src/CUDA2HIP_SPARSE_API_functions.cpp index a06e72d0..7aadfeb3 100644 --- a/src/CUDA2HIP_SPARSE_API_functions.cpp +++ b/src/CUDA2HIP_SPARSE_API_functions.cpp @@ -273,12 +273,14 @@ const std::map CUDA_SPARSE_FUNCTION_MAP { {"cusparseCbsrsm2_analysis", {"hipsparseCbsrsm2_analysis", "", CONV_LIB_FUNC, API_SPARSE, 10, ROC_UNSUPPORTED | CUDA_DEPRECATED}}, {"cusparseZbsrsm2_analysis", {"hipsparseZbsrsm2_analysis", "", CONV_LIB_FUNC, API_SPARSE, 10, ROC_UNSUPPORTED | CUDA_DEPRECATED}}, - {"cusparseSbsrsm2_solve", {"hipsparseSbsrsm2_solve", "", CONV_LIB_FUNC, API_SPARSE, 10, ROC_UNSUPPORTED | CUDA_DEPRECATED}}, - {"cusparseDbsrsm2_solve", {"hipsparseDbsrsm2_solve", "", CONV_LIB_FUNC, API_SPARSE, 10, ROC_UNSUPPORTED | CUDA_DEPRECATED}}, - {"cusparseCbsrsm2_solve", {"hipsparseCbsrsm2_solve", "", CONV_LIB_FUNC, API_SPARSE, 10, ROC_UNSUPPORTED | CUDA_DEPRECATED}}, - {"cusparseZbsrsm2_solve", {"hipsparseZbsrsm2_solve", "", CONV_LIB_FUNC, API_SPARSE, 10, ROC_UNSUPPORTED | CUDA_DEPRECATED}}, + {"cusparseSbsrsm2_solve", {"hipsparseSbsrsm2_solve", "rocsparse_sbsrsm_solve", CONV_LIB_FUNC, API_SPARSE, 10, CUDA_DEPRECATED}}, + {"cusparseDbsrsm2_solve", {"hipsparseDbsrsm2_solve", "rocsparse_dbsrsm_solve", CONV_LIB_FUNC, API_SPARSE, 10, CUDA_DEPRECATED}}, + {"cusparseCbsrsm2_solve", {"hipsparseCbsrsm2_solve", "rocsparse_cbsrsm_solve", CONV_LIB_FUNC, API_SPARSE, 10, CUDA_DEPRECATED}}, + {"cusparseZbsrsm2_solve", {"hipsparseZbsrsm2_solve", "rocsparse_zbsrsm_solve", CONV_LIB_FUNC, API_SPARSE, 10, CUDA_DEPRECATED}}, {"cusparseXbsrsm2_zeroPivot", {"hipsparseXbsrsm2_zeroPivot", "", CONV_LIB_FUNC, API_SPARSE, 10, ROC_UNSUPPORTED | CUDA_DEPRECATED}}, + // NOTE: rocsparse_(s|d|c|z)gemmi have additional argument: rocsparse_mat_descr + // TODO: Add rocsparse_create_mat_descr() call before rocsparse_(s|d|c|z)gemmi call and rocsparse_destroy_mat_descr() after {"cusparseSgemmi", {"hipsparseSgemmi", "", CONV_LIB_FUNC, API_SPARSE, 10, ROC_UNSUPPORTED | CUDA_DEPRECATED | CUDA_REMOVED}}, {"cusparseDgemmi", {"hipsparseDgemmi", "", CONV_LIB_FUNC, API_SPARSE, 10, ROC_UNSUPPORTED | CUDA_DEPRECATED | CUDA_REMOVED}}, {"cusparseCgemmi", {"hipsparseCgemmi", "", CONV_LIB_FUNC, API_SPARSE, 10, ROC_UNSUPPORTED | CUDA_DEPRECATED | CUDA_REMOVED}}, @@ -289,7 +291,7 @@ const std::map CUDA_SPARSE_FUNCTION_MAP { {"cusparseDcsrgeam", {"hipsparseDcsrgeam", "rocsparse_dcsrgeam", CONV_LIB_FUNC, API_SPARSE, 11, CUDA_DEPRECATED | CUDA_REMOVED}}, {"cusparseCcsrgeam", {"hipsparseCcsrgeam", "rocsparse_ccsrgeam", CONV_LIB_FUNC, API_SPARSE, 11, CUDA_DEPRECATED | CUDA_REMOVED}}, {"cusparseZcsrgeam", {"hipsparseZcsrgeam", "rocsparse_zcsrgeam", CONV_LIB_FUNC, API_SPARSE, 11, CUDA_DEPRECATED | CUDA_REMOVED}}, - {"cusparseXcsrgeamNnz", {"hipsparseXcsrgeamNnz", "", CONV_LIB_FUNC, API_SPARSE, 11, ROC_UNSUPPORTED | CUDA_DEPRECATED | CUDA_REMOVED}}, + {"cusparseXcsrgeamNnz", {"hipsparseXcsrgeamNnz", "rocsparse_csrgeam_nnz", CONV_LIB_FUNC, API_SPARSE, 11, CUDA_DEPRECATED | CUDA_REMOVED}}, {"cusparseScsrgeam2", {"hipsparseScsrgeam2", "", CONV_LIB_FUNC, API_SPARSE, 11, ROC_UNSUPPORTED}}, {"cusparseDcsrgeam2", {"hipsparseDcsrgeam2", "", CONV_LIB_FUNC, API_SPARSE, 11, ROC_UNSUPPORTED}}, @@ -2273,6 +2275,11 @@ const std::map HIP_SPARSE_FUNCTION_VER_MAP { {"rocsparse_ccsrgeam", {HIP_3050, HIP_0, HIP_0 }}, {"rocsparse_dcsrgeam", {HIP_3050, HIP_0, HIP_0 }}, {"rocsparse_scsrgeam", {HIP_3050, HIP_0, HIP_0 }}, + {"rocsparse_csrgeam_nnz", {HIP_3050, HIP_0, HIP_0 }}, + {"rocsparse_zbsrsm_solve", {HIP_4050, HIP_0, HIP_0 }}, + {"rocsparse_cbsrsm_solve", {HIP_4050, HIP_0, HIP_0 }}, + {"rocsparse_dbsrsm_solve", {HIP_4050, HIP_0, HIP_0 }}, + {"rocsparse_sbsrsm_solve", {HIP_4050, HIP_0, HIP_0 }}, }; const std::map CUDA_SPARSE_FUNCTION_CHANGED_VER_MAP { diff --git a/src/CUDA2HIP_SPARSE_API_types.cpp b/src/CUDA2HIP_SPARSE_API_types.cpp index 86eb42d8..43ba7e7f 100644 --- a/src/CUDA2HIP_SPARSE_API_types.cpp +++ b/src/CUDA2HIP_SPARSE_API_types.cpp @@ -47,8 +47,8 @@ const std::map CUDA_SPARSE_TYPE_NAME_MAP { {"bsrsv2Info", {"bsrsv2Info", "", CONV_TYPE, API_SPARSE, 4, ROC_UNSUPPORTED | CUDA_DEPRECATED}}, {"bsrsv2Info_t", {"bsrsv2Info_t", "", CONV_TYPE, API_SPARSE, 4, ROC_UNSUPPORTED | CUDA_DEPRECATED}}, - {"bsrsm2Info", {"bsrsm2Info", "", CONV_TYPE, API_SPARSE, 4, ROC_UNSUPPORTED | CUDA_DEPRECATED}}, - {"bsrsm2Info_t", {"bsrsm2Info_t", "", CONV_TYPE, API_SPARSE, 4, ROC_UNSUPPORTED | CUDA_DEPRECATED}}, + {"bsrsm2Info", {"bsrsm2Info", "_rocsparse_mat_info", CONV_TYPE, API_SPARSE, 4, CUDA_DEPRECATED}}, + {"bsrsm2Info_t", {"bsrsm2Info_t", "rocsparse_mat_info", CONV_TYPE, API_SPARSE, 4, CUDA_DEPRECATED}}, {"bsric02Info", {"bsric02Info", "_rocsparse_mat_info", CONV_TYPE, API_SPARSE, 4, CUDA_DEPRECATED}}, {"bsric02Info_t", {"bsric02Info_t", "rocsparse_mat_info", CONV_TYPE, API_SPARSE, 4, CUDA_DEPRECATED}}, diff --git a/tests/unit_tests/synthetic/libraries/cusparse2hipsparse.cu b/tests/unit_tests/synthetic/libraries/cusparse2hipsparse.cu index a99c8412..f5b2f60b 100644 --- a/tests/unit_tests/synthetic/libraries/cusparse2hipsparse.cu +++ b/tests/unit_tests/synthetic/libraries/cusparse2hipsparse.cu @@ -127,11 +127,13 @@ int main() { int nnzb = 0; int nnzc = 0; int nnzd = 0; + int nrhs = 0; int nnzPerRow = 0; int nnzPerCol = 0; int innz = 0; int lda = 0; int ldb = 0; + int ldx = 0; int blockDim = 0; int csrSortedRowPtr = 0; int csrSortedColInd = 0; @@ -287,12 +289,13 @@ int main() { csric02Info_t csric02_info; bsrilu02Info_t bsrilu02_info; bsric02Info_t bsric02_info; + bsrsm2Info_t bsrsm2_info; - // CHECK: hipDoubleComplex dcomplex, dcomplexA, dcomplexB, dComplexbsrSortedValA, dComplexbsrSortedValC, dComplexcsrSortedValA, dComplexcsrSortedValB, dComplexcsrSortedValC, dcomplextol, dComplexbsrSortedVal, dComplexbscVal, dComplexcscSortedVal, dcomplexds, dcomplexdl, dcomplexd, dcomplexdu, dcomplexdw, dcomplexx, dcomplex_boost_val; - cuDoubleComplex dcomplex, dcomplexA, dcomplexB, dComplexbsrSortedValA, dComplexbsrSortedValC, dComplexcsrSortedValA, dComplexcsrSortedValB, dComplexcsrSortedValC, dcomplextol, dComplexbsrSortedVal, dComplexbscVal, dComplexcscSortedVal, dcomplexds, dcomplexdl, dcomplexd, dcomplexdu, dcomplexdw, dcomplexx, dcomplex_boost_val; + // CHECK: hipDoubleComplex dcomplex, dcomplexA, dcomplexB, dcomplexX, dComplexbsrSortedValA, dComplexbsrSortedValC, dComplexcsrSortedValA, dComplexcsrSortedValB, dComplexcsrSortedValC, dcomplextol, dComplexbsrSortedVal, dComplexbscVal, dComplexcscSortedVal, dcomplexds, dcomplexdl, dcomplexd, dcomplexdu, dcomplexdw, dcomplexx, dcomplex_boost_val; + cuDoubleComplex dcomplex, dcomplexA, dcomplexB, dcomplexX, dComplexbsrSortedValA, dComplexbsrSortedValC, dComplexcsrSortedValA, dComplexcsrSortedValB, dComplexcsrSortedValC, dcomplextol, dComplexbsrSortedVal, dComplexbscVal, dComplexcscSortedVal, dcomplexds, dcomplexdl, dcomplexd, dcomplexdu, dcomplexdw, dcomplexx, dcomplex_boost_val; - // CHECK: hipComplex complex, complexA, complexB, complexbsrValA, complexbsrSortedValC, complexcsrSortedValA, complexcsrSortedValB, complexcsrSortedValC, complextol, complexbsrSortedVal, complexbscVal, complexcscSortedVal, complexds, complexdl, complexd, complexdu, complexdw, complexx, complex_boost_val; - cuComplex complex, complexA, complexB, complexbsrValA, complexbsrSortedValC, complexcsrSortedValA, complexcsrSortedValB, complexcsrSortedValC, complextol, complexbsrSortedVal, complexbscVal, complexcscSortedVal, complexds, complexdl, complexd, complexdu, complexdw, complexx, complex_boost_val; + // CHECK: hipComplex complex, complexA, complexB, complexX, complexbsrValA, complexbsrSortedValC, complexcsrSortedValA, complexcsrSortedValB, complexcsrSortedValC, complextol, complexbsrSortedVal, complexbscVal, complexcscSortedVal, complexds, complexdl, complexd, complexdu, complexdw, complexx, complex_boost_val; + cuComplex complex, complexA, complexB, complexX, complexbsrValA, complexbsrSortedValC, complexcsrSortedValA, complexcsrSortedValB, complexcsrSortedValC, complextol, complexbsrSortedVal, complexbscVal, complexcscSortedVal, complexds, complexdl, complexd, complexdu, complexdw, complexx, complex_boost_val; // CHECK: hipsparseOperation_t opA, opB, opX; cusparseOperation_t opA, opB, opX; @@ -1017,6 +1020,26 @@ int main() { // CHECK: status_t = hipsparseXbsric02_zeroPivot(handle_t, bsric02_info, &iposition); status_t = cusparseXbsric02_zeroPivot(handle_t, bsric02_info, &iposition); + // CUDA: CUSPARSE_DEPRECATED cusparseStatus_t CUSPARSEAPI cusparseZbsrsm2_solve(cusparseHandle_t handle, cusparseDirection_t dirA, cusparseOperation_t transA, cusparseOperation_t transXY, int mb, int n, int nnzb, const cuDoubleComplex* alpha, const cusparseMatDescr_t descrA, const cuDoubleComplex* bsrSortedVal, const int* bsrSortedRowPtr, const int* bsrSortedColInd, int blockSize, bsrsm2Info_t info, const cuDoubleComplex* B, int ldb, cuDoubleComplex* X, int ldx, cusparseSolvePolicy_t policy, void* pBuffer); + // HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseZbsrsm2_solve(hipsparseHandle_t handle, hipsparseDirection_t dirA, hipsparseOperation_t transA, hipsparseOperation_t transX, int mb, int nrhs, int nnzb, const hipDoubleComplex* alpha, const hipsparseMatDescr_t descrA, const hipDoubleComplex* bsrSortedValA, const int* bsrSortedRowPtrA, const int* bsrSortedColIndA, int blockDim, bsrsm2Info_t info, const hipDoubleComplex* B, int ldb, hipDoubleComplex* X, int ldx, hipsparseSolvePolicy_t policy, void* pBuffer); + // CHECK: status_t = hipsparseZbsrsm2_solve(handle_t, direction_t, opA, opX, mb, nrhs, nnzb, &dcomplexA, matDescr_A, &dComplexbsrSortedValA, &bsrRowPtrA, &bsrColIndA, blockDim, bsrsm2_info, &dcomplexB, ldb, &dcomplexX, ldx, solvePolicy_t, pBuffer); + status_t = cusparseZbsrsm2_solve(handle_t, direction_t, opA, opX, mb, nrhs, nnzb, &dcomplexA, matDescr_A, &dComplexbsrSortedValA, &bsrRowPtrA, &bsrColIndA, blockDim, bsrsm2_info, &dcomplexB, ldb, &dcomplexX, ldx, solvePolicy_t, pBuffer); + + // CUDA: CUSPARSE_DEPRECATED cusparseStatus_t CUSPARSEAPI cusparseCbsrsm2_solve(cusparseHandle_t handle, cusparseDirection_t dirA, cusparseOperation_t transA, cusparseOperation_t transXY, int mb, int n, int nnzb, const cuComplex* alpha, const cusparseMatDescr_t descrA, const cuComplex* bsrSortedVal, const int* bsrSortedRowPtr, const int* bsrSortedColInd, int blockSize, bsrsm2Info_t info, const cuComplex* B, int ldb, cuComplex* X, int ldx, cusparseSolvePolicy_t policy, void* pBuffer); + // HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseCbsrsm2_solve(hipsparseHandle_t handle, hipsparseDirection_t dirA, hipsparseOperation_t transA, hipsparseOperation_t transX, int mb, int nrhs, int nnzb, const hipComplex* alpha, const hipsparseMatDescr_t descrA, const hipComplex* bsrSortedValA, const int* bsrSortedRowPtrA, const int* bsrSortedColIndA, int blockDim, bsrsm2Info_t info, const hipComplex* B, int ldb, hipComplex* X, int ldx, hipsparseSolvePolicy_t policy, void* pBuffer); + // CHECK: status_t = hipsparseCbsrsm2_solve(handle_t, direction_t, opA, opX, mb, nrhs, nnzb, &complexA, matDescr_A, &complexbsrValA, &bsrRowPtrA, &bsrColIndA, blockDim, bsrsm2_info, &complexB, ldb, &complexX, ldx, solvePolicy_t, pBuffer); + status_t = cusparseCbsrsm2_solve(handle_t, direction_t, opA, opX, mb, nrhs, nnzb, &complexA, matDescr_A, &complexbsrValA, &bsrRowPtrA, &bsrColIndA, blockDim, bsrsm2_info, &complexB, ldb, &complexX, ldx, solvePolicy_t, pBuffer); + + // CUDA: CUSPARSE_DEPRECATED cusparseStatus_t CUSPARSEAPI cusparseDbsrsm2_solve(cusparseHandle_t handle, cusparseDirection_t dirA, cusparseOperation_t transA, cusparseOperation_t transXY, int mb, int n, int nnzb, const double* alpha, const cusparseMatDescr_t descrA, const double* bsrSortedVal, const int* bsrSortedRowPtr, const int* bsrSortedColInd, int blockSize, bsrsm2Info_t info, const double* B, int ldb, double* X, int ldx, cusparseSolvePolicy_t policy, void* pBuffer); + // HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseDbsrsm2_solve(hipsparseHandle_t handle, hipsparseDirection_t dirA, hipsparseOperation_t transA, hipsparseOperation_t transX, int mb, int nrhs, int nnzb, const double* alpha, const hipsparseMatDescr_t descrA, const double* bsrSortedValA, const int* bsrSortedRowPtrA, const int* bsrSortedColIndA, int blockDim, bsrsm2Info_t info, const double* B, int ldb, double* X, int ldx, hipsparseSolvePolicy_t policy, void* pBuffer); + // CHECK: status_t = hipsparseDbsrsm2_solve(handle_t, direction_t, opA, opX, mb, nrhs, nnzb, &dA, matDescr_A, &dbsrSortedVal, &bsrRowPtrA, &bsrColIndA, blockDim, bsrsm2_info, &dB, ldb, &dx, ldx, solvePolicy_t, pBuffer); + status_t = cusparseDbsrsm2_solve(handle_t, direction_t, opA, opX, mb, nrhs, nnzb, &dA, matDescr_A, &dbsrSortedVal, &bsrRowPtrA, &bsrColIndA, blockDim, bsrsm2_info, &dB, ldb, &dx, ldx, solvePolicy_t, pBuffer); + + // CUDA: CUSPARSE_DEPRECATED cusparseStatus_t CUSPARSEAPI cusparseSbsrsm2_solve(cusparseHandle_t handle, cusparseDirection_t dirA, cusparseOperation_t transA, cusparseOperation_t transXY, int mb, int n, int nnzb, const float* alpha, const cusparseMatDescr_t descrA, const float* bsrSortedVal, const int* bsrSortedRowPtr, const int* bsrSortedColInd, int blockSize, bsrsm2Info_t info, const float* B, int ldb, float* X, int ldx, cusparseSolvePolicy_t policy, void* pBuffer); + // HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseSbsrsm2_solve(hipsparseHandle_t handle, hipsparseDirection_t dirA, hipsparseOperation_t transA, hipsparseOperation_t transX, int mb, int nrhs, int nnzb, const float* alpha, const hipsparseMatDescr_t descrA, const float* bsrSortedValA, const int* bsrSortedRowPtrA, const int* bsrSortedColIndA, int blockDim, bsrsm2Info_t info, const float* B, int ldb, float* X, int ldx, hipsparseSolvePolicy_t policy, void* pBuffer); + // CHECK: status_t = hipsparseSbsrsm2_solve(handle_t, direction_t, opA, opX, mb, nrhs, nnzb, &fA, matDescr_A, &fbsrSortedVal, &bsrRowPtrA, &bsrColIndA, blockDim, bsrsm2_info, &fB, ldb, &fx, ldx, solvePolicy_t, pBuffer); + status_t = cusparseSbsrsm2_solve(handle_t, direction_t, opA, opX, mb, nrhs, nnzb, &fA, matDescr_A, &fbsrSortedVal, &bsrRowPtrA, &bsrColIndA, blockDim, bsrsm2_info, &fB, ldb, &fx, ldx, solvePolicy_t, pBuffer); + #if CUDA_VERSION >= 8000 // CHECK: hipDataType dataType_t; // CHECK-NEXT: hipDataType dataType; @@ -1776,6 +1799,11 @@ int main() { // HIP: DEPRECATED_CUDA_10000("The routine will be removed in CUDA 11") HIPSPARSE_EXPORT hipsparseStatus_t hipsparseScsrgeam(hipsparseHandle_t handle, int m, int n, const float* alpha, const hipsparseMatDescr_t descrA, int nnzA, const float* csrValA, const int* csrRowPtrA, const int* csrColIndA, const float* beta, const hipsparseMatDescr_t descrB, int nnzB, const float* csrValB, const int* csrRowPtrB, const int* csrColIndB, const hipsparseMatDescr_t descrC, float* csrValC, int* csrRowPtrC, int* csrColIndC); // CHECK: status_t = hipsparseScsrgeam(handle_t, m, n, &fA, matDescr_A, nnza, &csrSortedValA, &csrRowPtrA, &csrColIndA, &fB, matDescr_B, nnzb, &csrSortedValB, &csrRowPtrB, &csrColIndB, matDescr_C, &csrSortedValC, &csrRowPtrC, &csrColIndC); status_t = cusparseScsrgeam(handle_t, m, n, &fA, matDescr_A, nnza, &csrSortedValA, &csrRowPtrA, &csrColIndA, &fB, matDescr_B, nnzb, &csrSortedValB, &csrRowPtrB, &csrColIndB, matDescr_C, &csrSortedValC, &csrRowPtrC, &csrColIndC); + + // CUDA: CUSPARSE_DEPRECATED_HINT(cusparseXcsrgeam2) cusparseStatus_t CUSPARSEAPI cusparseXcsrgeamNnz(cusparseHandle_t handle, int m, int n, 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 descrC, int* csrSortedRowPtrC, int* nnzTotalDevHostPtr); + // HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseXcsrgeamNnz(hipsparseHandle_t handle, int m, int n, 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 descrC, int* csrRowPtrC, int* nnzTotalDevHostPtr); + // CHECK: status_t = hipsparseXcsrgeamNnz(handle_t, m, n, matDescr_A, nnza, &csrRowPtrA, &csrColIndA, matDescr_B, nnzb, &csrRowPtrB, &csrColIndB, matDescr_C, &csrRowPtrC, &nnzTotalDevHostPtr); + status_t = cusparseXcsrgeamNnz(handle_t, m, n, matDescr_A, nnza, &csrRowPtrA, &csrColIndA, matDescr_B, nnzb, &csrRowPtrB, &csrColIndB, matDescr_C, &csrRowPtrC, &nnzTotalDevHostPtr); #endif #if CUDA_VERSION >= 11000 diff --git a/tests/unit_tests/synthetic/libraries/cusparse2rocsparse.cu b/tests/unit_tests/synthetic/libraries/cusparse2rocsparse.cu index a25af4af..c2ae4323 100644 --- a/tests/unit_tests/synthetic/libraries/cusparse2rocsparse.cu +++ b/tests/unit_tests/synthetic/libraries/cusparse2rocsparse.cu @@ -127,11 +127,13 @@ int main() { int nnzb = 0; int nnzc = 0; int nnzd = 0; + int nrhs = 0; int nnzPerRow = 0; int nnzPerCol = 0; int innz = 0; int lda = 0; int ldb = 0; + int ldx = 0; int blockDim = 0; int csrSortedRowPtr = 0; int csrSortedColInd = 0; @@ -276,18 +278,21 @@ int main() { // CHECK: rocsparse_mat_info bsric02_info; bsric02Info_t bsric02_info; + // CHECK: rocsparse_mat_info bsrsm2_info; + bsrsm2Info_t bsrsm2_info; + // TODO: should be rocsparse_double_complex // TODO: add to TypeOverloads cuDoubleComplex -> rocsparse_double_complex under a new option --sparse - // CHECK: rocblas_double_complex dcomplex, dcomplexA, dcomplexB, dComplexbsrSortedValA, dComplexbsrSortedValC, dComplexcsrSortedValA, dComplexcsrSortedValB, dComplexcsrSortedValC, dcomplextol, dComplexbsrSortedVal, dComplexbscVal, dComplexcscSortedVal, dcomplexds, dcomplexdl, dcomplexd, dcomplexdu, dcomplexdw, dcomplexx, dcomplex_boost_val; - cuDoubleComplex dcomplex, dcomplexA, dcomplexB, dComplexbsrSortedValA, dComplexbsrSortedValC, dComplexcsrSortedValA, dComplexcsrSortedValB, dComplexcsrSortedValC, dcomplextol, dComplexbsrSortedVal, dComplexbscVal, dComplexcscSortedVal, dcomplexds, dcomplexdl, dcomplexd, dcomplexdu, dcomplexdw, dcomplexx, dcomplex_boost_val; + // CHECK: rocblas_double_complex dcomplex, dcomplexA, dcomplexB, dcomplexX, dComplexbsrSortedValA, dComplexbsrSortedValC, dComplexcsrSortedValA, dComplexcsrSortedValB, dComplexcsrSortedValC, dcomplextol, dComplexbsrSortedVal, dComplexbscVal, dComplexcscSortedVal, dcomplexds, dcomplexdl, dcomplexd, dcomplexdu, dcomplexdw, dcomplexx, dcomplex_boost_val; + cuDoubleComplex dcomplex, dcomplexA, dcomplexB, dcomplexX, dComplexbsrSortedValA, dComplexbsrSortedValC, dComplexcsrSortedValA, dComplexcsrSortedValB, dComplexcsrSortedValC, dcomplextol, dComplexbsrSortedVal, dComplexbscVal, dComplexcscSortedVal, dcomplexds, dcomplexdl, dcomplexd, dcomplexdu, dcomplexdw, dcomplexx, dcomplex_boost_val; // TODO: should be rocsparse_double_complex // TODO: add to TypeOverloads cuComplex -> rocsparse_float_complex under a new option --sparse - // CHECK: rocblas_float_complex complex, complexA, complexB, complexbsrValA, complexbsrSortedValC, complexcsrSortedValA, complexcsrSortedValB, complexcsrSortedValC, complextol, complexbsrSortedVal, complexbscVal, complexcscSortedVal, complexds, complexdl, complexd, complexdu, complexdw, complexx, complex_boost_val; - cuComplex complex, complexA, complexB, complexbsrValA, complexbsrSortedValC, complexcsrSortedValA, complexcsrSortedValB, complexcsrSortedValC, complextol, complexbsrSortedVal, complexbscVal, complexcscSortedVal, complexds, complexdl, complexd, complexdu, complexdw, complexx, complex_boost_val; + // CHECK: rocblas_float_complex complex, complexA, complexB, complexX, complexbsrValA, complexbsrSortedValC, complexcsrSortedValA, complexcsrSortedValB, complexcsrSortedValC, complextol, complexbsrSortedVal, complexbscVal, complexcscSortedVal, complexds, complexdl, complexd, complexdu, complexdw, complexx, complex_boost_val; + cuComplex complex, complexA, complexB, complexX, complexbsrValA, complexbsrSortedValC, complexcsrSortedValA, complexcsrSortedValB, complexcsrSortedValC, complextol, complexbsrSortedVal, complexbscVal, complexcscSortedVal, complexds, complexdl, complexd, complexdu, complexdw, complexx, complex_boost_val; - // CHECK: rocsparse_operation opA, opB; - cusparseOperation_t opA, opB; + // CHECK: rocsparse_operation opA, opB, opX; + cusparseOperation_t opA, opB, opX; // CUDA: cusparseStatus_t CUSPARSEAPI cusparseCreate(cusparseHandle_t* handle); // ROC: ROCSPARSE_EXPORT rocsparse_status rocsparse_create_handle(rocsparse_handle* handle); @@ -1009,6 +1014,26 @@ int main() { // CHECK: status_t = rocsparse_bsric0_zero_pivot(handle_t, bsric02_info, &iposition); status_t = cusparseXbsric02_zeroPivot(handle_t, bsric02_info, &iposition); + // CUDA: CUSPARSE_DEPRECATED cusparseStatus_t CUSPARSEAPI cusparseZbsrsm2_solve(cusparseHandle_t handle, cusparseDirection_t dirA, cusparseOperation_t transA, cusparseOperation_t transXY, int mb, int n, int nnzb, const cuDoubleComplex* alpha, const cusparseMatDescr_t descrA, const cuDoubleComplex* bsrSortedVal, const int* bsrSortedRowPtr, const int* bsrSortedColInd, int blockSize, bsrsm2Info_t info, const cuDoubleComplex* B, int ldb, cuDoubleComplex* X, int ldx, cusparseSolvePolicy_t policy, void* pBuffer); + // ROC: ROCSPARSE_EXPORT rocsparse_status rocsparse_zbsrsm_solve(rocsparse_handle handle, rocsparse_direction dir, rocsparse_operation trans_A, rocsparse_operation trans_X, rocsparse_int mb, rocsparse_int nrhs, 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, rocsparse_mat_info info, const rocsparse_double_complex* B, rocsparse_int ldb, rocsparse_double_complex* X, rocsparse_int ldx, rocsparse_solve_policy policy, void* temp_buffer); + // CHECK: status_t = rocsparse_zbsrsm_solve(handle_t, direction_t, opA, opX, mb, nrhs, nnzb, &dcomplexA, matDescr_A, &dComplexbsrSortedValA, &bsrRowPtrA, &bsrColIndA, blockDim, bsrsm2_info, &dcomplexB, ldb, &dcomplexX, ldx, solvePolicy_t, pBuffer); + status_t = cusparseZbsrsm2_solve(handle_t, direction_t, opA, opX, mb, nrhs, nnzb, &dcomplexA, matDescr_A, &dComplexbsrSortedValA, &bsrRowPtrA, &bsrColIndA, blockDim, bsrsm2_info, &dcomplexB, ldb, &dcomplexX, ldx, solvePolicy_t, pBuffer); + + // CUDA: CUSPARSE_DEPRECATED cusparseStatus_t CUSPARSEAPI cusparseCbsrsm2_solve(cusparseHandle_t handle, cusparseDirection_t dirA, cusparseOperation_t transA, cusparseOperation_t transXY, int mb, int n, int nnzb, const cuComplex* alpha, const cusparseMatDescr_t descrA, const cuComplex* bsrSortedVal, const int* bsrSortedRowPtr, const int* bsrSortedColInd, int blockSize, bsrsm2Info_t info, const cuComplex* B, int ldb, cuComplex* X, int ldx, cusparseSolvePolicy_t policy, void* pBuffer); + // ROC: ROCSPARSE_EXPORT rocsparse_status rocsparse_cbsrsm_solve(rocsparse_handle handle, rocsparse_direction dir, rocsparse_operation trans_A, rocsparse_operation trans_X, rocsparse_int mb, rocsparse_int nrhs, 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, rocsparse_mat_info info, const rocsparse_float_complex* B, rocsparse_int ldb, rocsparse_float_complex* X, rocsparse_int ldx, rocsparse_solve_policy policy, void* temp_buffer); + // CHECK: status_t = rocsparse_cbsrsm_solve(handle_t, direction_t, opA, opX, mb, nrhs, nnzb, &complexA, matDescr_A, &complexbsrValA, &bsrRowPtrA, &bsrColIndA, blockDim, bsrsm2_info, &complexB, ldb, &complexX, ldx, solvePolicy_t, pBuffer); + status_t = cusparseCbsrsm2_solve(handle_t, direction_t, opA, opX, mb, nrhs, nnzb, &complexA, matDescr_A, &complexbsrValA, &bsrRowPtrA, &bsrColIndA, blockDim, bsrsm2_info, &complexB, ldb, &complexX, ldx, solvePolicy_t, pBuffer); + + // CUDA: CUSPARSE_DEPRECATED cusparseStatus_t CUSPARSEAPI cusparseDbsrsm2_solve(cusparseHandle_t handle, cusparseDirection_t dirA, cusparseOperation_t transA, cusparseOperation_t transXY, int mb, int n, int nnzb, const double* alpha, const cusparseMatDescr_t descrA, const double* bsrSortedVal, const int* bsrSortedRowPtr, const int* bsrSortedColInd, int blockSize, bsrsm2Info_t info, const double* B, int ldb, double* X, int ldx, cusparseSolvePolicy_t policy, void* pBuffer); + // ROC: ROCSPARSE_EXPORT rocsparse_status rocsparse_dbsrsm_solve(rocsparse_handle handle, rocsparse_direction dir, rocsparse_operation trans_A, rocsparse_operation trans_X, rocsparse_int mb, rocsparse_int nrhs, 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, rocsparse_mat_info info, const double* B, rocsparse_int ldb, double* X, rocsparse_int ldx, rocsparse_solve_policy policy, void* temp_buffer); + // CHECK: status_t = rocsparse_dbsrsm_solve(handle_t, direction_t, opA, opX, mb, nrhs, nnzb, &dA, matDescr_A, &dbsrSortedVal, &bsrRowPtrA, &bsrColIndA, blockDim, bsrsm2_info, &dB, ldb, &dx, ldx, solvePolicy_t, pBuffer); + status_t = cusparseDbsrsm2_solve(handle_t, direction_t, opA, opX, mb, nrhs, nnzb, &dA, matDescr_A, &dbsrSortedVal, &bsrRowPtrA, &bsrColIndA, blockDim, bsrsm2_info, &dB, ldb, &dx, ldx, solvePolicy_t, pBuffer); + + // CUDA: CUSPARSE_DEPRECATED cusparseStatus_t CUSPARSEAPI cusparseSbsrsm2_solve(cusparseHandle_t handle, cusparseDirection_t dirA, cusparseOperation_t transA, cusparseOperation_t transXY, int mb, int n, int nnzb, const float* alpha, const cusparseMatDescr_t descrA, const float* bsrSortedVal, const int* bsrSortedRowPtr, const int* bsrSortedColInd, int blockSize, bsrsm2Info_t info, const float* B, int ldb, float* X, int ldx, cusparseSolvePolicy_t policy, void* pBuffer); + // ROC: ROCSPARSE_EXPORT rocsparse_status rocsparse_sbsrsm_solve(rocsparse_handle handle, rocsparse_direction dir, rocsparse_operation trans_A, rocsparse_operation trans_X, rocsparse_int mb,rocsparse_int nrhs, 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, rocsparse_mat_info info, const float* B, rocsparse_int ldb, float* X, rocsparse_int ldx, rocsparse_solve_policy policy, void* temp_buffer); + // CHECK: status_t = rocsparse_sbsrsm_solve(handle_t, direction_t, opA, opX, mb, nrhs, nnzb, &fA, matDescr_A, &fbsrSortedVal, &bsrRowPtrA, &bsrColIndA, blockDim, bsrsm2_info, &fB, ldb, &fx, ldx, solvePolicy_t, pBuffer); + status_t = cusparseSbsrsm2_solve(handle_t, direction_t, opA, opX, mb, nrhs, nnzb, &fA, matDescr_A, &fbsrSortedVal, &bsrRowPtrA, &bsrColIndA, blockDim, bsrsm2_info, &fB, ldb, &fx, ldx, solvePolicy_t, pBuffer); + #if CUDA_VERSION >= 8000 // CHECK: hipDataType dataType_t; // TODO: [#899] There should be rocsparse_datatype @@ -1565,6 +1590,11 @@ int main() { // ROC: ROCSPARSE_EXPORT rocsparse_status rocsparse_scsrgeam(rocsparse_handle handle, rocsparse_int m, rocsparse_int n, const float* alpha, const rocsparse_mat_descr descr_A, rocsparse_int nnz_A, const float* csr_val_A, const rocsparse_int* csr_row_ptr_A, const rocsparse_int* csr_col_ind_A, const float* beta, const rocsparse_mat_descr descr_B, rocsparse_int nnz_B, const float* csr_val_B, const rocsparse_int* csr_row_ptr_B, const rocsparse_int* csr_col_ind_B, const rocsparse_mat_descr descr_C, float* csr_val_C, const rocsparse_int* csr_row_ptr_C, rocsparse_int* csr_col_ind_C); // CHECK: status_t = rocsparse_scsrgeam(handle_t, m, n, &fA, matDescr_A, nnza, &csrSortedValA, &csrRowPtrA, &csrColIndA, &fB, matDescr_B, nnzb, &csrSortedValB, &csrRowPtrB, &csrColIndB, matDescr_C, &csrSortedValC, &csrRowPtrC, &csrColIndC); status_t = cusparseScsrgeam(handle_t, m, n, &fA, matDescr_A, nnza, &csrSortedValA, &csrRowPtrA, &csrColIndA, &fB, matDescr_B, nnzb, &csrSortedValB, &csrRowPtrB, &csrColIndB, matDescr_C, &csrSortedValC, &csrRowPtrC, &csrColIndC); + + // CUDA: CUSPARSE_DEPRECATED_HINT(cusparseXcsrgeam2) cusparseStatus_t CUSPARSEAPI cusparseXcsrgeamNnz(cusparseHandle_t handle, int m, int n, 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 descrC, int* csrSortedRowPtrC, int* nnzTotalDevHostPtr); + // ROC: ROCSPARSE_EXPORT rocsparse_status rocsparse_csrgeam_nnz(rocsparse_handle handle, rocsparse_int m, rocsparse_int n, const rocsparse_mat_descr descr_A, rocsparse_int nnz_A, const rocsparse_int* csr_row_ptr_A, const rocsparse_int* csr_col_ind_A, const rocsparse_mat_descr descr_B, rocsparse_int nnz_B, const rocsparse_int* csr_row_ptr_B, const rocsparse_int* csr_col_ind_B, const rocsparse_mat_descr descr_C, rocsparse_int* csr_row_ptr_C, rocsparse_int* nnz_C); + // CHECK: status_t = rocsparse_csrgeam_nnz(handle_t, m, n, matDescr_A, nnza, &csrRowPtrA, &csrColIndA, matDescr_B, nnzb, &csrRowPtrB, &csrColIndB, matDescr_C, &csrRowPtrC, &nnzTotalDevHostPtr); + status_t = cusparseXcsrgeamNnz(handle_t, m, n, matDescr_A, nnza, &csrRowPtrA, &csrColIndA, matDescr_B, nnzb, &csrRowPtrB, &csrColIndB, matDescr_C, &csrRowPtrC, &nnzTotalDevHostPtr); #endif #if CUDA_VERSION >= 11000