Skip to content

Commit

Permalink
[HIPIFY][ROCm#675][ROCm#677][SOLVER][feature] cuSOLVER support - St…
Browse files Browse the repository at this point in the history
…ep 54 - Functions (SP)

+ All `SP` APIs are not supported by both `hipSOLVER` and `rocSOLVER`
+ Updated the regenerated `hipify-perl`, and `SOLVER` `CUDA2HIP` documentation
  • Loading branch information
emankov committed Dec 22, 2023
1 parent bee1635 commit da5e977
Show file tree
Hide file tree
Showing 6 changed files with 166 additions and 0 deletions.
33 changes: 33 additions & 0 deletions bin/hipify-perl
Original file line number Diff line number Diff line change
Expand Up @@ -7659,6 +7659,37 @@ sub warnUnsupportedFunctions {
"cusparseBsrSetStridedBatch",
"cusparseAlgMode_t",
"cusolverStorevMode_t",
"cusolverSpZcsrlsvqrHost",
"cusolverSpZcsrlsvqr",
"cusolverSpZcsrlsvluHost",
"cusolverSpZcsrlsvcholHost",
"cusolverSpZcsrlsvchol",
"cusolverSpZcsrlsqvqrHost",
"cusolverSpXcsrissymHost",
"cusolverSpSetStream",
"cusolverSpScsrlsvqrHost",
"cusolverSpScsrlsvqr",
"cusolverSpScsrlsvluHost",
"cusolverSpScsrlsvcholHost",
"cusolverSpScsrlsvchol",
"cusolverSpScsrlsqvqrHost",
"cusolverSpHandle_t",
"cusolverSpGetStream",
"cusolverSpDestroy",
"cusolverSpDcsrlsvqrHost",
"cusolverSpDcsrlsvqr",
"cusolverSpDcsrlsvluHost",
"cusolverSpDcsrlsvcholHost",
"cusolverSpDcsrlsvchol",
"cusolverSpDcsrlsqvqrHost",
"cusolverSpCreate",
"cusolverSpContext",
"cusolverSpCcsrlsvqrHost",
"cusolverSpCcsrlsvqr",
"cusolverSpCcsrlsvluHost",
"cusolverSpCcsrlsvcholHost",
"cusolverSpCcsrlsvchol",
"cusolverSpCcsrlsqvqrHost",
"cusolverRfGetAlgs",
"cusolverRfCommon",
"cusolverPrecType_t",
Expand Down Expand Up @@ -8855,6 +8886,8 @@ sub warnUnsupportedFunctions {
"cuArrayGetMemoryRequirements",
"csrsv2Info",
"csrsm2Info",
"csrqrInfo_t",
"csrqrInfo",
"cl_event_flags_enum",
"cl_event_flags",
"cl_context_flags_enum",
Expand Down
33 changes: 33 additions & 0 deletions docs/tables/CUSOLVER_API_supported_by_HIP.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@
|`CUSOLVER_STATUS_NOT_SUPPORTED`| | | | |`HIPSOLVER_STATUS_NOT_SUPPORTED`|4.5.0| | | |6.1.0|
|`CUSOLVER_STATUS_SUCCESS`| | | | |`HIPSOLVER_STATUS_SUCCESS`|4.5.0| | | |6.1.0|
|`CUSOLVER_STATUS_ZERO_PIVOT`| | | | |`HIPSOLVER_STATUS_ZERO_PIVOT`|5.6.0| | | |6.1.0|
|`csrqrInfo`| | | | | | | | | | |
|`csrqrInfo_t`| | | | | | | | | | |
|`cudaLibMgGrid_t`|10.1| | | | | | | | | |
|`cudaLibMgMatrixDesc_t`|10.1| | | | | | | | | |
|`cusolverAlgMode_t`|11.0| | | | | | | | | |
Expand Down Expand Up @@ -128,6 +130,8 @@
|`cusolverRfResetValuesFastMode_t`| | | | |`hipsolverRfResetValuesFastMode_t`|5.6.0| | | |6.1.0|
|`cusolverRfTriangularSolve_t`| | | | |`hipsolverRfTriangularSolve_t`|5.6.0| | | |6.1.0|
|`cusolverRfUnitDiagonal_t`| | | | |`hipsolverRfUnitDiagonal_t`|5.6.0| | | |6.1.0|
|`cusolverSpContext`| | | | | | | | | | |
|`cusolverSpHandle_t`| | | | | | | | | | |
|`cusolverStatus_t`| | | | |`hipsolverStatus_t`|4.5.0| | | |6.1.0|
|`cusolverStorevMode_t`|11.0| | | | | | | | | |
|`cusolver_int_t`|10.1| | | |`int`| | | | | |
Expand Down Expand Up @@ -565,6 +569,35 @@
|`cusolverRfSetupDevice`| | | | |`hipsolverRfSetupDevice`|5.6.0| | | |6.1.0|
|`cusolverRfSetupHost`| | | | |`hipsolverRfSetupHost`|5.6.0| | | |6.1.0|
|`cusolverRfSolve`| | | | |`hipsolverRfSolve`|5.6.0| | | |6.1.0|
|`cusolverSpCcsrlsqvqrHost`| | | | | | | | | | |
|`cusolverSpCcsrlsvchol`| | | | | | | | | | |
|`cusolverSpCcsrlsvcholHost`| | | | | | | | | | |
|`cusolverSpCcsrlsvluHost`| | | | | | | | | | |
|`cusolverSpCcsrlsvqr`| | | | | | | | | | |
|`cusolverSpCcsrlsvqrHost`| | | | | | | | | | |
|`cusolverSpCreate`| | | | | | | | | | |
|`cusolverSpDcsrlsqvqrHost`| | | | | | | | | | |
|`cusolverSpDcsrlsvchol`| | | | | | | | | | |
|`cusolverSpDcsrlsvcholHost`| | | | | | | | | | |
|`cusolverSpDcsrlsvluHost`| | | | | | | | | | |
|`cusolverSpDcsrlsvqr`| | | | | | | | | | |
|`cusolverSpDcsrlsvqrHost`| | | | | | | | | | |
|`cusolverSpDestroy`| | | | | | | | | | |
|`cusolverSpGetStream`| | | | | | | | | | |
|`cusolverSpScsrlsqvqrHost`| | | | | | | | | | |
|`cusolverSpScsrlsvchol`| | | | | | | | | | |
|`cusolverSpScsrlsvcholHost`| | | | | | | | | | |
|`cusolverSpScsrlsvluHost`| | | | | | | | | | |
|`cusolverSpScsrlsvqr`| | | | | | | | | | |
|`cusolverSpScsrlsvqrHost`| | | | | | | | | | |
|`cusolverSpSetStream`| | | | | | | | | | |
|`cusolverSpXcsrissymHost`| | | | | | | | | | |
|`cusolverSpZcsrlsqvqrHost`| | | | | | | | | | |
|`cusolverSpZcsrlsvchol`| | | | | | | | | | |
|`cusolverSpZcsrlsvcholHost`| | | | | | | | | | |
|`cusolverSpZcsrlsvluHost`| | | | | | | | | | |
|`cusolverSpZcsrlsvqr`| | | | | | | | | | |
|`cusolverSpZcsrlsvqrHost`| | | | | | | | | | |


\*A - Added; D - Deprecated; C - Changed; R - Removed; E - Experimental
33 changes: 33 additions & 0 deletions docs/tables/CUSOLVER_API_supported_by_HIP_and_ROC.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@
|`CUSOLVER_STATUS_NOT_SUPPORTED`| | | | |`HIPSOLVER_STATUS_NOT_SUPPORTED`|4.5.0| | | |6.1.0|`rocblas_status_not_implemented`|1.5.0| | | |6.1.0|
|`CUSOLVER_STATUS_SUCCESS`| | | | |`HIPSOLVER_STATUS_SUCCESS`|4.5.0| | | |6.1.0|`rocblas_status_success`|3.0.0| | | |6.1.0|
|`CUSOLVER_STATUS_ZERO_PIVOT`| | | | |`HIPSOLVER_STATUS_ZERO_PIVOT`|5.6.0| | | |6.1.0|`rocblas_status_not_implemented`|1.5.0| | | |6.1.0|
|`csrqrInfo`| | | | | | | | | | | | | | | | |
|`csrqrInfo_t`| | | | | | | | | | | | | | | | |
|`cudaLibMgGrid_t`|10.1| | | | | | | | | | | | | | | |
|`cudaLibMgMatrixDesc_t`|10.1| | | | | | | | | | | | | | | |
|`cusolverAlgMode_t`|11.0| | | | | | | | | | | | | | | |
Expand Down Expand Up @@ -128,6 +130,8 @@
|`cusolverRfResetValuesFastMode_t`| | | | |`hipsolverRfResetValuesFastMode_t`|5.6.0| | | |6.1.0| | | | | | |
|`cusolverRfTriangularSolve_t`| | | | |`hipsolverRfTriangularSolve_t`|5.6.0| | | |6.1.0| | | | | | |
|`cusolverRfUnitDiagonal_t`| | | | |`hipsolverRfUnitDiagonal_t`|5.6.0| | | |6.1.0| | | | | | |
|`cusolverSpContext`| | | | | | | | | | | | | | | | |
|`cusolverSpHandle_t`| | | | | | | | | | | | | | | | |
|`cusolverStatus_t`| | | | |`hipsolverStatus_t`|4.5.0| | | |6.1.0|`rocblas_status`|3.0.0| | | |6.1.0|
|`cusolverStorevMode_t`|11.0| | | | | | | | | | | | | | | |
|`cusolver_int_t`|10.1| | | |`int`| | | | | |`rocblas_int`|3.0.0| | | |6.1.0|
Expand Down Expand Up @@ -565,6 +569,35 @@
|`cusolverRfSetupDevice`| | | | |`hipsolverRfSetupDevice`|5.6.0| | | |6.1.0| | | | | | |
|`cusolverRfSetupHost`| | | | |`hipsolverRfSetupHost`|5.6.0| | | |6.1.0| | | | | | |
|`cusolverRfSolve`| | | | |`hipsolverRfSolve`|5.6.0| | | |6.1.0| | | | | | |
|`cusolverSpCcsrlsqvqrHost`| | | | | | | | | | | | | | | | |
|`cusolverSpCcsrlsvchol`| | | | | | | | | | | | | | | | |
|`cusolverSpCcsrlsvcholHost`| | | | | | | | | | | | | | | | |
|`cusolverSpCcsrlsvluHost`| | | | | | | | | | | | | | | | |
|`cusolverSpCcsrlsvqr`| | | | | | | | | | | | | | | | |
|`cusolverSpCcsrlsvqrHost`| | | | | | | | | | | | | | | | |
|`cusolverSpCreate`| | | | | | | | | | | | | | | | |
|`cusolverSpDcsrlsqvqrHost`| | | | | | | | | | | | | | | | |
|`cusolverSpDcsrlsvchol`| | | | | | | | | | | | | | | | |
|`cusolverSpDcsrlsvcholHost`| | | | | | | | | | | | | | | | |
|`cusolverSpDcsrlsvluHost`| | | | | | | | | | | | | | | | |
|`cusolverSpDcsrlsvqr`| | | | | | | | | | | | | | | | |
|`cusolverSpDcsrlsvqrHost`| | | | | | | | | | | | | | | | |
|`cusolverSpDestroy`| | | | | | | | | | | | | | | | |
|`cusolverSpGetStream`| | | | | | | | | | | | | | | | |
|`cusolverSpScsrlsqvqrHost`| | | | | | | | | | | | | | | | |
|`cusolverSpScsrlsvchol`| | | | | | | | | | | | | | | | |
|`cusolverSpScsrlsvcholHost`| | | | | | | | | | | | | | | | |
|`cusolverSpScsrlsvluHost`| | | | | | | | | | | | | | | | |
|`cusolverSpScsrlsvqr`| | | | | | | | | | | | | | | | |
|`cusolverSpScsrlsvqrHost`| | | | | | | | | | | | | | | | |
|`cusolverSpSetStream`| | | | | | | | | | | | | | | | |
|`cusolverSpXcsrissymHost`| | | | | | | | | | | | | | | | |
|`cusolverSpZcsrlsqvqrHost`| | | | | | | | | | | | | | | | |
|`cusolverSpZcsrlsvchol`| | | | | | | | | | | | | | | | |
|`cusolverSpZcsrlsvcholHost`| | | | | | | | | | | | | | | | |
|`cusolverSpZcsrlsvluHost`| | | | | | | | | | | | | | | | |
|`cusolverSpZcsrlsvqr`| | | | | | | | | | | | | | | | |
|`cusolverSpZcsrlsvqrHost`| | | | | | | | | | | | | | | | |


\*A - Added; D - Deprecated; C - Changed; R - Removed; E - Experimental
33 changes: 33 additions & 0 deletions docs/tables/CUSOLVER_API_supported_by_ROC.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@
|`CUSOLVER_STATUS_NOT_SUPPORTED`| | | | |`rocblas_status_not_implemented`|1.5.0| | | |6.1.0|
|`CUSOLVER_STATUS_SUCCESS`| | | | |`rocblas_status_success`|3.0.0| | | |6.1.0|
|`CUSOLVER_STATUS_ZERO_PIVOT`| | | | |`rocblas_status_not_implemented`|1.5.0| | | |6.1.0|
|`csrqrInfo`| | | | | | | | | | |
|`csrqrInfo_t`| | | | | | | | | | |
|`cudaLibMgGrid_t`|10.1| | | | | | | | | |
|`cudaLibMgMatrixDesc_t`|10.1| | | | | | | | | |
|`cusolverAlgMode_t`|11.0| | | | | | | | | |
Expand Down Expand Up @@ -128,6 +130,8 @@
|`cusolverRfResetValuesFastMode_t`| | | | | | | | | | |
|`cusolverRfTriangularSolve_t`| | | | | | | | | | |
|`cusolverRfUnitDiagonal_t`| | | | | | | | | | |
|`cusolverSpContext`| | | | | | | | | | |
|`cusolverSpHandle_t`| | | | | | | | | | |
|`cusolverStatus_t`| | | | |`rocblas_status`|3.0.0| | | |6.1.0|
|`cusolverStorevMode_t`|11.0| | | | | | | | | |
|`cusolver_int_t`|10.1| | | |`rocblas_int`|3.0.0| | | |6.1.0|
Expand Down Expand Up @@ -565,6 +569,35 @@
|`cusolverRfSetupDevice`| | | | | | | | | | |
|`cusolverRfSetupHost`| | | | | | | | | | |
|`cusolverRfSolve`| | | | | | | | | | |
|`cusolverSpCcsrlsqvqrHost`| | | | | | | | | | |
|`cusolverSpCcsrlsvchol`| | | | | | | | | | |
|`cusolverSpCcsrlsvcholHost`| | | | | | | | | | |
|`cusolverSpCcsrlsvluHost`| | | | | | | | | | |
|`cusolverSpCcsrlsvqr`| | | | | | | | | | |
|`cusolverSpCcsrlsvqrHost`| | | | | | | | | | |
|`cusolverSpCreate`| | | | | | | | | | |
|`cusolverSpDcsrlsqvqrHost`| | | | | | | | | | |
|`cusolverSpDcsrlsvchol`| | | | | | | | | | |
|`cusolverSpDcsrlsvcholHost`| | | | | | | | | | |
|`cusolverSpDcsrlsvluHost`| | | | | | | | | | |
|`cusolverSpDcsrlsvqr`| | | | | | | | | | |
|`cusolverSpDcsrlsvqrHost`| | | | | | | | | | |
|`cusolverSpDestroy`| | | | | | | | | | |
|`cusolverSpGetStream`| | | | | | | | | | |
|`cusolverSpScsrlsqvqrHost`| | | | | | | | | | |
|`cusolverSpScsrlsvchol`| | | | | | | | | | |
|`cusolverSpScsrlsvcholHost`| | | | | | | | | | |
|`cusolverSpScsrlsvluHost`| | | | | | | | | | |
|`cusolverSpScsrlsvqr`| | | | | | | | | | |
|`cusolverSpScsrlsvqrHost`| | | | | | | | | | |
|`cusolverSpSetStream`| | | | | | | | | | |
|`cusolverSpXcsrissymHost`| | | | | | | | | | |
|`cusolverSpZcsrlsqvqrHost`| | | | | | | | | | |
|`cusolverSpZcsrlsvchol`| | | | | | | | | | |
|`cusolverSpZcsrlsvcholHost`| | | | | | | | | | |
|`cusolverSpZcsrlsvluHost`| | | | | | | | | | |
|`cusolverSpZcsrlsvqr`| | | | | | | | | | |
|`cusolverSpZcsrlsvqrHost`| | | | | | | | | | |


\*A - Added; D - Deprecated; C - Changed; R - Removed; E - Experimental
30 changes: 30 additions & 0 deletions src/CUDA2HIP_SOLVER_API_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,36 @@ const std::map<llvm::StringRef, hipCounter> CUDA_SOLVER_FUNCTION_MAP {
{"cusolverRfBatchSolve", {"hipsolverRfBatchSolve", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
// no ROC analogues
{"cusolverRfBatchZeroPivot", {"hipsolverRfBatchZeroPivot", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},

{"cusolverSpCreate", {"hipsolverSpCreate", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverSpDestroy", {"hipsolverSpDestroy", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverSpSetStream", {"hipsolverSpSetStream", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverSpGetStream", {"hipsolverSpGetStream", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverSpXcsrissymHost", {"hipsolverSpXcsrissymHost", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverSpScsrlsvluHost", {"hipsolverSpScsrlsvluHost", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverSpDcsrlsvluHost", {"hipsolverSpDcsrlsvluHost", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverSpCcsrlsvluHost", {"hipsolverSpCcsrlsvluHost", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverSpZcsrlsvluHost", {"hipsolverSpZcsrlsvluHost", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverSpScsrlsvqr", {"hipsolverSpScsrlsvqr", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverSpDcsrlsvqr", {"hipsolverSpDcsrlsvqr", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverSpCcsrlsvqr", {"hipsolverSpCcsrlsvqr", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverSpZcsrlsvqr", {"hipsolverSpZcsrlsvqr", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverSpScsrlsvqrHost", {"hipsolverSpScsrlsvqrHost", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverSpDcsrlsvqrHost", {"hipsolverSpDcsrlsvqrHost", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverSpCcsrlsvqrHost", {"hipsolverSpCcsrlsvqrHost", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverSpZcsrlsvqrHost", {"hipsolverSpZcsrlsvqrHost", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverSpScsrlsvcholHost", {"hipsolverSpScsrlsvcholHost", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverSpDcsrlsvcholHost", {"hipsolverSpDcsrlsvcholHost", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverSpCcsrlsvcholHost", {"hipsolverSpCcsrlsvcholHost", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverSpZcsrlsvcholHost", {"hipsolverSpZcsrlsvcholHost", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverSpScsrlsvchol", {"hipsolverSpScsrlsvchol", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverSpDcsrlsvchol", {"hipsolverSpDcsrlsvchol", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverSpCcsrlsvchol", {"hipsolverSpCcsrlsvchol", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverSpZcsrlsvchol", {"hipsolverSpZcsrlsvchol", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverSpScsrlsqvqrHost", {"hipsolverSpScsrlsqvqrHost", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverSpDcsrlsqvqrHost", {"hipsolverSpDcsrlsqvqrHost", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverSpCcsrlsqvqrHost", {"hipsolverSpCcsrlsqvqrHost", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverSpZcsrlsqvqrHost", {"hipsolverSpZcsrlsqvqrHost", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
};

const std::map<llvm::StringRef, cudaAPIversions> CUDA_SOLVER_FUNCTION_VER_MAP {
Expand Down
4 changes: 4 additions & 0 deletions src/CUDA2HIP_SOLVER_API_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ const std::map<llvm::StringRef, hipCounter> CUDA_SOLVER_TYPE_NAME_MAP {
{"CUSOLVERRF_NUMERIC_BOOST_USED", {"HIPSOLVERRF_NUMERIC_BOOST_USED", "", CONV_NUMERIC_LITERAL, API_SOLVER, 1, ROC_UNSUPPORTED}},
{"cusolverRfCommon", {"hipsolverRfCommon", "", CONV_TYPE, API_SOLVER, 1, UNSUPPORTED}},
{"cusolverRfHandle_t", {"hipsolverRfHandle_t", "", CONV_TYPE, API_SOLVER, 1, ROC_UNSUPPORTED}},
{"cusolverSpContext", {"hipsolverSpContext", "", CONV_TYPE, API_SOLVER, 1, UNSUPPORTED}},
{"cusolverSpHandle_t", {"hipsolverSpHandle_t", "", CONV_TYPE, API_SOLVER, 1, UNSUPPORTED}},
{"csrqrInfo", {"hipsolvercsrqrInfo", "", CONV_TYPE, API_SOLVER, 1, UNSUPPORTED}},
{"csrqrInfo_t", {"hipsolvercsrqrInfo_t", "", CONV_TYPE, API_SOLVER, 1, UNSUPPORTED}},
};

const std::map<llvm::StringRef, cudaAPIversions> CUDA_SOLVER_TYPE_NAME_VER_MAP {
Expand Down

0 comments on commit da5e977

Please sign in to comment.