From 0e7de3a4f48222d3dd9e1f918b84c450a29b3195 Mon Sep 17 00:00:00 2001 From: Evgeny Mankov Date: Mon, 18 Sep 2023 21:37:36 +0200 Subject: [PATCH] [HIPIFY][#674][rocSPARSE][feature] rocSPARSE support - Step 42 - functions + Updated synthetic tests and the regenerated hipify-perl and SPARSE docs --- bin/hipify-perl | 10 ++++ .../CUSPARSE_API_supported_by_HIP_and_ROC.md | 20 ++++---- docs/tables/CUSPARSE_API_supported_by_ROC.md | 20 ++++---- src/CUDA2HIP_SPARSE_API_functions.cpp | 24 ++++++--- src/CUDA2HIP_SPARSE_API_types.cpp | 4 +- .../synthetic/libraries/cusparse2hipsparse.cu | 48 +++++++++++++++++- .../synthetic/libraries/cusparse2rocsparse.cu | 50 ++++++++++++++++++- 7 files changed, 142 insertions(+), 34 deletions(-) diff --git a/bin/hipify-perl b/bin/hipify-perl index 9cf91837..bc1a0e42 100755 --- a/bin/hipify-perl +++ b/bin/hipify-perl @@ -1682,9 +1682,11 @@ sub rocSubstitutions { subst("cusparseCcsr2gebsr_bufferSize", "rocsparse_ccsr2gebsr_buffer_size", "library"); subst("cusparseCcsr2hyb", "rocsparse_ccsr2hyb", "library"); subst("cusparseCcsrcolor", "rocsparse_ccsrcolor", "library"); + subst("cusparseCcsric02", "rocsparse_ccsric0", "library"); subst("cusparseCcsrilu02", "rocsparse_ccsrilu0", "library"); subst("cusparseCcsrilu02_analysis", "rocsparse_ccsrilu0_analysis", "library"); subst("cusparseCcsrilu02_bufferSize", "rocsparse_ccsrilu0_buffer_size", "library"); + subst("cusparseCcsrilu02_numericBoost", "rocsparse_dccsrilu0_numeric_boost", "library"); subst("cusparseCdense2csc", "rocsparse_cdense2csc", "library"); subst("cusparseCdense2csr", "rocsparse_cdense2csr", "library"); subst("cusparseCgebsr2csr", "rocsparse_cgebsr2csr", "library"); @@ -1735,9 +1737,11 @@ sub rocSubstitutions { subst("cusparseDcsr2gebsr_bufferSize", "rocsparse_dcsr2gebsr_buffer_size", "library"); subst("cusparseDcsr2hyb", "rocsparse_dcsr2hyb", "library"); subst("cusparseDcsrcolor", "rocsparse_dcsrcolor", "library"); + subst("cusparseDcsric02", "rocsparse_dcsric0", "library"); subst("cusparseDcsrilu02", "rocsparse_dcsrilu0", "library"); subst("cusparseDcsrilu02_analysis", "rocsparse_dcsrilu0_analysis", "library"); subst("cusparseDcsrilu02_bufferSize", "rocsparse_dcsrilu0_buffer_size", "library"); + subst("cusparseDcsrilu02_numericBoost", "rocsparse_dcsrilu0_numeric_boost", "library"); subst("cusparseDdense2csc", "rocsparse_ddense2csc", "library"); subst("cusparseDdense2csr", "rocsparse_ddense2csr", "library"); subst("cusparseDestroy", "rocsparse_destroy_handle", "library"); @@ -1807,9 +1811,11 @@ sub rocSubstitutions { subst("cusparseScsr2gebsr_bufferSize", "rocsparse_scsr2gebsr_buffer_size", "library"); subst("cusparseScsr2hyb", "rocsparse_scsr2hyb", "library"); subst("cusparseScsrcolor", "rocsparse_scsrcolor", "library"); + subst("cusparseScsric02", "rocsparse_scsric0", "library"); subst("cusparseScsrilu02", "rocsparse_scsrilu0", "library"); subst("cusparseScsrilu02_analysis", "rocsparse_scsrilu0_analysis", "library"); subst("cusparseScsrilu02_bufferSize", "rocsparse_scsrilu0_buffer_size", "library"); + subst("cusparseScsrilu02_numericBoost", "rocsparse_dscsrilu0_numeric_boost", "library"); subst("cusparseSdense2csc", "rocsparse_sdense2csc", "library"); subst("cusparseSdense2csr", "rocsparse_sdense2csr", "library"); subst("cusparseSetMatDiagType", "rocsparse_set_mat_diag_type", "library"); @@ -1870,6 +1876,7 @@ sub rocSubstitutions { subst("cusparseXcsr2bsrNnz", "rocsparse_csr2bsr_nnz", "library"); subst("cusparseXcsr2coo", "rocsparse_csr2coo", "library"); subst("cusparseXcsr2gebsrNnz", "rocsparse_csr2gebsr_nnz", "library"); + subst("cusparseXcsrilu02_zeroPivot", "rocsparse_csrilu0_zero_pivot", "library"); subst("cusparseXcsrsort", "rocsparse_csrsort", "library"); subst("cusparseXcsrsort_bufferSizeExt", "rocsparse_csrsort_buffer_size", "library"); subst("cusparseXgebsr2gebsrNnz", "rocsparse_gebsr2gebsr_nnz", "library"); @@ -1882,6 +1889,7 @@ sub rocSubstitutions { subst("cusparseZcsr2gebsr_bufferSize", "rocsparse_zcsr2gebsr_buffer_size", "library"); subst("cusparseZcsr2hyb", "rocsparse_zcsr2hyb", "library"); subst("cusparseZcsrcolor", "rocsparse_zcsrcolor", "library"); + subst("cusparseZcsric02", "rocsparse_zcsric0", "library"); subst("cusparseZcsrilu02", "rocsparse_zcsrilu0", "library"); subst("cusparseZcsrilu02_analysis", "rocsparse_zcsrilu0_analysis", "library"); subst("cusparseZcsrilu02_bufferSize", "rocsparse_zcsrilu0_buffer_size", "library"); @@ -1907,6 +1915,8 @@ sub rocSubstitutions { subst("cusparseZnnz_compress", "rocsparse_znnz_compress", "library"); subst("cublas.h", "rocblas.h", "include_cuda_main_header"); subst("cublas_v2.h", "rocblas.h", "include_cuda_main_header_v2"); + subst("csric02Info", "_rocsparse_mat_info", "type"); + subst("csric02Info_t", "rocsparse_mat_info", "type"); subst("csrilu02Info", "_rocsparse_mat_info", "type"); subst("csrilu02Info_t", "rocsparse_mat_info", "type"); subst("cuComplex", "rocblas_float_complex", "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 0158dc5f..2f6bb41e 100644 --- a/docs/tables/CUSPARSE_API_supported_by_HIP_and_ROC.md +++ b/docs/tables/CUSPARSE_API_supported_by_HIP_and_ROC.md @@ -118,8 +118,8 @@ |`bsrsv2Info_t`| |12.2| |`bsrsv2Info_t`|3.6.0| | | | | | | | | |`csrgemm2Info`| | |12.0| | | | | | | | | | | |`csrgemm2Info_t`| | |12.0|`csrgemm2Info_t`|2.8.0| | | | | | | | | -|`csric02Info`| |12.2| |`csric02Info`|3.1.0| | | | | | | | | -|`csric02Info_t`| |12.2| |`csric02Info_t`|3.1.0| | | | | | | | | +|`csric02Info`| |12.2| |`csric02Info`|3.1.0| | | |`_rocsparse_mat_info`|1.9.0| | | | +|`csric02Info_t`| |12.2| |`csric02Info_t`|3.1.0| | | |`rocsparse_mat_info`|1.9.0| | | | |`csrilu02Info`| |12.2| |`csrilu02Info`|1.9.2| | | |`_rocsparse_mat_info`|1.9.0| | | | |`csrilu02Info_t`| |12.2| |`csrilu02Info_t`|1.9.2| | | |`rocsparse_mat_info`|1.9.0| | | | |`csrsm2Info`|9.2| |12.0| | | | | | | | | | | @@ -479,7 +479,7 @@ |`cusparseCbsrilu02_bufferSizeExt`| |12.2| | | | | | | | | | | | |`cusparseCbsrilu02_numericBoost`| |12.2| |`hipsparseCbsrilu02_numericBoost`|3.9.0| | | | | | | | | |`cusparseCcsric0`| |10.2|11.0| | | | | | | | | | | -|`cusparseCcsric02`| |12.2| |`hipsparseCcsric02`|3.1.0| | | | | | | | | +|`cusparseCcsric02`| |12.2| |`hipsparseCcsric02`|3.1.0| | | |`rocsparse_ccsric0`|3.1.0| | | | |`cusparseCcsric02_analysis`| |12.2| |`hipsparseCcsric02_analysis`|3.1.0| | | | | | | | | |`cusparseCcsric02_bufferSize`| |12.2| |`hipsparseCcsric02_bufferSize`|3.1.0| | | | | | | | | |`cusparseCcsric02_bufferSizeExt`| |12.2| |`hipsparseCcsric02_bufferSizeExt`|3.1.0| | | | | | | | | @@ -488,7 +488,7 @@ |`cusparseCcsrilu02_analysis`| |12.2| |`hipsparseCcsrilu02_analysis`|3.1.0| | | |`rocsparse_ccsrilu0_analysis`|2.10.0| | | | |`cusparseCcsrilu02_bufferSize`| |12.2| |`hipsparseCcsrilu02_bufferSize`|3.1.0| | | |`rocsparse_ccsrilu0_buffer_size`|2.10.0| | | | |`cusparseCcsrilu02_bufferSizeExt`| |12.2| |`hipsparseCcsrilu02_bufferSizeExt`|3.1.0| | | | | | | | | -|`cusparseCcsrilu02_numericBoost`| |12.2| |`hipsparseCcsrilu02_numericBoost`|3.10.0| | | | | | | | | +|`cusparseCcsrilu02_numericBoost`| |12.2| |`hipsparseCcsrilu02_numericBoost`|3.10.0| | | |`rocsparse_dccsrilu0_numeric_boost`|4.5.0| | | | |`cusparseCgpsvInterleavedBatch`|9.2| | |`hipsparseCgpsvInterleavedBatch`|5.1.0| | | |`rocsparse_cgpsv_interleaved_batch`|5.1.0| | | | |`cusparseCgpsvInterleavedBatch_bufferSizeExt`|9.2| | |`hipsparseCgpsvInterleavedBatch_bufferSizeExt`|5.1.0| | | |`rocsparse_cgpsv_interleaved_batch_buffer_size`|5.1.0| | | | |`cusparseCgtsv`| |10.2|11.0| | | | | | | | | | | @@ -513,7 +513,7 @@ |`cusparseDbsrilu02_bufferSizeExt`| |12.2| | | | | | | | | | | | |`cusparseDbsrilu02_numericBoost`| |12.2| |`hipsparseDbsrilu02_numericBoost`|3.9.0| | | | | | | | | |`cusparseDcsric0`| |10.2|11.0| | | | | | | | | | | -|`cusparseDcsric02`| |12.2| |`hipsparseDcsric02`|3.1.0| | | | | | | | | +|`cusparseDcsric02`| |12.2| |`hipsparseDcsric02`|3.1.0| | | |`rocsparse_dcsric0`|3.1.0| | | | |`cusparseDcsric02_analysis`| |12.2| |`hipsparseDcsric02_analysis`|3.1.0| | | | | | | | | |`cusparseDcsric02_bufferSize`| |12.2| |`hipsparseDcsric02_bufferSize`|3.1.0| | | | | | | | | |`cusparseDcsric02_bufferSizeExt`| |12.2| |`hipsparseDcsric02_bufferSizeExt`|3.1.0| | | | | | | | | @@ -522,7 +522,7 @@ |`cusparseDcsrilu02_analysis`| |12.2| |`hipsparseDcsrilu02_analysis`|1.9.2| | | |`rocsparse_dcsrilu0_analysis`|1.9.0| | | | |`cusparseDcsrilu02_bufferSize`| |12.2| |`hipsparseDcsrilu02_bufferSize`|1.9.2| | | |`rocsparse_dcsrilu0_buffer_size`|1.9.0| | | | |`cusparseDcsrilu02_bufferSizeExt`| |12.2| |`hipsparseDcsrilu02_bufferSizeExt`|1.9.2| | | | | | | | | -|`cusparseDcsrilu02_numericBoost`| |12.2| |`hipsparseDcsrilu02_numericBoost`|3.10.0| | | | | | | | | +|`cusparseDcsrilu02_numericBoost`| |12.2| |`hipsparseDcsrilu02_numericBoost`|3.10.0| | | |`rocsparse_dcsrilu0_numeric_boost`|3.9.0| | | | |`cusparseDgpsvInterleavedBatch`|9.2| | |`hipsparseDgpsvInterleavedBatch`|5.1.0| | | |`rocsparse_dgpsv_interleaved_batch`|5.1.0| | | | |`cusparseDgpsvInterleavedBatch_bufferSizeExt`|9.2| | |`hipsparseDgpsvInterleavedBatch_bufferSizeExt`|5.1.0| | | |`rocsparse_dgpsv_interleaved_batch_buffer_size`|5.1.0| | | | |`cusparseDgtsv`| |10.2|11.0| | | | | | | | | | | @@ -546,7 +546,7 @@ |`cusparseSbsrilu02_bufferSizeExt`| |12.2| | | | | | | | | | | | |`cusparseSbsrilu02_numericBoost`| |12.2| |`hipsparseSbsrilu02_numericBoost`|3.9.0| | | | | | | | | |`cusparseScsric0`| |10.2|11.0| | | | | | | | | | | -|`cusparseScsric02`| |12.2| |`hipsparseScsric02`|3.1.0| | | | | | | | | +|`cusparseScsric02`| |12.2| |`hipsparseScsric02`|3.1.0| | | |`rocsparse_scsric0`|3.1.0| | | | |`cusparseScsric02_analysis`| |12.2| |`hipsparseScsric02_analysis`|3.1.0| | | | | | | | | |`cusparseScsric02_bufferSize`| |12.2| |`hipsparseScsric02_bufferSize`|3.1.0| | | | | | | | | |`cusparseScsric02_bufferSizeExt`| |12.2| |`hipsparseScsric02_bufferSizeExt`|3.1.0| | | | | | | | | @@ -555,7 +555,7 @@ |`cusparseScsrilu02_analysis`| |12.2| |`hipsparseScsrilu02_analysis`|1.9.2| | | |`rocsparse_scsrilu0_analysis`|1.9.0| | | | |`cusparseScsrilu02_bufferSize`| |12.2| |`hipsparseScsrilu02_bufferSize`|1.9.2| | | |`rocsparse_scsrilu0_buffer_size`|1.9.0| | | | |`cusparseScsrilu02_bufferSizeExt`| |12.2| |`hipsparseScsrilu02_bufferSizeExt`|1.9.2| | | | | | | | | -|`cusparseScsrilu02_numericBoost`| |12.2| |`hipsparseScsrilu02_numericBoost`|3.10.0| | | | | | | | | +|`cusparseScsrilu02_numericBoost`| |12.2| |`hipsparseScsrilu02_numericBoost`|3.10.0| | | |`rocsparse_dscsrilu0_numeric_boost`|4.5.0| | | | |`cusparseSgpsvInterleavedBatch`|9.2| | |`hipsparseSgpsvInterleavedBatch`|5.1.0| | | |`rocsparse_sgpsv_interleaved_batch`|5.1.0| | | | |`cusparseSgpsvInterleavedBatch_bufferSizeExt`|9.2| | |`hipsparseSgpsvInterleavedBatch_bufferSizeExt`|5.1.0| | | |`rocsparse_sgpsv_interleaved_batch_buffer_size`|5.1.0| | | | |`cusparseSgtsv`| |10.2|11.0| | | | | | | | | | | @@ -572,7 +572,7 @@ |`cusparseXbsric02_zeroPivot`| | | |`hipsparseXbsric02_zeroPivot`|3.8.0| | | | | | | | | |`cusparseXbsrilu02_zeroPivot`| |12.2| |`hipsparseXbsrilu02_zeroPivot`|3.9.0| | | | | | | | | |`cusparseXcsric02_zeroPivot`| |12.2| |`hipsparseXcsric02_zeroPivot`|3.1.0| | | | | | | | | -|`cusparseXcsrilu02_zeroPivot`| |12.2| |`hipsparseXcsrilu02_zeroPivot`|1.9.2| | | | | | | | | +|`cusparseXcsrilu02_zeroPivot`| |12.2| |`hipsparseXcsrilu02_zeroPivot`|1.9.2| | | |`rocsparse_csrilu0_zero_pivot`|1.9.0| | | | |`cusparseZbsric02`| |12.2| |`hipsparseZbsric02`|3.8.0| | | | | | | | | |`cusparseZbsric02_analysis`| |12.2| |`hipsparseZbsric02_analysis`|3.8.0| | | | | | | | | |`cusparseZbsric02_bufferSize`| |12.2| |`hipsparseZbsric02_bufferSize`|3.8.0| | | | | | | | | @@ -583,7 +583,7 @@ |`cusparseZbsrilu02_bufferSizeExt`| |12.2| | | | | | | | | | | | |`cusparseZbsrilu02_numericBoost`| |12.2| |`hipsparseZbsrilu02_numericBoost`|3.9.0| | | | | | | | | |`cusparseZcsric0`| |10.2|11.0| | | | | | | | | | | -|`cusparseZcsric02`| |12.2| |`hipsparseZcsric02`|3.1.0| | | | | | | | | +|`cusparseZcsric02`| |12.2| |`hipsparseZcsric02`|3.1.0| | | |`rocsparse_zcsric0`|3.1.0| | | | |`cusparseZcsric02_analysis`| |12.2| |`hipsparseZcsric02_analysis`|3.1.0| | | | | | | | | |`cusparseZcsric02_bufferSize`| |12.2| |`hipsparseZcsric02_bufferSize`|3.1.0| | | | | | | | | |`cusparseZcsric02_bufferSizeExt`| |12.2| |`hipsparseZcsric02_bufferSizeExt`|3.1.0| | | | | | | | | diff --git a/docs/tables/CUSPARSE_API_supported_by_ROC.md b/docs/tables/CUSPARSE_API_supported_by_ROC.md index 453c6a0f..1db9df1c 100644 --- a/docs/tables/CUSPARSE_API_supported_by_ROC.md +++ b/docs/tables/CUSPARSE_API_supported_by_ROC.md @@ -118,8 +118,8 @@ |`bsrsv2Info_t`| |12.2| | | | | | | |`csrgemm2Info`| | |12.0| | | | | | |`csrgemm2Info_t`| | |12.0| | | | | | -|`csric02Info`| |12.2| | | | | | | -|`csric02Info_t`| |12.2| | | | | | | +|`csric02Info`| |12.2| |`_rocsparse_mat_info`|1.9.0| | | | +|`csric02Info_t`| |12.2| |`rocsparse_mat_info`|1.9.0| | | | |`csrilu02Info`| |12.2| |`_rocsparse_mat_info`|1.9.0| | | | |`csrilu02Info_t`| |12.2| |`rocsparse_mat_info`|1.9.0| | | | |`csrsm2Info`|9.2| |12.0| | | | | | @@ -479,7 +479,7 @@ |`cusparseCbsrilu02_bufferSizeExt`| |12.2| | | | | | | |`cusparseCbsrilu02_numericBoost`| |12.2| | | | | | | |`cusparseCcsric0`| |10.2|11.0| | | | | | -|`cusparseCcsric02`| |12.2| | | | | | | +|`cusparseCcsric02`| |12.2| |`rocsparse_ccsric0`|3.1.0| | | | |`cusparseCcsric02_analysis`| |12.2| | | | | | | |`cusparseCcsric02_bufferSize`| |12.2| | | | | | | |`cusparseCcsric02_bufferSizeExt`| |12.2| | | | | | | @@ -488,7 +488,7 @@ |`cusparseCcsrilu02_analysis`| |12.2| |`rocsparse_ccsrilu0_analysis`|2.10.0| | | | |`cusparseCcsrilu02_bufferSize`| |12.2| |`rocsparse_ccsrilu0_buffer_size`|2.10.0| | | | |`cusparseCcsrilu02_bufferSizeExt`| |12.2| | | | | | | -|`cusparseCcsrilu02_numericBoost`| |12.2| | | | | | | +|`cusparseCcsrilu02_numericBoost`| |12.2| |`rocsparse_dccsrilu0_numeric_boost`|4.5.0| | | | |`cusparseCgpsvInterleavedBatch`|9.2| | |`rocsparse_cgpsv_interleaved_batch`|5.1.0| | | | |`cusparseCgpsvInterleavedBatch_bufferSizeExt`|9.2| | |`rocsparse_cgpsv_interleaved_batch_buffer_size`|5.1.0| | | | |`cusparseCgtsv`| |10.2|11.0| | | | | | @@ -513,7 +513,7 @@ |`cusparseDbsrilu02_bufferSizeExt`| |12.2| | | | | | | |`cusparseDbsrilu02_numericBoost`| |12.2| | | | | | | |`cusparseDcsric0`| |10.2|11.0| | | | | | -|`cusparseDcsric02`| |12.2| | | | | | | +|`cusparseDcsric02`| |12.2| |`rocsparse_dcsric0`|3.1.0| | | | |`cusparseDcsric02_analysis`| |12.2| | | | | | | |`cusparseDcsric02_bufferSize`| |12.2| | | | | | | |`cusparseDcsric02_bufferSizeExt`| |12.2| | | | | | | @@ -522,7 +522,7 @@ |`cusparseDcsrilu02_analysis`| |12.2| |`rocsparse_dcsrilu0_analysis`|1.9.0| | | | |`cusparseDcsrilu02_bufferSize`| |12.2| |`rocsparse_dcsrilu0_buffer_size`|1.9.0| | | | |`cusparseDcsrilu02_bufferSizeExt`| |12.2| | | | | | | -|`cusparseDcsrilu02_numericBoost`| |12.2| | | | | | | +|`cusparseDcsrilu02_numericBoost`| |12.2| |`rocsparse_dcsrilu0_numeric_boost`|3.9.0| | | | |`cusparseDgpsvInterleavedBatch`|9.2| | |`rocsparse_dgpsv_interleaved_batch`|5.1.0| | | | |`cusparseDgpsvInterleavedBatch_bufferSizeExt`|9.2| | |`rocsparse_dgpsv_interleaved_batch_buffer_size`|5.1.0| | | | |`cusparseDgtsv`| |10.2|11.0| | | | | | @@ -546,7 +546,7 @@ |`cusparseSbsrilu02_bufferSizeExt`| |12.2| | | | | | | |`cusparseSbsrilu02_numericBoost`| |12.2| | | | | | | |`cusparseScsric0`| |10.2|11.0| | | | | | -|`cusparseScsric02`| |12.2| | | | | | | +|`cusparseScsric02`| |12.2| |`rocsparse_scsric0`|3.1.0| | | | |`cusparseScsric02_analysis`| |12.2| | | | | | | |`cusparseScsric02_bufferSize`| |12.2| | | | | | | |`cusparseScsric02_bufferSizeExt`| |12.2| | | | | | | @@ -555,7 +555,7 @@ |`cusparseScsrilu02_analysis`| |12.2| |`rocsparse_scsrilu0_analysis`|1.9.0| | | | |`cusparseScsrilu02_bufferSize`| |12.2| |`rocsparse_scsrilu0_buffer_size`|1.9.0| | | | |`cusparseScsrilu02_bufferSizeExt`| |12.2| | | | | | | -|`cusparseScsrilu02_numericBoost`| |12.2| | | | | | | +|`cusparseScsrilu02_numericBoost`| |12.2| |`rocsparse_dscsrilu0_numeric_boost`|4.5.0| | | | |`cusparseSgpsvInterleavedBatch`|9.2| | |`rocsparse_sgpsv_interleaved_batch`|5.1.0| | | | |`cusparseSgpsvInterleavedBatch_bufferSizeExt`|9.2| | |`rocsparse_sgpsv_interleaved_batch_buffer_size`|5.1.0| | | | |`cusparseSgtsv`| |10.2|11.0| | | | | | @@ -572,7 +572,7 @@ |`cusparseXbsric02_zeroPivot`| | | | | | | | | |`cusparseXbsrilu02_zeroPivot`| |12.2| | | | | | | |`cusparseXcsric02_zeroPivot`| |12.2| | | | | | | -|`cusparseXcsrilu02_zeroPivot`| |12.2| | | | | | | +|`cusparseXcsrilu02_zeroPivot`| |12.2| |`rocsparse_csrilu0_zero_pivot`|1.9.0| | | | |`cusparseZbsric02`| |12.2| | | | | | | |`cusparseZbsric02_analysis`| |12.2| | | | | | | |`cusparseZbsric02_bufferSize`| |12.2| | | | | | | @@ -583,7 +583,7 @@ |`cusparseZbsrilu02_bufferSizeExt`| |12.2| | | | | | | |`cusparseZbsrilu02_numericBoost`| |12.2| | | | | | | |`cusparseZcsric0`| |10.2|11.0| | | | | | -|`cusparseZcsric02`| |12.2| | | | | | | +|`cusparseZcsric02`| |12.2| |`rocsparse_zcsric0`|3.1.0| | | | |`cusparseZcsric02_analysis`| |12.2| | | | | | | |`cusparseZcsric02_bufferSize`| |12.2| | | | | | | |`cusparseZcsric02_bufferSizeExt`| |12.2| | | | | | | diff --git a/src/CUDA2HIP_SPARSE_API_functions.cpp b/src/CUDA2HIP_SPARSE_API_functions.cpp index 13d98be1..1d5f27f2 100644 --- a/src/CUDA2HIP_SPARSE_API_functions.cpp +++ b/src/CUDA2HIP_SPARSE_API_functions.cpp @@ -338,10 +338,10 @@ const std::map CUDA_SPARSE_FUNCTION_MAP { {"cusparseCcsric02_analysis", {"hipsparseCcsric02_analysis", "", CONV_LIB_FUNC, API_SPARSE, 12, ROC_UNSUPPORTED | CUDA_DEPRECATED}}, {"cusparseZcsric02_analysis", {"hipsparseZcsric02_analysis", "", CONV_LIB_FUNC, API_SPARSE, 12, ROC_UNSUPPORTED | CUDA_DEPRECATED}}, - {"cusparseScsric02", {"hipsparseScsric02", "", CONV_LIB_FUNC, API_SPARSE, 12, ROC_UNSUPPORTED | CUDA_DEPRECATED}}, - {"cusparseDcsric02", {"hipsparseDcsric02", "", CONV_LIB_FUNC, API_SPARSE, 12, ROC_UNSUPPORTED | CUDA_DEPRECATED}}, - {"cusparseCcsric02", {"hipsparseCcsric02", "", CONV_LIB_FUNC, API_SPARSE, 12, ROC_UNSUPPORTED | CUDA_DEPRECATED}}, - {"cusparseZcsric02", {"hipsparseZcsric02", "", CONV_LIB_FUNC, API_SPARSE, 12, ROC_UNSUPPORTED | CUDA_DEPRECATED}}, + {"cusparseScsric02", {"hipsparseScsric02", "rocsparse_scsric0", CONV_LIB_FUNC, API_SPARSE, 12, CUDA_DEPRECATED}}, + {"cusparseDcsric02", {"hipsparseDcsric02", "rocsparse_dcsric0", CONV_LIB_FUNC, API_SPARSE, 12, CUDA_DEPRECATED}}, + {"cusparseCcsric02", {"hipsparseCcsric02", "rocsparse_ccsric0", CONV_LIB_FUNC, API_SPARSE, 12, CUDA_DEPRECATED}}, + {"cusparseZcsric02", {"hipsparseZcsric02", "rocsparse_zcsric0", CONV_LIB_FUNC, API_SPARSE, 12, CUDA_DEPRECATED}}, {"cusparseXcsric02_zeroPivot", {"hipsparseXcsric02_zeroPivot", "", CONV_LIB_FUNC, API_SPARSE, 12, ROC_UNSUPPORTED | CUDA_DEPRECATED}}, {"cusparseSbsric02_bufferSize", {"hipsparseSbsric02_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, 12, ROC_UNSUPPORTED | CUDA_DEPRECATED}}, @@ -372,9 +372,9 @@ const std::map CUDA_SPARSE_FUNCTION_MAP { {"cusparseZcsrilu0", {"hipsparseZcsrilu0", "", CONV_LIB_FUNC, API_SPARSE, 12, UNSUPPORTED | CUDA_DEPRECATED | CUDA_REMOVED}}, {"cusparseCsrilu0Ex", {"hipsparseCsrilu0Ex", "", CONV_LIB_FUNC, API_SPARSE, 12, UNSUPPORTED | CUDA_DEPRECATED | CUDA_REMOVED}}, - {"cusparseScsrilu02_numericBoost", {"hipsparseScsrilu02_numericBoost", "", CONV_LIB_FUNC, API_SPARSE, 12, ROC_UNSUPPORTED | CUDA_DEPRECATED}}, - {"cusparseDcsrilu02_numericBoost", {"hipsparseDcsrilu02_numericBoost", "", CONV_LIB_FUNC, API_SPARSE, 12, ROC_UNSUPPORTED | CUDA_DEPRECATED}}, - {"cusparseCcsrilu02_numericBoost", {"hipsparseCcsrilu02_numericBoost", "", CONV_LIB_FUNC, API_SPARSE, 12, ROC_UNSUPPORTED | CUDA_DEPRECATED}}, + {"cusparseScsrilu02_numericBoost", {"hipsparseScsrilu02_numericBoost", "rocsparse_dscsrilu0_numeric_boost", CONV_LIB_FUNC, API_SPARSE, 12, CUDA_DEPRECATED}}, + {"cusparseDcsrilu02_numericBoost", {"hipsparseDcsrilu02_numericBoost", "rocsparse_dcsrilu0_numeric_boost", CONV_LIB_FUNC, API_SPARSE, 12, CUDA_DEPRECATED}}, + {"cusparseCcsrilu02_numericBoost", {"hipsparseCcsrilu02_numericBoost", "rocsparse_dccsrilu0_numeric_boost", CONV_LIB_FUNC, API_SPARSE, 12, CUDA_DEPRECATED}}, {"cusparseZcsrilu02_numericBoost", {"hipsparseZcsrilu02_numericBoost", "rocsparse_zcsrilu0_numeric_boost", CONV_LIB_FUNC, API_SPARSE, 12, CUDA_DEPRECATED}}, {"cusparseScsrilu02_bufferSize", {"hipsparseScsrilu02_bufferSize", "rocsparse_scsrilu0_buffer_size", CONV_LIB_FUNC, API_SPARSE, 12, CUDA_DEPRECATED}}, @@ -395,7 +395,7 @@ const std::map CUDA_SPARSE_FUNCTION_MAP { {"cusparseDcsrilu02", {"hipsparseDcsrilu02", "rocsparse_dcsrilu0", CONV_LIB_FUNC, API_SPARSE, 12, CUDA_DEPRECATED}}, {"cusparseCcsrilu02", {"hipsparseCcsrilu02", "rocsparse_ccsrilu0", CONV_LIB_FUNC, API_SPARSE, 12, CUDA_DEPRECATED}}, {"cusparseZcsrilu02", {"hipsparseZcsrilu02", "rocsparse_zcsrilu0", CONV_LIB_FUNC, API_SPARSE, 12, CUDA_DEPRECATED}}, - {"cusparseXcsrilu02_zeroPivot", {"hipsparseXcsrilu02_zeroPivot", "", CONV_LIB_FUNC, API_SPARSE, 12, ROC_UNSUPPORTED | CUDA_DEPRECATED}}, + {"cusparseXcsrilu02_zeroPivot", {"hipsparseXcsrilu02_zeroPivot", "rocsparse_csrilu0_zero_pivot", CONV_LIB_FUNC, API_SPARSE, 12, CUDA_DEPRECATED}}, {"cusparseSbsrilu02_numericBoost", {"hipsparseSbsrilu02_numericBoost", "", CONV_LIB_FUNC, API_SPARSE, 12, ROC_UNSUPPORTED | CUDA_DEPRECATED}}, {"cusparseDbsrilu02_numericBoost", {"hipsparseDbsrilu02_numericBoost", "", CONV_LIB_FUNC, API_SPARSE, 12, ROC_UNSUPPORTED | CUDA_DEPRECATED}}, @@ -2188,6 +2188,14 @@ const std::map HIP_SPARSE_FUNCTION_VER_MAP { {"rocsparse_dcsrilu0_buffer_size", {HIP_1090, HIP_0, HIP_0 }}, {"rocsparse_scsrilu0_buffer_size", {HIP_1090, HIP_0, HIP_0 }}, {"rocsparse_zcsrilu0_numeric_boost", {HIP_3090, HIP_0, HIP_0 }}, + {"rocsparse_dccsrilu0_numeric_boost", {HIP_4050, HIP_0, HIP_0 }}, + {"rocsparse_dcsrilu0_numeric_boost", {HIP_3090, HIP_0, HIP_0 }}, + {"rocsparse_dscsrilu0_numeric_boost", {HIP_4050, HIP_0, HIP_0 }}, + {"rocsparse_csrilu0_zero_pivot", {HIP_1090, HIP_0, HIP_0 }}, + {"rocsparse_zcsric0", {HIP_3010, HIP_0, HIP_0 }}, + {"rocsparse_ccsric0", {HIP_3010, HIP_0, HIP_0 }}, + {"rocsparse_dcsric0", {HIP_3010, HIP_0, HIP_0 }}, + {"rocsparse_scsric0", {HIP_3010, HIP_0, HIP_0 }}, }; const std::map CUDA_SPARSE_API_SECTION_MAP { diff --git a/src/CUDA2HIP_SPARSE_API_types.cpp b/src/CUDA2HIP_SPARSE_API_types.cpp index 8c53510a..3a008b00 100644 --- a/src/CUDA2HIP_SPARSE_API_types.cpp +++ b/src/CUDA2HIP_SPARSE_API_types.cpp @@ -62,8 +62,8 @@ const std::map CUDA_SPARSE_TYPE_NAME_MAP { {"csru2csrInfo", {"csru2csrInfo", "", CONV_TYPE, API_SPARSE, 4, ROC_UNSUPPORTED | CUDA_DEPRECATED}}, {"csru2csrInfo_t", {"csru2csrInfo_t", "", CONV_TYPE, API_SPARSE, 4, ROC_UNSUPPORTED | CUDA_DEPRECATED}}, - {"csric02Info", {"csric02Info", "", CONV_TYPE, API_SPARSE, 4, ROC_UNSUPPORTED | CUDA_DEPRECATED}}, - {"csric02Info_t", {"csric02Info_t", "", CONV_TYPE, API_SPARSE, 4, ROC_UNSUPPORTED | CUDA_DEPRECATED}}, + {"csric02Info", {"csric02Info", "_rocsparse_mat_info", CONV_TYPE, API_SPARSE, 4, CUDA_DEPRECATED}}, + {"csric02Info_t", {"csric02Info_t", "rocsparse_mat_info", CONV_TYPE, API_SPARSE, 4, CUDA_DEPRECATED}}, {"csrgemm2Info", {"csrgemm2Info", "", CONV_TYPE, API_SPARSE, 4, UNSUPPORTED | CUDA_REMOVED}}, {"csrgemm2Info_t", {"csrgemm2Info_t", "", CONV_TYPE, API_SPARSE, 4, ROC_UNSUPPORTED | CUDA_REMOVED}}, diff --git a/tests/unit_tests/synthetic/libraries/cusparse2hipsparse.cu b/tests/unit_tests/synthetic/libraries/cusparse2hipsparse.cu index 7fd4d17e..39f630d9 100644 --- a/tests/unit_tests/synthetic/libraries/cusparse2hipsparse.cu +++ b/tests/unit_tests/synthetic/libraries/cusparse2hipsparse.cu @@ -163,6 +163,7 @@ int main() { int nnzPerRowCol = 0; int userEllWidth = 0; int ienable_boost = 0; + int iposition = 0; int64_t size = 0; int64_t nnz = 0; int64_t rows = 0; @@ -248,14 +249,17 @@ int main() { float fdu = 0.f; float fdw = 0.f; float fx = 0.f; + double dboost_val = 0.f; + float boost_val = 0.f; pruneInfo_t prune_info; csrilu02Info_t csrilu02_info; + csric02Info_t csric02_info; // CHECK: hipDoubleComplex dcomplex, dcomplexA, dcomplexB, dComplexbsrSortedValA, dComplexbsrSortedValC, dComplexcsrSortedValA, dComplexcsrSortedValC, dcomplextol, dComplexbsrSortedVal, dComplexbscVal, dComplexcscSortedVal, dcomplexds, dcomplexdl, dcomplexd, dcomplexdu, dcomplexdw, dcomplexx, dcomplex_boost_val; cuDoubleComplex dcomplex, dcomplexA, dcomplexB, dComplexbsrSortedValA, dComplexbsrSortedValC, dComplexcsrSortedValA, dComplexcsrSortedValC, dcomplextol, dComplexbsrSortedVal, dComplexbscVal, dComplexcscSortedVal, dcomplexds, dcomplexdl, dcomplexd, dcomplexdu, dcomplexdw, dcomplexx, dcomplex_boost_val; - // CHECK: hipComplex complex, complexA, complexB, complexbsrValA, complexbsrSortedValC, complexcsrSortedValA, complexcsrSortedValC, complextol, complexbsrSortedVal, complexbscVal, complexcscSortedVal, complexds, complexdl, complexd, complexdu, complexdw, complexx; - cuComplex complex, complexA, complexB, complexbsrValA, complexbsrSortedValC, complexcsrSortedValA, complexcsrSortedValC, complextol, complexbsrSortedVal, complexbscVal, complexcscSortedVal, complexds, complexdl, complexd, complexdu, complexdw, complexx; + // CHECK: hipComplex complex, complexA, complexB, complexbsrValA, complexbsrSortedValC, complexcsrSortedValA, complexcsrSortedValC, complextol, complexbsrSortedVal, complexbscVal, complexcscSortedVal, complexds, complexdl, complexd, complexdu, complexdw, complexx, complex_boost_val; + cuComplex complex, complexA, complexB, complexbsrValA, complexbsrSortedValC, complexcsrSortedValA, complexcsrSortedValC, complextol, complexbsrSortedVal, complexbscVal, complexcscSortedVal, complexds, complexdl, complexd, complexdu, complexdw, complexx, complex_boost_val; // CHECK: hipsparseOperation_t opA, opB; cusparseOperation_t opA, opB; @@ -745,6 +749,46 @@ int main() { // CHECK: status_t = hipsparseZcsrilu02_numericBoost(handle_t, csrilu02_info, ienable_boost, &dtol, &dcomplex_boost_val); status_t = cusparseZcsrilu02_numericBoost(handle_t, csrilu02_info, ienable_boost, &dtol, &dcomplex_boost_val); + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseCcsrilu02_numericBoost(cusparseHandle_t handle, csrilu02Info_t info, int enable_boost, double* tol, cuComplex* boost_val); + // HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseCcsrilu02_numericBoost(hipsparseHandle_t handle, csrilu02Info_t info, int enable_boost, double* tol, hipComplex* boost_val); + // CHECK: status_t = hipsparseCcsrilu02_numericBoost(handle_t, csrilu02_info, ienable_boost, &dtol, &complex_boost_val); + status_t = cusparseCcsrilu02_numericBoost(handle_t, csrilu02_info, ienable_boost, &dtol, &complex_boost_val); + + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseDcsrilu02_numericBoost(cusparseHandle_t handle, csrilu02Info_t info, int enable_boost, double* tol, double* boost_val); + // HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseDcsrilu02_numericBoost(hipsparseHandle_t handle, csrilu02Info_t info, int enable_boost, double* tol, double* boost_val); + // CHECK: status_t = hipsparseDcsrilu02_numericBoost(handle_t, csrilu02_info, ienable_boost, &dtol, &dboost_val); + status_t = cusparseDcsrilu02_numericBoost(handle_t, csrilu02_info, ienable_boost, &dtol, &dboost_val); + + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseScsrilu02_numericBoost(cusparseHandle_t handle, csrilu02Info_t info, int enable_boost, double* tol, float* boost_val); + // HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseScsrilu02_numericBoost(hipsparseHandle_t handle, csrilu02Info_t info, int enable_boost, double* tol, float* boost_val); + // CHECK: status_t = hipsparseScsrilu02_numericBoost(handle_t, csrilu02_info, ienable_boost, &dtol, &boost_val); + status_t = cusparseScsrilu02_numericBoost(handle_t, csrilu02_info, ienable_boost, &dtol, &boost_val); + + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseXcsrilu02_zeroPivot(cusparseHandle_t handle, csrilu02Info_t info, int* position); + // HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseXcsrilu02_zeroPivot(hipsparseHandle_t handle, csrilu02Info_t info, int* position); + // CHECK: status_t = hipsparseXcsrilu02_zeroPivot(handle_t, csrilu02_info, &iposition); + status_t = cusparseXcsrilu02_zeroPivot(handle_t, csrilu02_info, &iposition); + + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseZcsric02(cusparseHandle_t handle, int m, int nnz, const cusparseMatDescr_t descrA, cuDoubleComplex* csrSortedValA_valM, const int* csrSortedRowPtrA, const int* csrSortedColIndA, csric02Info_t info, cusparseSolvePolicy_t policy, void* pBuffer); + // HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseZcsric02(hipsparseHandle_t handle, int m, int nnz, const hipsparseMatDescr_t descrA, hipDoubleComplex* csrSortedValA_valM, const int* csrSortedRowPtrA, const int* csrSortedColIndA, csric02Info_t info, hipsparseSolvePolicy_t policy, void* pBuffer); + // CHECK: status_t = hipsparseZcsric02(handle_t, m, innz, matDescr_A, &dComplexcsrSortedValA, &csrRowPtrA, &csrColIndA, csric02_info, solvePolicy_t, pBuffer); + status_t = cusparseZcsric02(handle_t, m, innz, matDescr_A, &dComplexcsrSortedValA, &csrRowPtrA, &csrColIndA, csric02_info, solvePolicy_t, pBuffer); + + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseCcsric02(cusparseHandle_t handle, int m, int nnz, const cusparseMatDescr_t descrA, cuComplex* csrSortedValA_valM, const int* csrSortedRowPtrA, const int* csrSortedColIndA, csric02Info_t info, cusparseSolvePolicy_t policy, void* pBuffer); + // HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseCcsric02(hipsparseHandle_t handle, int m, int nnz, const hipsparseMatDescr_t descrA, hipComplex* csrSortedValA_valM, const int* csrSortedRowPtrA, const int* csrSortedColIndA, csric02Info_t info, hipsparseSolvePolicy_t policy, void* pBuffer); + // CHECK: status_t = hipsparseCcsric02(handle_t, m, innz, matDescr_A, &complexcsrSortedValA, &csrRowPtrA, &csrColIndA, csric02_info, solvePolicy_t, pBuffer); + status_t = cusparseCcsric02(handle_t, m, innz, matDescr_A, &complexcsrSortedValA, &csrRowPtrA, &csrColIndA, csric02_info, solvePolicy_t, pBuffer); + + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseDcsric02(cusparseHandle_t handle, int m, int nnz, const cusparseMatDescr_t descrA, double* csrSortedValA_valM, const int* csrSortedRowPtrA, const int* csrSortedColIndA, csric02Info_t info, cusparseSolvePolicy_t policy, void* pBuffer); + // HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseDcsric02(hipsparseHandle_t handle, int m, int nnz, const hipsparseMatDescr_t descrA, double* csrSortedValA_valM, const int* csrSortedRowPtrA, const int* csrSortedColIndA, csric02Info_t info, hipsparseSolvePolicy_t policy, void* pBuffer); + // CHECK: status_t = hipsparseDcsric02(handle_t, m, innz, matDescr_A, &dcsrSortedValA, &csrRowPtrA, &csrColIndA, csric02_info, solvePolicy_t, pBuffer); + status_t = cusparseDcsric02(handle_t, m, innz, matDescr_A, &dcsrSortedValA, &csrRowPtrA, &csrColIndA, csric02_info, solvePolicy_t, pBuffer); + + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseScsric02(cusparseHandle_t handle, int m, int nnz, const cusparseMatDescr_t descrA, float* csrSortedValA_valM, const int* csrSortedRowPtrA, const int* csrSortedColIndA, csric02Info_t info, cusparseSolvePolicy_t policy, void* pBuffer); + // HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseScsric02(hipsparseHandle_t handle, int m, int nnz, const hipsparseMatDescr_t descrA, float* csrSortedValA_valM, const int* csrSortedRowPtrA, const int* csrSortedColIndA, csric02Info_t info, hipsparseSolvePolicy_t policy, void* pBuffer); + // CHECK: status_t = hipsparseScsric02(handle_t, m, innz, matDescr_A, &csrSortedValA, &csrRowPtrA, &csrColIndA, csric02_info, solvePolicy_t, pBuffer); + status_t = cusparseScsric02(handle_t, m, innz, matDescr_A, &csrSortedValA, &csrRowPtrA, &csrColIndA, csric02_info, solvePolicy_t, pBuffer); + #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 e6c1e08c..5ed35c49 100644 --- a/tests/unit_tests/synthetic/libraries/cusparse2rocsparse.cu +++ b/tests/unit_tests/synthetic/libraries/cusparse2rocsparse.cu @@ -163,6 +163,7 @@ int main() { int nnzPerRowCol = 0; int userEllWidth = 0; int ienable_boost = 0; + int iposition = 0; int64_t size = 0; int64_t nnz = 0; int64_t rows = 0; @@ -248,6 +249,8 @@ int main() { float fdu = 0.f; float fdw = 0.f; float fx = 0.f; + double dboost_val = 0.f; + float boost_val = 0.f; // CHECK: rocsparse_mat_info prune_info; pruneInfo_t prune_info; @@ -255,6 +258,9 @@ int main() { // CHECK: rocsparse_mat_info csrilu02_info; csrilu02Info_t csrilu02_info; + // CHECK: rocsparse_mat_info csric02_info; + csric02Info_t csric02_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, dComplexcsrSortedValC, dcomplextol, dComplexbsrSortedVal, dComplexbscVal, dComplexcscSortedVal, dcomplexds, dcomplexdl, dcomplexd, dcomplexdu, dcomplexdw, dcomplexx, dcomplex_boost_val; @@ -262,8 +268,8 @@ int main() { // 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, complexcsrSortedValC, complextol, complexbsrSortedVal, complexbscVal, complexcscSortedVal, complexds, complexdl, complexd, complexdu, complexdw, complexx; - cuComplex complex, complexA, complexB, complexbsrValA, complexbsrSortedValC, complexcsrSortedValA, complexcsrSortedValC, complextol, complexbsrSortedVal, complexbscVal, complexcscSortedVal, complexds, complexdl, complexd, complexdu, complexdw, complexx; + // CHECK: rocblas_float_complex complex, complexA, complexB, complexbsrValA, complexbsrSortedValC, complexcsrSortedValA, complexcsrSortedValC, complextol, complexbsrSortedVal, complexbscVal, complexcscSortedVal, complexds, complexdl, complexd, complexdu, complexdw, complexx, complex_boost_val; + cuComplex complex, complexA, complexB, complexbsrValA, complexbsrSortedValC, complexcsrSortedValA, complexcsrSortedValC, complextol, complexbsrSortedVal, complexbscVal, complexcscSortedVal, complexds, complexdl, complexd, complexdu, complexdw, complexx, complex_boost_val; // CHECK: rocsparse_operation opA, opB; cusparseOperation_t opA, opB; @@ -753,6 +759,46 @@ int main() { // CHECK: status_t = rocsparse_zcsrilu0_numeric_boost(handle_t, csrilu02_info, ienable_boost, &dtol, &dcomplex_boost_val); status_t = cusparseZcsrilu02_numericBoost(handle_t, csrilu02_info, ienable_boost, &dtol, &dcomplex_boost_val); + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseCcsrilu02_numericBoost(cusparseHandle_t handle, csrilu02Info_t info, int enable_boost, double* tol, cuComplex* boost_val); + // ROC: ROCSPARSE_EXPORT rocsparse_status rocsparse_dccsrilu0_numeric_boost(rocsparse_handle handle, rocsparse_mat_info info, int enable_boost, const double* boost_tol, const rocsparse_float_complex* boost_val); + // CHECK: status_t = rocsparse_dccsrilu0_numeric_boost(handle_t, csrilu02_info, ienable_boost, &dtol, &complex_boost_val); + status_t = cusparseCcsrilu02_numericBoost(handle_t, csrilu02_info, ienable_boost, &dtol, &complex_boost_val); + + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseDcsrilu02_numericBoost(cusparseHandle_t handle, csrilu02Info_t info, int enable_boost, double* tol, double* boost_val); + // ROC: ROCSPARSE_EXPORT rocsparse_status rocsparse_dcsrilu0_numeric_boost(rocsparse_handle handle, rocsparse_mat_info info, int enable_boost, const double* boost_tol, const double* boost_val); + // CHECK: status_t = rocsparse_dcsrilu0_numeric_boost(handle_t, csrilu02_info, ienable_boost, &dtol, &dboost_val); + status_t = cusparseDcsrilu02_numericBoost(handle_t, csrilu02_info, ienable_boost, &dtol, &dboost_val); + + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseScsrilu02_numericBoost(cusparseHandle_t handle, csrilu02Info_t info, int enable_boost, double* tol, float* boost_val); + // ROC: ROCSPARSE_EXPORT rocsparse_status rocsparse_dscsrilu0_numeric_boost(rocsparse_handle handle, rocsparse_mat_info info, int enable_boost, const double* boost_tol, const float* boost_val); + // CHECK: status_t = rocsparse_dscsrilu0_numeric_boost(handle_t, csrilu02_info, ienable_boost, &dtol, &boost_val); + status_t = cusparseScsrilu02_numericBoost(handle_t, csrilu02_info, ienable_boost, &dtol, &boost_val); + + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseXcsrilu02_zeroPivot(cusparseHandle_t handle, csrilu02Info_t info, int* position); + // ROC: ROCSPARSE_EXPORT rocsparse_status rocsparse_csrilu0_zero_pivot(rocsparse_handle handle, rocsparse_mat_info info, rocsparse_int* position); + // CHECK: status_t = rocsparse_csrilu0_zero_pivot(handle_t, csrilu02_info, &iposition); + status_t = cusparseXcsrilu02_zeroPivot(handle_t, csrilu02_info, &iposition); + + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseZcsric02(cusparseHandle_t handle, int m, int nnz, const cusparseMatDescr_t descrA, cuDoubleComplex* csrSortedValA_valM, const int* csrSortedRowPtrA, const int* csrSortedColIndA, csric02Info_t info, cusparseSolvePolicy_t policy, void* pBuffer); + // ROC: ROCSPARSE_EXPORT rocsparse_status rocsparse_zcsric0(rocsparse_handle handle, rocsparse_int m, rocsparse_int nnz, const rocsparse_mat_descr descr, rocsparse_double_complex* csr_val, const rocsparse_int* csr_row_ptr, const rocsparse_int* csr_col_ind, rocsparse_mat_info info, rocsparse_solve_policy policy, void* temp_buffer); + // CHECK: status_t = rocsparse_zcsric0(handle_t, m, innz, matDescr_A, &dComplexcsrSortedValA, &csrRowPtrA, &csrColIndA, csric02_info, solvePolicy_t, pBuffer); + status_t = cusparseZcsric02(handle_t, m, innz, matDescr_A, &dComplexcsrSortedValA, &csrRowPtrA, &csrColIndA, csric02_info, solvePolicy_t, pBuffer); + + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseCcsric02(cusparseHandle_t handle, int m, int nnz, const cusparseMatDescr_t descrA, cuComplex* csrSortedValA_valM, const int* csrSortedRowPtrA, const int* csrSortedColIndA, csric02Info_t info, cusparseSolvePolicy_t policy, void* pBuffer); + // ROC: ROCSPARSE_EXPORT rocsparse_status rocsparse_ccsric0(rocsparse_handle handle, rocsparse_int m, rocsparse_int nnz, const rocsparse_mat_descr descr, rocsparse_float_complex* csr_val, const rocsparse_int* csr_row_ptr, const rocsparse_int* csr_col_ind, rocsparse_mat_info info, rocsparse_solve_policy policy, void* temp_buffer); + // CHECK: status_t = rocsparse_ccsric0(handle_t, m, innz, matDescr_A, &complexcsrSortedValA, &csrRowPtrA, &csrColIndA, csric02_info, solvePolicy_t, pBuffer); + status_t = cusparseCcsric02(handle_t, m, innz, matDescr_A, &complexcsrSortedValA, &csrRowPtrA, &csrColIndA, csric02_info, solvePolicy_t, pBuffer); + + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseDcsric02(cusparseHandle_t handle, int m, int nnz, const cusparseMatDescr_t descrA, double* csrSortedValA_valM, const int* csrSortedRowPtrA, const int* csrSortedColIndA, csric02Info_t info, cusparseSolvePolicy_t policy, void* pBuffer); + // ROC: ROCSPARSE_EXPORT rocsparse_status rocsparse_dcsric0(rocsparse_handle handle, rocsparse_int m, rocsparse_int nnz, const rocsparse_mat_descr descr, double* csr_val, const rocsparse_int* csr_row_ptr, const rocsparse_int* csr_col_ind, rocsparse_mat_info info, rocsparse_solve_policy policy, void* temp_buffer); + // CHECK: status_t = rocsparse_dcsric0(handle_t, m, innz, matDescr_A, &dcsrSortedValA, &csrRowPtrA, &csrColIndA, csric02_info, solvePolicy_t, pBuffer); + status_t = cusparseDcsric02(handle_t, m, innz, matDescr_A, &dcsrSortedValA, &csrRowPtrA, &csrColIndA, csric02_info, solvePolicy_t, pBuffer); + + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseScsric02(cusparseHandle_t handle, int m, int nnz, const cusparseMatDescr_t descrA, float* csrSortedValA_valM, const int* csrSortedRowPtrA, const int* csrSortedColIndA, csric02Info_t info, cusparseSolvePolicy_t policy, void* pBuffer); + // ROC: ROCSPARSE_EXPORT rocsparse_status rocsparse_scsric0(rocsparse_handle handle, rocsparse_int m, rocsparse_int nnz, const rocsparse_mat_descr descr, float* csr_val, const rocsparse_int* csr_row_ptr, const rocsparse_int* csr_col_ind, rocsparse_mat_info info, rocsparse_solve_policy policy, void* temp_buffer); + // CHECK: status_t = rocsparse_scsric0(handle_t, m, innz, matDescr_A, &csrSortedValA, &csrRowPtrA, &csrColIndA, csric02_info, solvePolicy_t, pBuffer); + status_t = cusparseScsric02(handle_t, m, innz, matDescr_A, &csrSortedValA, &csrRowPtrA, &csrColIndA, csric02_info, solvePolicy_t, pBuffer); + #if CUDA_VERSION >= 8000 // CHECK: hipDataType dataType_t; // TODO: [#899] There should be rocsparse_datatype