Skip to content

Commit

Permalink
Merge pull request #1226 from emankov/HIPIFY
Browse files Browse the repository at this point in the history
[HIPIFY][#675][#677][SOLVER][feature] `cuSOLVER` support - Step 53 - Functions (RF)
  • Loading branch information
emankov authored Dec 21, 2023
2 parents 05fd1bb + 1ada04e commit cbd7b26
Show file tree
Hide file tree
Showing 6 changed files with 173 additions and 0 deletions.
24 changes: 24 additions & 0 deletions bin/hipify-perl
Original file line number Diff line number Diff line change
Expand Up @@ -1077,19 +1077,31 @@ my %removed_funcs = (

my %experimental_funcs = (
"cusolverStatus_t" => "6.1.0",
"cusolverRfSolve" => "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",
"cusolverRfRefactor" => "6.1.0",
"cusolverRfGetResetValuesFastMode" => "6.1.0",
"cusolverRfGetNumericProperties" => "6.1.0",
"cusolverRfGetNumericBoostReport" => "6.1.0",
"cusolverRfGetMatrixFormat" => "6.1.0",
"cusolverRfExtractSplitFactorsHost" => "6.1.0",
"cusolverRfExtractBundledFactorsHost" => "6.1.0",
"cusolverRfDestroy" => "6.1.0",
"cusolverRfCreate" => "6.1.0",
"cusolverRfBatchZeroPivot" => "6.1.0",
"cusolverRfBatchSolve" => "6.1.0",
"cusolverRfBatchSetupHost" => "6.1.0",
"cusolverRfBatchResetValues" => "6.1.0",
"cusolverRfBatchRefactor" => "6.1.0",
"cusolverRfBatchAnalyze" => "6.1.0",
"cusolverRfAnalyze" => "6.1.0",
"cusolverRfAccessBundledFactorsDevice" => "6.1.0",
"cusolverEigType_t" => "6.1.0",
"cusolverEigRange_t" => "6.1.0",
"cusolverEigMode_t" => "6.1.0",
Expand Down Expand Up @@ -1717,19 +1729,31 @@ sub experimentalSubstitutions {
subst("cusolverDnZunmqr_bufferSize", "hipsolverDnZunmqr_bufferSize", "library");
subst("cusolverDnZunmtr", "hipsolverDnZunmtr", "library");
subst("cusolverDnZunmtr_bufferSize", "hipsolverDnZunmtr_bufferSize", "library");
subst("cusolverRfAccessBundledFactorsDevice", "hipsolverRfAccessBundledFactorsDevice", "library");
subst("cusolverRfAnalyze", "hipsolverRfAnalyze", "library");
subst("cusolverRfBatchAnalyze", "hipsolverRfBatchAnalyze", "library");
subst("cusolverRfBatchRefactor", "hipsolverRfBatchRefactor", "library");
subst("cusolverRfBatchResetValues", "hipsolverRfBatchResetValues", "library");
subst("cusolverRfBatchSetupHost", "hipsolverRfBatchSetupHost", "library");
subst("cusolverRfBatchSolve", "hipsolverRfBatchSolve", "library");
subst("cusolverRfBatchZeroPivot", "hipsolverRfBatchZeroPivot", "library");
subst("cusolverRfCreate", "hipsolverRfCreate", "library");
subst("cusolverRfDestroy", "hipsolverRfDestroy", "library");
subst("cusolverRfExtractBundledFactorsHost", "hipsolverRfExtractBundledFactorsHost", "library");
subst("cusolverRfExtractSplitFactorsHost", "hipsolverRfExtractSplitFactorsHost", "library");
subst("cusolverRfGetMatrixFormat", "hipsolverRfGetMatrixFormat", "library");
subst("cusolverRfGetNumericBoostReport", "hipsolverRfGetNumericBoostReport", "library");
subst("cusolverRfGetNumericProperties", "hipsolverRfGetNumericProperties", "library");
subst("cusolverRfGetResetValuesFastMode", "hipsolverRfGetResetValuesFastMode", "library");
subst("cusolverRfRefactor", "hipsolverRfRefactor", "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("cusolverRfSolve", "hipsolverRfSolve", "library");
subst("cusolverDnHandle_t", "hipsolverHandle_t", "type");
subst("cusolverEigMode_t", "hipsolverEigMode_t", "type");
subst("cusolverEigRange_t", "hipsolverEigRange_t", "type");
Expand Down
12 changes: 12 additions & 0 deletions docs/tables/CUSOLVER_API_supported_by_HIP.md
Original file line number Diff line number Diff line change
Expand Up @@ -539,20 +539,32 @@
|`cusolverMgPotrs_bufferSize`|11.0| | | | | | | | | |
|`cusolverMgSyevd`|10.1| | | | | | | | | |
|`cusolverMgSyevd_bufferSize`|10.1| | | | | | | | | |
|`cusolverRfAccessBundledFactorsDevice`| | | | |`hipsolverRfAccessBundledFactorsDevice`|5.6.0| | | |6.1.0|
|`cusolverRfAnalyze`| | | | |`hipsolverRfAnalyze`|5.6.0| | | |6.1.0|
|`cusolverRfBatchAnalyze`| | | | |`hipsolverRfBatchAnalyze`|5.6.0| | | |6.1.0|
|`cusolverRfBatchRefactor`| | | | |`hipsolverRfBatchRefactor`|5.6.0| | | |6.1.0|
|`cusolverRfBatchResetValues`| | | | |`hipsolverRfBatchResetValues`|5.6.0| | | |6.1.0|
|`cusolverRfBatchSetupHost`| | | | |`hipsolverRfBatchSetupHost`|5.6.0| | | |6.1.0|
|`cusolverRfBatchSolve`| | | | |`hipsolverRfBatchSolve`|5.6.0| | | |6.1.0|
|`cusolverRfBatchZeroPivot`| | | | |`hipsolverRfBatchZeroPivot`|5.6.0| | | |6.1.0|
|`cusolverRfCreate`| | | | |`hipsolverRfCreate`|5.6.0| | | |6.1.0|
|`cusolverRfDestroy`| | | | |`hipsolverRfDestroy`|5.6.0| | | |6.1.0|
|`cusolverRfExtractBundledFactorsHost`| | | | |`hipsolverRfExtractBundledFactorsHost`|5.6.0| | | |6.1.0|
|`cusolverRfExtractSplitFactorsHost`| | | | |`hipsolverRfExtractSplitFactorsHost`|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|
|`cusolverRfRefactor`| | | | |`hipsolverRfRefactor`|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|
|`cusolverRfSolve`| | | | |`hipsolverRfSolve`|5.6.0| | | |6.1.0|


\*A - Added; D - Deprecated; C - Changed; R - Removed; E - Experimental
12 changes: 12 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,20 +539,32 @@
|`cusolverMgPotrs_bufferSize`|11.0| | | | | | | | | | | | | | | |
|`cusolverMgSyevd`|10.1| | | | | | | | | | | | | | | |
|`cusolverMgSyevd_bufferSize`|10.1| | | | | | | | | | | | | | | |
|`cusolverRfAccessBundledFactorsDevice`| | | | |`hipsolverRfAccessBundledFactorsDevice`|5.6.0| | | |6.1.0| | | | | | |
|`cusolverRfAnalyze`| | | | |`hipsolverRfAnalyze`|5.6.0| | | |6.1.0| | | | | | |
|`cusolverRfBatchAnalyze`| | | | |`hipsolverRfBatchAnalyze`|5.6.0| | | |6.1.0| | | | | | |
|`cusolverRfBatchRefactor`| | | | |`hipsolverRfBatchRefactor`|5.6.0| | | |6.1.0| | | | | | |
|`cusolverRfBatchResetValues`| | | | |`hipsolverRfBatchResetValues`|5.6.0| | | |6.1.0| | | | | | |
|`cusolverRfBatchSetupHost`| | | | |`hipsolverRfBatchSetupHost`|5.6.0| | | |6.1.0| | | | | | |
|`cusolverRfBatchSolve`| | | | |`hipsolverRfBatchSolve`|5.6.0| | | |6.1.0| | | | | | |
|`cusolverRfBatchZeroPivot`| | | | |`hipsolverRfBatchZeroPivot`|5.6.0| | | |6.1.0| | | | | | |
|`cusolverRfCreate`| | | | |`hipsolverRfCreate`|5.6.0| | | |6.1.0| | | | | | |
|`cusolverRfDestroy`| | | | |`hipsolverRfDestroy`|5.6.0| | | |6.1.0| | | | | | |
|`cusolverRfExtractBundledFactorsHost`| | | | |`hipsolverRfExtractBundledFactorsHost`|5.6.0| | | |6.1.0| | | | | | |
|`cusolverRfExtractSplitFactorsHost`| | | | |`hipsolverRfExtractSplitFactorsHost`|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| | | | | | |
|`cusolverRfRefactor`| | | | |`hipsolverRfRefactor`|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| | | | | | |
|`cusolverRfSolve`| | | | |`hipsolverRfSolve`|5.6.0| | | |6.1.0| | | | | | |


\*A - Added; D - Deprecated; C - Changed; R - Removed; E - Experimental
12 changes: 12 additions & 0 deletions docs/tables/CUSOLVER_API_supported_by_ROC.md
Original file line number Diff line number Diff line change
Expand Up @@ -539,20 +539,32 @@
|`cusolverMgPotrs_bufferSize`|11.0| | | | | | | | | |
|`cusolverMgSyevd`|10.1| | | | | | | | | |
|`cusolverMgSyevd_bufferSize`|10.1| | | | | | | | | |
|`cusolverRfAccessBundledFactorsDevice`| | | | | | | | | | |
|`cusolverRfAnalyze`| | | | | | | | | | |
|`cusolverRfBatchAnalyze`| | | | | | | | | | |
|`cusolverRfBatchRefactor`| | | | | | | | | | |
|`cusolverRfBatchResetValues`| | | | | | | | | | |
|`cusolverRfBatchSetupHost`| | | | | | | | | | |
|`cusolverRfBatchSolve`| | | | | | | | | | |
|`cusolverRfBatchZeroPivot`| | | | | | | | | | |
|`cusolverRfCreate`| | | | | | | | | | |
|`cusolverRfDestroy`| | | | | | | | | | |
|`cusolverRfExtractBundledFactorsHost`| | | | | | | | | | |
|`cusolverRfExtractSplitFactorsHost`| | | | | | | | | | |
|`cusolverRfGetAlgs`| | | | | | | | | | |
|`cusolverRfGetMatrixFormat`| | | | | | | | | | |
|`cusolverRfGetNumericBoostReport`| | | | | | | | | | |
|`cusolverRfGetNumericProperties`| | | | | | | | | | |
|`cusolverRfGetResetValuesFastMode`| | | | | | | | | | |
|`cusolverRfRefactor`| | | | | | | | | | |
|`cusolverRfResetValues`| | | | | | | | | | |
|`cusolverRfSetAlgs`| | | | | | | | | | |
|`cusolverRfSetMatrixFormat`| | | | | | | | | | |
|`cusolverRfSetNumericProperties`| | | | | | | | | | |
|`cusolverRfSetResetValuesFastMode`| | | | | | | | | | |
|`cusolverRfSetupDevice`| | | | | | | | | | |
|`cusolverRfSetupHost`| | | | | | | | | | |
|`cusolverRfSolve`| | | | | | | | | | |


\*A - Added; D - Deprecated; C - Changed; R - Removed; E - Experimental
36 changes: 36 additions & 0 deletions src/CUDA2HIP_SOLVER_API_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,30 @@ const std::map<llvm::StringRef, hipCounter> CUDA_SOLVER_FUNCTION_MAP {
{"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}},
// NOTE: can't call rocsolver_dcsrrf_analysis w/o using hipSOLVER's hipsolverRfHandle
{"cusolverRfAnalyze", {"hipsolverRfAnalyze", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
// NOTE: can't call rocsolver_dcsrrf_refactlu w/o using hipSOLVER's hipsolverRfHandle
{"cusolverRfRefactor", {"hipsolverRfRefactor", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
// no ROC analogues
{"cusolverRfAccessBundledFactorsDevice", {"hipsolverRfAccessBundledFactorsDevice", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
// no ROC analogues
{"cusolverRfExtractBundledFactorsHost", {"hipsolverRfExtractBundledFactorsHost", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
// no ROC analogues
{"cusolverRfExtractSplitFactorsHost", {"hipsolverRfExtractSplitFactorsHost", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
// NOTE: can't call rocsolver_dcsrrf_solve w/o using hipSOLVER's hipsolverRfHandle
{"cusolverRfSolve", {"hipsolverRfSolve", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
// no ROC analogues
{"cusolverRfBatchSetupHost", {"hipsolverRfBatchSetupHost", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
// no ROC analogues
{"cusolverRfBatchResetValues", {"hipsolverRfBatchResetValues", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
// no ROC analogues
{"cusolverRfBatchAnalyze", {"hipsolverRfBatchAnalyze", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
// no ROC analogues
{"cusolverRfBatchRefactor", {"hipsolverRfBatchRefactor", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
// no ROC analogues
{"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}},
};

const std::map<llvm::StringRef, cudaAPIversions> CUDA_SOLVER_FUNCTION_VER_MAP {
Expand Down Expand Up @@ -1093,6 +1117,18 @@ const std::map<llvm::StringRef, hipAPIversions> HIP_SOLVER_FUNCTION_VER_MAP {
{"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}},
{"hipsolverRfAnalyze", {HIP_5060, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverRfRefactor", {HIP_5060, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverRfAccessBundledFactorsDevice", {HIP_5060, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverRfExtractBundledFactorsHost", {HIP_5060, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverRfExtractSplitFactorsHost", {HIP_5060, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverRfSolve", {HIP_5060, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverRfBatchSetupHost", {HIP_5060, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverRfBatchResetValues", {HIP_5060, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverRfBatchAnalyze", {HIP_5060, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverRfBatchRefactor", {HIP_5060, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverRfBatchSolve", {HIP_5060, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverRfBatchZeroPivot", {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 cbd7b26

Please sign in to comment.