Skip to content

Commit

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

+ Updated synthetic tests and the regenerated hipify-perl and SPARSE docs
  • Loading branch information
emankov committed Sep 12, 2023
1 parent 31e51d6 commit edb8fe0
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 19 deletions.
5 changes: 5 additions & 0 deletions bin/hipify-perl
Original file line number Diff line number Diff line change
Expand Up @@ -1684,6 +1684,7 @@ sub rocSubstitutions {
subst("cusparseCcsrcolor", "rocsparse_ccsrcolor", "library");
subst("cusparseCcsrilu02", "rocsparse_ccsrilu0", "library");
subst("cusparseCcsrilu02_analysis", "rocsparse_ccsrilu0_analysis", "library");
subst("cusparseCcsrilu02_bufferSize", "rocsparse_ccsrilu0_buffer_size", "library");
subst("cusparseCdense2csc", "rocsparse_cdense2csc", "library");
subst("cusparseCdense2csr", "rocsparse_cdense2csr", "library");
subst("cusparseCgebsr2csr", "rocsparse_cgebsr2csr", "library");
Expand Down Expand Up @@ -1736,6 +1737,7 @@ sub rocSubstitutions {
subst("cusparseDcsrcolor", "rocsparse_dcsrcolor", "library");
subst("cusparseDcsrilu02", "rocsparse_dcsrilu0", "library");
subst("cusparseDcsrilu02_analysis", "rocsparse_dcsrilu0_analysis", "library");
subst("cusparseDcsrilu02_bufferSize", "rocsparse_dcsrilu0_buffer_size", "library");
subst("cusparseDdense2csc", "rocsparse_ddense2csc", "library");
subst("cusparseDdense2csr", "rocsparse_ddense2csr", "library");
subst("cusparseDestroy", "rocsparse_destroy_handle", "library");
Expand Down Expand Up @@ -1807,6 +1809,7 @@ sub rocSubstitutions {
subst("cusparseScsrcolor", "rocsparse_scsrcolor", "library");
subst("cusparseScsrilu02", "rocsparse_scsrilu0", "library");
subst("cusparseScsrilu02_analysis", "rocsparse_scsrilu0_analysis", "library");
subst("cusparseScsrilu02_bufferSize", "rocsparse_scsrilu0_buffer_size", "library");
subst("cusparseSdense2csc", "rocsparse_sdense2csc", "library");
subst("cusparseSdense2csr", "rocsparse_sdense2csr", "library");
subst("cusparseSetMatDiagType", "rocsparse_set_mat_diag_type", "library");
Expand Down Expand Up @@ -1881,6 +1884,8 @@ sub rocSubstitutions {
subst("cusparseZcsrcolor", "rocsparse_zcsrcolor", "library");
subst("cusparseZcsrilu02", "rocsparse_zcsrilu0", "library");
subst("cusparseZcsrilu02_analysis", "rocsparse_zcsrilu0_analysis", "library");
subst("cusparseZcsrilu02_bufferSize", "rocsparse_zcsrilu0_buffer_size", "library");
subst("cusparseZcsrilu02_numericBoost", "rocsparse_zcsrilu0_numeric_boost", "library");
subst("cusparseZdense2csc", "rocsparse_zdense2csc", "library");
subst("cusparseZdense2csr", "rocsparse_zdense2csr", "library");
subst("cusparseZgebsr2csr", "rocsparse_zgebsr2csr", "library");
Expand Down
10 changes: 5 additions & 5 deletions docs/tables/CUSPARSE_API_supported_by_HIP_and_ROC.md
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@
|`cusparseCcsrilu0`| |10.2|11.0| | | | | | | | | | |
|`cusparseCcsrilu02`| |12.2| |`hipsparseCcsrilu02`|3.1.0| | | |`rocsparse_ccsrilu0`|2.10.0| | | |
|`cusparseCcsrilu02_analysis`| |12.2| |`hipsparseCcsrilu02_analysis`|3.1.0| | | |`rocsparse_ccsrilu0_analysis`|2.10.0| | | |
|`cusparseCcsrilu02_bufferSize`| |12.2| |`hipsparseCcsrilu02_bufferSize`|3.1.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| | | | | | | | |
|`cusparseCgpsvInterleavedBatch`|9.2| | |`hipsparseCgpsvInterleavedBatch`|5.1.0| | | |`rocsparse_cgpsv_interleaved_batch`|5.1.0| | | |
Expand Down Expand Up @@ -520,7 +520,7 @@
|`cusparseDcsrilu0`| |10.2|11.0| | | | | | | | | | |
|`cusparseDcsrilu02`| |12.2| |`hipsparseDcsrilu02`|1.9.2| | | |`rocsparse_dcsrilu0`|1.9.0| | | |
|`cusparseDcsrilu02_analysis`| |12.2| |`hipsparseDcsrilu02_analysis`|1.9.2| | | |`rocsparse_dcsrilu0_analysis`|1.9.0| | | |
|`cusparseDcsrilu02_bufferSize`| |12.2| |`hipsparseDcsrilu02_bufferSize`|1.9.2| | | | | | | | |
|`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| | | | | | | | |
|`cusparseDgpsvInterleavedBatch`|9.2| | |`hipsparseDgpsvInterleavedBatch`|5.1.0| | | |`rocsparse_dgpsv_interleaved_batch`|5.1.0| | | |
Expand Down Expand Up @@ -553,7 +553,7 @@
|`cusparseScsrilu0`| |10.2|11.0| | | | | | | | | | |
|`cusparseScsrilu02`| |12.2| |`hipsparseScsrilu02`|1.9.2| | | |`rocsparse_scsrilu0`|1.9.0| | | |
|`cusparseScsrilu02_analysis`| |12.2| |`hipsparseScsrilu02_analysis`|1.9.2| | | |`rocsparse_scsrilu0_analysis`|1.9.0| | | |
|`cusparseScsrilu02_bufferSize`| |12.2| |`hipsparseScsrilu02_bufferSize`|1.9.2| | | | | | | | |
|`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| | | | | | | | |
|`cusparseSgpsvInterleavedBatch`|9.2| | |`hipsparseSgpsvInterleavedBatch`|5.1.0| | | |`rocsparse_sgpsv_interleaved_batch`|5.1.0| | | |
Expand Down Expand Up @@ -590,9 +590,9 @@
|`cusparseZcsrilu0`| |10.2|11.0| | | | | | | | | | |
|`cusparseZcsrilu02`| |12.2| |`hipsparseZcsrilu02`|3.1.0| | | |`rocsparse_zcsrilu0`|2.10.0| | | |
|`cusparseZcsrilu02_analysis`| |12.2| |`hipsparseZcsrilu02_analysis`|3.1.0| | | |`rocsparse_zcsrilu0_analysis`|2.10.0| | | |
|`cusparseZcsrilu02_bufferSize`| |12.2| |`hipsparseZcsrilu02_bufferSize`|3.1.0| | | | | | | | |
|`cusparseZcsrilu02_bufferSize`| |12.2| |`hipsparseZcsrilu02_bufferSize`|3.1.0| | | |`rocsparse_zcsrilu0_buffer_size`|2.10.0| | | |
|`cusparseZcsrilu02_bufferSizeExt`| |12.2| |`hipsparseZcsrilu02_bufferSizeExt`|3.1.0| | | | | | | | |
|`cusparseZcsrilu02_numericBoost`| |12.2| |`hipsparseZcsrilu02_numericBoost`|3.10.0| | | | | | | | |
|`cusparseZcsrilu02_numericBoost`| |12.2| |`hipsparseZcsrilu02_numericBoost`|3.10.0| | | |`rocsparse_zcsrilu0_numeric_boost`|3.9.0| | | |
|`cusparseZgpsvInterleavedBatch`|9.2| | |`hipsparseZgpsvInterleavedBatch`|5.1.0| | | |`rocsparse_zgpsv_interleaved_batch`|5.1.0| | | |
|`cusparseZgpsvInterleavedBatch_bufferSizeExt`|9.2| | |`hipsparseZgpsvInterleavedBatch_bufferSizeExt`|5.1.0| | | |`rocsparse_zgpsv_interleaved_batch_buffer_size`|5.1.0| | | |
|`cusparseZgtsv`| |10.2|11.0| | | | | | | | | | |
Expand Down
10 changes: 5 additions & 5 deletions docs/tables/CUSPARSE_API_supported_by_ROC.md
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@
|`cusparseCcsrilu0`| |10.2|11.0| | | | | |
|`cusparseCcsrilu02`| |12.2| |`rocsparse_ccsrilu0`|2.10.0| | | |
|`cusparseCcsrilu02_analysis`| |12.2| |`rocsparse_ccsrilu0_analysis`|2.10.0| | | |
|`cusparseCcsrilu02_bufferSize`| |12.2| | | | | | |
|`cusparseCcsrilu02_bufferSize`| |12.2| |`rocsparse_ccsrilu0_buffer_size`|2.10.0| | | |
|`cusparseCcsrilu02_bufferSizeExt`| |12.2| | | | | | |
|`cusparseCcsrilu02_numericBoost`| |12.2| | | | | | |
|`cusparseCgpsvInterleavedBatch`|9.2| | |`rocsparse_cgpsv_interleaved_batch`|5.1.0| | | |
Expand Down Expand Up @@ -520,7 +520,7 @@
|`cusparseDcsrilu0`| |10.2|11.0| | | | | |
|`cusparseDcsrilu02`| |12.2| |`rocsparse_dcsrilu0`|1.9.0| | | |
|`cusparseDcsrilu02_analysis`| |12.2| |`rocsparse_dcsrilu0_analysis`|1.9.0| | | |
|`cusparseDcsrilu02_bufferSize`| |12.2| | | | | | |
|`cusparseDcsrilu02_bufferSize`| |12.2| |`rocsparse_dcsrilu0_buffer_size`|1.9.0| | | |
|`cusparseDcsrilu02_bufferSizeExt`| |12.2| | | | | | |
|`cusparseDcsrilu02_numericBoost`| |12.2| | | | | | |
|`cusparseDgpsvInterleavedBatch`|9.2| | |`rocsparse_dgpsv_interleaved_batch`|5.1.0| | | |
Expand Down Expand Up @@ -553,7 +553,7 @@
|`cusparseScsrilu0`| |10.2|11.0| | | | | |
|`cusparseScsrilu02`| |12.2| |`rocsparse_scsrilu0`|1.9.0| | | |
|`cusparseScsrilu02_analysis`| |12.2| |`rocsparse_scsrilu0_analysis`|1.9.0| | | |
|`cusparseScsrilu02_bufferSize`| |12.2| | | | | | |
|`cusparseScsrilu02_bufferSize`| |12.2| |`rocsparse_scsrilu0_buffer_size`|1.9.0| | | |
|`cusparseScsrilu02_bufferSizeExt`| |12.2| | | | | | |
|`cusparseScsrilu02_numericBoost`| |12.2| | | | | | |
|`cusparseSgpsvInterleavedBatch`|9.2| | |`rocsparse_sgpsv_interleaved_batch`|5.1.0| | | |
Expand Down Expand Up @@ -590,9 +590,9 @@
|`cusparseZcsrilu0`| |10.2|11.0| | | | | |
|`cusparseZcsrilu02`| |12.2| |`rocsparse_zcsrilu0`|2.10.0| | | |
|`cusparseZcsrilu02_analysis`| |12.2| |`rocsparse_zcsrilu0_analysis`|2.10.0| | | |
|`cusparseZcsrilu02_bufferSize`| |12.2| | | | | | |
|`cusparseZcsrilu02_bufferSize`| |12.2| |`rocsparse_zcsrilu0_buffer_size`|2.10.0| | | |
|`cusparseZcsrilu02_bufferSizeExt`| |12.2| | | | | | |
|`cusparseZcsrilu02_numericBoost`| |12.2| | | | | | |
|`cusparseZcsrilu02_numericBoost`| |12.2| |`rocsparse_zcsrilu0_numeric_boost`|3.9.0| | | |
|`cusparseZgpsvInterleavedBatch`|9.2| | |`rocsparse_zgpsv_interleaved_batch`|5.1.0| | | |
|`cusparseZgpsvInterleavedBatch_bufferSizeExt`|9.2| | |`rocsparse_zgpsv_interleaved_batch_buffer_size`|5.1.0| | | |
|`cusparseZgtsv`| |10.2|11.0| | | | | |
Expand Down
15 changes: 10 additions & 5 deletions src/CUDA2HIP_SPARSE_API_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,15 +375,15 @@ const std::map<llvm::StringRef, hipCounter> CUDA_SPARSE_FUNCTION_MAP {
{"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}},
{"cusparseZcsrilu02_numericBoost", {"hipsparseZcsrilu02_numericBoost", "", CONV_LIB_FUNC, API_SPARSE, 12, ROC_UNSUPPORTED | CUDA_DEPRECATED}},
{"cusparseZcsrilu02_numericBoost", {"hipsparseZcsrilu02_numericBoost", "rocsparse_zcsrilu0_numeric_boost", CONV_LIB_FUNC, API_SPARSE, 12, CUDA_DEPRECATED}},

{"cusparseScsrilu02_bufferSize", {"hipsparseScsrilu02_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, 12, ROC_UNSUPPORTED | CUDA_DEPRECATED}},
{"cusparseScsrilu02_bufferSize", {"hipsparseScsrilu02_bufferSize", "rocsparse_scsrilu0_buffer_size", CONV_LIB_FUNC, API_SPARSE, 12, CUDA_DEPRECATED}},
{"cusparseScsrilu02_bufferSizeExt", {"hipsparseScsrilu02_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, 12, ROC_UNSUPPORTED | CUDA_DEPRECATED}},
{"cusparseDcsrilu02_bufferSize", {"hipsparseDcsrilu02_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, 12, ROC_UNSUPPORTED | CUDA_DEPRECATED}},
{"cusparseDcsrilu02_bufferSize", {"hipsparseDcsrilu02_bufferSize", "rocsparse_dcsrilu0_buffer_size", CONV_LIB_FUNC, API_SPARSE, 12, CUDA_DEPRECATED}},
{"cusparseDcsrilu02_bufferSizeExt", {"hipsparseDcsrilu02_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, 12, ROC_UNSUPPORTED | CUDA_DEPRECATED}},
{"cusparseCcsrilu02_bufferSize", {"hipsparseCcsrilu02_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, 12, ROC_UNSUPPORTED | CUDA_DEPRECATED}},
{"cusparseCcsrilu02_bufferSize", {"hipsparseCcsrilu02_bufferSize", "rocsparse_ccsrilu0_buffer_size", CONV_LIB_FUNC, API_SPARSE, 12, CUDA_DEPRECATED}},
{"cusparseCcsrilu02_bufferSizeExt", {"hipsparseCcsrilu02_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, 12, ROC_UNSUPPORTED | CUDA_DEPRECATED}},
{"cusparseZcsrilu02_bufferSize", {"hipsparseZcsrilu02_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, 12, ROC_UNSUPPORTED | CUDA_DEPRECATED}},
{"cusparseZcsrilu02_bufferSize", {"hipsparseZcsrilu02_bufferSize", "rocsparse_zcsrilu0_buffer_size", CONV_LIB_FUNC, API_SPARSE, 12, CUDA_DEPRECATED}},
{"cusparseZcsrilu02_bufferSizeExt", {"hipsparseZcsrilu02_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, 12, ROC_UNSUPPORTED | CUDA_DEPRECATED}},

{"cusparseScsrilu02_analysis", {"hipsparseScsrilu02_analysis", "rocsparse_scsrilu0_analysis", CONV_LIB_FUNC, API_SPARSE, 12, CUDA_DEPRECATED}},
Expand Down Expand Up @@ -2183,6 +2183,11 @@ const std::map<llvm::StringRef, hipAPIversions> HIP_SPARSE_FUNCTION_VER_MAP {
{"rocsparse_ccsrilu0_analysis", {HIP_2100, HIP_0, HIP_0 }},
{"rocsparse_dcsrilu0_analysis", {HIP_1090, HIP_0, HIP_0 }},
{"rocsparse_scsrilu0_analysis", {HIP_1090, HIP_0, HIP_0 }},
{"rocsparse_zcsrilu0_buffer_size", {HIP_2100, HIP_0, HIP_0 }},
{"rocsparse_ccsrilu0_buffer_size", {HIP_2100, HIP_0, HIP_0 }},
{"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 }},
};

const std::map<unsigned int, llvm::StringRef> CUDA_SPARSE_API_SECTION_MAP {
Expand Down
Loading

0 comments on commit edb8fe0

Please sign in to comment.