Skip to content

Commit

Permalink
[HIPIFY][#675][#677][SOLVER][feature] cuSOLVER support - Step 52 - …
Browse files Browse the repository at this point in the history
…Functions (RF)

+ Updated `SOLVER` synthetic tests, the regenerated `hipify-perl`, and `SOLVER` `CUDA2HIP` documentation
  • Loading branch information
emankov committed Dec 21, 2023
1 parent 888cad1 commit c19ae44
Show file tree
Hide file tree
Showing 6 changed files with 188 additions and 0 deletions.
27 changes: 27 additions & 0 deletions bin/hipify-perl
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,19 @@ my %removed_funcs = (

my %experimental_funcs = (
"cusolverStatus_t" => "6.1.0",
"cusolverRfSetupHost" => "6.1.0",
"cusolverRfSetupDevice" => "6.1.0",
"cusolverRfSetResetValuesFastMode" => "6.1.0",
"cusolverRfSetNumericProperties" => "6.1.0",
"cusolverRfSetMatrixFormat" => "6.1.0",
"cusolverRfSetAlgs" => "6.1.0",
"cusolverRfResetValues" => "6.1.0",
"cusolverRfGetResetValuesFastMode" => "6.1.0",
"cusolverRfGetNumericProperties" => "6.1.0",
"cusolverRfGetNumericBoostReport" => "6.1.0",
"cusolverRfGetMatrixFormat" => "6.1.0",
"cusolverRfDestroy" => "6.1.0",
"cusolverRfCreate" => "6.1.0",
"cusolverEigType_t" => "6.1.0",
"cusolverEigRange_t" => "6.1.0",
"cusolverEigMode_t" => "6.1.0",
Expand Down Expand Up @@ -1704,6 +1717,19 @@ sub experimentalSubstitutions {
subst("cusolverDnZunmqr_bufferSize", "hipsolverDnZunmqr_bufferSize", "library");
subst("cusolverDnZunmtr", "hipsolverDnZunmtr", "library");
subst("cusolverDnZunmtr_bufferSize", "hipsolverDnZunmtr_bufferSize", "library");
subst("cusolverRfCreate", "hipsolverRfCreate", "library");
subst("cusolverRfDestroy", "hipsolverRfDestroy", "library");
subst("cusolverRfGetMatrixFormat", "hipsolverRfGetMatrixFormat", "library");
subst("cusolverRfGetNumericBoostReport", "hipsolverRfGetNumericBoostReport", "library");
subst("cusolverRfGetNumericProperties", "hipsolverRfGetNumericProperties", "library");
subst("cusolverRfGetResetValuesFastMode", "hipsolverRfGetResetValuesFastMode", "library");
subst("cusolverRfResetValues", "hipsolverRfResetValues", "library");
subst("cusolverRfSetAlgs", "hipsolverRfSetAlgs", "library");
subst("cusolverRfSetMatrixFormat", "hipsolverRfSetMatrixFormat", "library");
subst("cusolverRfSetNumericProperties", "hipsolverRfSetNumericProperties", "library");
subst("cusolverRfSetResetValuesFastMode", "hipsolverRfSetResetValuesFastMode", "library");
subst("cusolverRfSetupDevice", "hipsolverRfSetupDevice", "library");
subst("cusolverRfSetupHost", "hipsolverRfSetupHost", "library");
subst("cusolverDnHandle_t", "hipsolverHandle_t", "type");
subst("cusolverEigMode_t", "hipsolverEigMode_t", "type");
subst("cusolverEigRange_t", "hipsolverEigRange_t", "type");
Expand Down Expand Up @@ -7608,6 +7634,7 @@ sub warnUnsupportedFunctions {
"cusparseBsrSetStridedBatch",
"cusparseAlgMode_t",
"cusolverStorevMode_t",
"cusolverRfGetAlgs",
"cusolverRfCommon",
"cusolverPrecType_t",
"cusolverNorm_t",
Expand Down
14 changes: 14 additions & 0 deletions docs/tables/CUSOLVER_API_supported_by_HIP.md
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,20 @@
|`cusolverMgPotrs_bufferSize`|11.0| | | | | | | | | |
|`cusolverMgSyevd`|10.1| | | | | | | | | |
|`cusolverMgSyevd_bufferSize`|10.1| | | | | | | | | |
|`cusolverRfCreate`| | | | |`hipsolverRfCreate`|5.6.0| | | |6.1.0|
|`cusolverRfDestroy`| | | | |`hipsolverRfDestroy`|5.6.0| | | |6.1.0|
|`cusolverRfGetAlgs`| | | | | | | | | | |
|`cusolverRfGetMatrixFormat`| | | | |`hipsolverRfGetMatrixFormat`|5.6.0| | | |6.1.0|
|`cusolverRfGetNumericBoostReport`| | | | |`hipsolverRfGetNumericBoostReport`|5.6.0| | | |6.1.0|
|`cusolverRfGetNumericProperties`| | | | |`hipsolverRfGetNumericProperties`|5.6.0| | | |6.1.0|
|`cusolverRfGetResetValuesFastMode`| | | | |`hipsolverRfGetResetValuesFastMode`|5.6.0| | | |6.1.0|
|`cusolverRfResetValues`| | | | |`hipsolverRfResetValues`|5.6.0| | | |6.1.0|
|`cusolverRfSetAlgs`| | | | |`hipsolverRfSetAlgs`|5.6.0| | | |6.1.0|
|`cusolverRfSetMatrixFormat`| | | | |`hipsolverRfSetMatrixFormat`|5.6.0| | | |6.1.0|
|`cusolverRfSetNumericProperties`| | | | |`hipsolverRfSetNumericProperties`|5.6.0| | | |6.1.0|
|`cusolverRfSetResetValuesFastMode`| | | | |`hipsolverRfSetResetValuesFastMode`|5.6.0| | | |6.1.0|
|`cusolverRfSetupDevice`| | | | |`hipsolverRfSetupDevice`|5.6.0| | | |6.1.0|
|`cusolverRfSetupHost`| | | | |`hipsolverRfSetupHost`|5.6.0| | | |6.1.0|


\*A - Added; D - Deprecated; C - Changed; R - Removed; E - Experimental
14 changes: 14 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 @@ -539,6 +539,20 @@
|`cusolverMgPotrs_bufferSize`|11.0| | | | | | | | | | | | | | | |
|`cusolverMgSyevd`|10.1| | | | | | | | | | | | | | | |
|`cusolverMgSyevd_bufferSize`|10.1| | | | | | | | | | | | | | | |
|`cusolverRfCreate`| | | | |`hipsolverRfCreate`|5.6.0| | | |6.1.0| | | | | | |
|`cusolverRfDestroy`| | | | |`hipsolverRfDestroy`|5.6.0| | | |6.1.0| | | | | | |
|`cusolverRfGetAlgs`| | | | | | | | | | | | | | | | |
|`cusolverRfGetMatrixFormat`| | | | |`hipsolverRfGetMatrixFormat`|5.6.0| | | |6.1.0| | | | | | |
|`cusolverRfGetNumericBoostReport`| | | | |`hipsolverRfGetNumericBoostReport`|5.6.0| | | |6.1.0| | | | | | |
|`cusolverRfGetNumericProperties`| | | | |`hipsolverRfGetNumericProperties`|5.6.0| | | |6.1.0| | | | | | |
|`cusolverRfGetResetValuesFastMode`| | | | |`hipsolverRfGetResetValuesFastMode`|5.6.0| | | |6.1.0| | | | | | |
|`cusolverRfResetValues`| | | | |`hipsolverRfResetValues`|5.6.0| | | |6.1.0| | | | | | |
|`cusolverRfSetAlgs`| | | | |`hipsolverRfSetAlgs`|5.6.0| | | |6.1.0| | | | | | |
|`cusolverRfSetMatrixFormat`| | | | |`hipsolverRfSetMatrixFormat`|5.6.0| | | |6.1.0| | | | | | |
|`cusolverRfSetNumericProperties`| | | | |`hipsolverRfSetNumericProperties`|5.6.0| | | |6.1.0| | | | | | |
|`cusolverRfSetResetValuesFastMode`| | | | |`hipsolverRfSetResetValuesFastMode`|5.6.0| | | |6.1.0| | | | | | |
|`cusolverRfSetupDevice`| | | | |`hipsolverRfSetupDevice`|5.6.0| | | |6.1.0| | | | | | |
|`cusolverRfSetupHost`| | | | |`hipsolverRfSetupHost`|5.6.0| | | |6.1.0| | | | | | |


\*A - Added; D - Deprecated; C - Changed; R - Removed; E - Experimental
14 changes: 14 additions & 0 deletions docs/tables/CUSOLVER_API_supported_by_ROC.md
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,20 @@
|`cusolverMgPotrs_bufferSize`|11.0| | | | | | | | | |
|`cusolverMgSyevd`|10.1| | | | | | | | | |
|`cusolverMgSyevd_bufferSize`|10.1| | | | | | | | | |
|`cusolverRfCreate`| | | | | | | | | | |
|`cusolverRfDestroy`| | | | | | | | | | |
|`cusolverRfGetAlgs`| | | | | | | | | | |
|`cusolverRfGetMatrixFormat`| | | | | | | | | | |
|`cusolverRfGetNumericBoostReport`| | | | | | | | | | |
|`cusolverRfGetNumericProperties`| | | | | | | | | | |
|`cusolverRfGetResetValuesFastMode`| | | | | | | | | | |
|`cusolverRfResetValues`| | | | | | | | | | |
|`cusolverRfSetAlgs`| | | | | | | | | | |
|`cusolverRfSetMatrixFormat`| | | | | | | | | | |
|`cusolverRfSetNumericProperties`| | | | | | | | | | |
|`cusolverRfSetResetValuesFastMode`| | | | | | | | | | |
|`cusolverRfSetupDevice`| | | | | | | | | | |
|`cusolverRfSetupHost`| | | | | | | | | | |


\*A - Added; D - Deprecated; C - Changed; R - Removed; E - Experimental
33 changes: 33 additions & 0 deletions src/CUDA2HIP_SOLVER_API_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,26 @@ const std::map<llvm::StringRef, hipCounter> CUDA_SOLVER_FUNCTION_MAP {
{"cusolverMgPotrs", {"hipsolverMgPotrs", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverMgPotri_bufferSize", {"hipsolverMgPotri_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverMgPotri", {"hipsolverMgPotri", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
// NOTE: rocsolver_create_rfinfo have a harness of other ROC and HIP API calls
{"cusolverRfCreate", {"hipsolverRfCreate", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
// NOTE: rocsolver_destroy_rfinfo have a harness of other ROC and HIP API calls
{"cusolverRfDestroy", {"hipsolverRfDestroy", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
// no ROC analogues
{"cusolverRfGetMatrixFormat", {"hipsolverRfGetMatrixFormat", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
{"cusolverRfSetMatrixFormat", {"hipsolverRfSetMatrixFormat", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
{"cusolverRfSetNumericProperties", {"hipsolverRfSetNumericProperties", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
{"cusolverRfGetNumericProperties", {"hipsolverRfGetNumericProperties", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
{"cusolverRfGetNumericBoostReport", {"hipsolverRfGetNumericBoostReport", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
{"cusolverRfSetAlgs", {"hipsolverRfSetAlgs", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
{"cusolverRfGetAlgs", {"hipsolverRfGetAlgs", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverRfGetResetValuesFastMode", {"hipsolverRfGetResetValuesFastMode", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
{"cusolverRfSetResetValuesFastMode", {"hipsolverRfSetResetValuesFastMode", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
// NOTE: rocsolver_dcsrrf_sumlu have a harness of other ROC and HIP API calls
{"cusolverRfSetupHost", {"hipsolverRfSetupHost", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
// NOTE: rocsolver_dcsrrf_sumlu have a harness of other ROC and HIP API calls
{"cusolverRfSetupDevice", {"hipsolverRfSetupDevice", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
// no ROC analogues
{"cusolverRfResetValues", {"hipsolverRfResetValues", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
};

const std::map<llvm::StringRef, cudaAPIversions> CUDA_SOLVER_FUNCTION_VER_MAP {
Expand Down Expand Up @@ -1060,6 +1080,19 @@ const std::map<llvm::StringRef, hipAPIversions> HIP_SOLVER_FUNCTION_VER_MAP {
{"hipsolverDnDgesvdaStridedBatched", {HIP_5040, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverDnCgesvdaStridedBatched", {HIP_5040, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverDnZgesvdaStridedBatched", {HIP_5040, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverRfCreate", {HIP_5060, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverRfDestroy", {HIP_5060, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverRfGetMatrixFormat", {HIP_5060, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverRfSetMatrixFormat", {HIP_5060, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverRfSetNumericProperties", {HIP_5060, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverRfGetNumericProperties", {HIP_5060, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverRfGetNumericBoostReport", {HIP_5060, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverRfSetAlgs", {HIP_5060, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverRfGetResetValuesFastMode", {HIP_5060, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverRfSetResetValuesFastMode", {HIP_5060, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverRfSetupHost", {HIP_5060, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverRfSetupDevice", {HIP_5060, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverRfResetValues", {HIP_5060, HIP_0, HIP_0, HIP_LATEST}},

{"rocsolver_spotrf", {HIP_3020, HIP_0, HIP_0, HIP_LATEST}},
{"rocsolver_dpotrf", {HIP_3020, HIP_0, HIP_0, HIP_LATEST}},
Expand Down
Loading

0 comments on commit c19ae44

Please sign in to comment.