From 08a833e8e93acbc7c97e5ece7e6e638e1d900b53 Mon Sep 17 00:00:00 2001 From: Evgeny Mankov Date: Tue, 12 Dec 2023 15:15:34 +0000 Subject: [PATCH] [HIPIFY][#675][#677][SOLVER][feature] `cuSOLVER` support - Step 34 - Functions (DN) + `cusolverDn(S|D)ormtr_(bufferSize)?` and `cusolverDn(C|Z)unmtr_(bufferSize)?`are `SUPPORTED` by `hipSOLVER` only + [NOTE] `rocsolver_(s|d)ormtr` and `rocsolver_(c|z)unmtr` have a harness of other HIP and ROC API calls, thus `UNSUPPORTED` + Updated `SOLVER` synthetic tests, the regenerated `hipify-perl`, and `SOLVER` `CUDA2HIP` documentation --- bin/hipify-perl | 16 ++++++++ docs/tables/CUSOLVER_API_supported_by_HIP.md | 8 ++++ .../CUSOLVER_API_supported_by_HIP_and_ROC.md | 8 ++++ docs/tables/CUSOLVER_API_supported_by_ROC.md | 8 ++++ src/CUDA2HIP_SOLVER_API_functions.cpp | 26 ++++++++++++ .../synthetic/libraries/cusolver2hipsolver.cu | 40 +++++++++++++++++++ 6 files changed, 106 insertions(+) diff --git a/bin/hipify-perl b/bin/hipify-perl index 9cff54f8..d13bb792 100755 --- a/bin/hipify-perl +++ b/bin/hipify-perl @@ -1080,6 +1080,8 @@ my %experimental_funcs = ( "cusolverEigType_t" => "6.1.0", "cusolverEigRange_t" => "6.1.0", "cusolverEigMode_t" => "6.1.0", + "cusolverDnZunmtr_bufferSize" => "6.1.0", + "cusolverDnZunmtr" => "6.1.0", "cusolverDnZunmqr_bufferSize" => "6.1.0", "cusolverDnZunmqr" => "6.1.0", "cusolverDnZungtr_bufferSize" => "6.1.0", @@ -1121,6 +1123,8 @@ my %experimental_funcs = ( "cusolverDnSpotrf_bufferSize" => "6.1.0", "cusolverDnSpotrfBatched" => "6.1.0", "cusolverDnSpotrf" => "6.1.0", + "cusolverDnSormtr_bufferSize" => "6.1.0", + "cusolverDnSormtr" => "6.1.0", "cusolverDnSormqr_bufferSize" => "6.1.0", "cusolverDnSormqr" => "6.1.0", "cusolverDnSorgtr_bufferSize" => "6.1.0", @@ -1154,6 +1158,8 @@ my %experimental_funcs = ( "cusolverDnDpotrf_bufferSize" => "6.1.0", "cusolverDnDpotrfBatched" => "6.1.0", "cusolverDnDpotrf" => "6.1.0", + "cusolverDnDormtr_bufferSize" => "6.1.0", + "cusolverDnDormtr" => "6.1.0", "cusolverDnDormqr_bufferSize" => "6.1.0", "cusolverDnDormqr" => "6.1.0", "cusolverDnDorgtr_bufferSize" => "6.1.0", @@ -1174,6 +1180,8 @@ my %experimental_funcs = ( "cusolverDnDDgesv" => "6.1.0", "cusolverDnDDgels_bufferSize" => "6.1.0", "cusolverDnDDgels" => "6.1.0", + "cusolverDnCunmtr_bufferSize" => "6.1.0", + "cusolverDnCunmtr" => "6.1.0", "cusolverDnCunmqr_bufferSize" => "6.1.0", "cusolverDnCunmqr" => "6.1.0", "cusolverDnCungtr_bufferSize" => "6.1.0", @@ -1391,6 +1399,8 @@ sub experimentalSubstitutions { subst("cusolverDnCungtr_bufferSize", "hipsolverDnCungtr_bufferSize", "library"); subst("cusolverDnCunmqr", "hipsolverDnCunmqr", "library"); subst("cusolverDnCunmqr_bufferSize", "hipsolverDnCunmqr_bufferSize", "library"); + subst("cusolverDnCunmtr", "hipsolverDnCunmtr", "library"); + subst("cusolverDnCunmtr_bufferSize", "hipsolverDnCunmtr_bufferSize", "library"); subst("cusolverDnDDgels", "hipsolverDnDDgels", "library"); subst("cusolverDnDDgels_bufferSize", "hipsolverDnDDgels_bufferSize", "library"); subst("cusolverDnDDgesv", "hipsolverDnDDgesv", "library"); @@ -1411,6 +1421,8 @@ sub experimentalSubstitutions { subst("cusolverDnDorgtr_bufferSize", "hipsolverDnDorgtr_bufferSize", "library"); subst("cusolverDnDormqr", "hipsolverDnDormqr", "library"); subst("cusolverDnDormqr_bufferSize", "hipsolverDnDormqr_bufferSize", "library"); + subst("cusolverDnDormtr", "hipsolverDnDormtr", "library"); + subst("cusolverDnDormtr_bufferSize", "hipsolverDnDormtr_bufferSize", "library"); subst("cusolverDnDpotrf", "hipsolverDnDpotrf", "library"); subst("cusolverDnDpotrfBatched", "hipsolverDnDpotrfBatched", "library"); subst("cusolverDnDpotrf_bufferSize", "hipsolverDnDpotrf_bufferSize", "library"); @@ -1443,6 +1455,8 @@ sub experimentalSubstitutions { subst("cusolverDnSorgtr_bufferSize", "hipsolverDnSorgtr_bufferSize", "library"); subst("cusolverDnSormqr", "hipsolverDnSormqr", "library"); subst("cusolverDnSormqr_bufferSize", "hipsolverDnSormqr_bufferSize", "library"); + subst("cusolverDnSormtr", "hipsolverDnSormtr", "library"); + subst("cusolverDnSormtr_bufferSize", "hipsolverDnSormtr_bufferSize", "library"); subst("cusolverDnSpotrf", "hipsolverDnSpotrf", "library"); subst("cusolverDnSpotrfBatched", "hipsolverDnSpotrfBatched", "library"); subst("cusolverDnSpotrf_bufferSize", "hipsolverDnSpotrf_bufferSize", "library"); @@ -1484,6 +1498,8 @@ sub experimentalSubstitutions { subst("cusolverDnZungtr_bufferSize", "hipsolverDnZungtr_bufferSize", "library"); subst("cusolverDnZunmqr", "hipsolverDnZunmqr", "library"); subst("cusolverDnZunmqr_bufferSize", "hipsolverDnZunmqr_bufferSize", "library"); + subst("cusolverDnZunmtr", "hipsolverDnZunmtr", "library"); + subst("cusolverDnZunmtr_bufferSize", "hipsolverDnZunmtr_bufferSize", "library"); subst("cusolverDnHandle_t", "hipsolverHandle_t", "type"); subst("cusolverEigMode_t", "hipsolverEigMode_t", "type"); subst("cusolverEigRange_t", "hipsolverEigRange_t", "type"); diff --git a/docs/tables/CUSOLVER_API_supported_by_HIP.md b/docs/tables/CUSOLVER_API_supported_by_HIP.md index 210ea204..5b276a7f 100644 --- a/docs/tables/CUSOLVER_API_supported_by_HIP.md +++ b/docs/tables/CUSOLVER_API_supported_by_HIP.md @@ -157,6 +157,8 @@ |`cusolverDnCungtr_bufferSize`|8.0| | | |`hipsolverDnCungtr_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnCunmqr`| | | | |`hipsolverDnCunmqr`|5.1.0| | | |6.1.0| |`cusolverDnCunmqr_bufferSize`|8.0| | | |`hipsolverDnCunmqr_bufferSize`|5.1.0| | | |6.1.0| +|`cusolverDnCunmtr`|8.0| | | |`hipsolverDnCunmtr`|5.1.0| | | |6.1.0| +|`cusolverDnCunmtr_bufferSize`|8.0| | | |`hipsolverDnCunmtr_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnDBgels`|11.0| | | | | | | | | | |`cusolverDnDBgels_bufferSize`|11.0| | | | | | | | | | |`cusolverDnDBgesv`|11.0| | | | | | | | | | @@ -196,6 +198,8 @@ |`cusolverDnDorgtr_bufferSize`|8.0| | | |`hipsolverDnDorgtr_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnDormqr`| | | | |`hipsolverDnDormqr`|5.1.0| | | |6.1.0| |`cusolverDnDormqr_bufferSize`|8.0| | | |`hipsolverDnDormqr_bufferSize`|5.1.0| | | |6.1.0| +|`cusolverDnDormtr`|8.0| | | |`hipsolverDnDormtr`|5.1.0| | | |6.1.0| +|`cusolverDnDormtr_bufferSize`|8.0| | | |`hipsolverDnDormtr_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnDpotrf`| | | | |`hipsolverDnDpotrf`|5.1.0| | | |6.1.0| |`cusolverDnDpotrfBatched`|9.1| | | |`hipsolverDnDpotrfBatched`|5.1.0| | | |6.1.0| |`cusolverDnDpotrf_bufferSize`| | | | |`hipsolverDnDpotrf_bufferSize`|5.1.0| | | |6.1.0| @@ -272,6 +276,8 @@ |`cusolverDnSorgtr_bufferSize`|8.0| | | |`hipsolverDnSorgtr_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnSormqr`| | | | |`hipsolverDnSormqr`|5.1.0| | | |6.1.0| |`cusolverDnSormqr_bufferSize`|8.0| | | |`hipsolverDnSormqr_bufferSize`|5.1.0| | | |6.1.0| +|`cusolverDnSormtr`|8.0| | | |`hipsolverDnSormtr`|5.1.0| | | |6.1.0| +|`cusolverDnSormtr_bufferSize`|8.0| | | |`hipsolverDnSormtr_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnSpotrf`| | | | |`hipsolverDnSpotrf`|5.1.0| | | |6.1.0| |`cusolverDnSpotrfBatched`|9.1| | | |`hipsolverDnSpotrfBatched`|5.1.0| | | |6.1.0| |`cusolverDnSpotrf_bufferSize`| | | | |`hipsolverDnSpotrf_bufferSize`|5.1.0| | | |6.1.0| @@ -343,6 +349,8 @@ |`cusolverDnZungtr_bufferSize`|8.0| | | |`hipsolverDnZungtr_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnZunmqr`| | | | |`hipsolverDnZunmqr`|5.1.0| | | |6.1.0| |`cusolverDnZunmqr_bufferSize`|8.0| | | |`hipsolverDnZunmqr_bufferSize`|5.1.0| | | |6.1.0| +|`cusolverDnZunmtr`|8.0| | | |`hipsolverDnZunmtr`|5.1.0| | | |6.1.0| +|`cusolverDnZunmtr_bufferSize`|8.0| | | |`hipsolverDnZunmtr_bufferSize`|5.1.0| | | |6.1.0| \*A - Added; D - Deprecated; C - Changed; R - Removed; E - Experimental \ No newline at end of file diff --git a/docs/tables/CUSOLVER_API_supported_by_HIP_and_ROC.md b/docs/tables/CUSOLVER_API_supported_by_HIP_and_ROC.md index 3bb2bbf0..e2c1396d 100644 --- a/docs/tables/CUSOLVER_API_supported_by_HIP_and_ROC.md +++ b/docs/tables/CUSOLVER_API_supported_by_HIP_and_ROC.md @@ -157,6 +157,8 @@ |`cusolverDnCungtr_bufferSize`|8.0| | | |`hipsolverDnCungtr_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnCunmqr`| | | | |`hipsolverDnCunmqr`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnCunmqr_bufferSize`|8.0| | | |`hipsolverDnCunmqr_bufferSize`|5.1.0| | | |6.1.0| | | | | | | +|`cusolverDnCunmtr`|8.0| | | |`hipsolverDnCunmtr`|5.1.0| | | |6.1.0| | | | | | | +|`cusolverDnCunmtr_bufferSize`|8.0| | | |`hipsolverDnCunmtr_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnDBgels`|11.0| | | | | | | | | | | | | | | | |`cusolverDnDBgels_bufferSize`|11.0| | | | | | | | | | | | | | | | |`cusolverDnDBgesv`|11.0| | | | | | | | | | | | | | | | @@ -196,6 +198,8 @@ |`cusolverDnDorgtr_bufferSize`|8.0| | | |`hipsolverDnDorgtr_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnDormqr`| | | | |`hipsolverDnDormqr`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnDormqr_bufferSize`|8.0| | | |`hipsolverDnDormqr_bufferSize`|5.1.0| | | |6.1.0| | | | | | | +|`cusolverDnDormtr`|8.0| | | |`hipsolverDnDormtr`|5.1.0| | | |6.1.0| | | | | | | +|`cusolverDnDormtr_bufferSize`|8.0| | | |`hipsolverDnDormtr_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnDpotrf`| | | | |`hipsolverDnDpotrf`|5.1.0| | | |6.1.0|`rocsolver_dpotrf`|3.2.0| | | |6.1.0| |`cusolverDnDpotrfBatched`|9.1| | | |`hipsolverDnDpotrfBatched`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnDpotrf_bufferSize`| | | | |`hipsolverDnDpotrf_bufferSize`|5.1.0| | | |6.1.0| | | | | | | @@ -272,6 +276,8 @@ |`cusolverDnSorgtr_bufferSize`|8.0| | | |`hipsolverDnSorgtr_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnSormqr`| | | | |`hipsolverDnSormqr`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnSormqr_bufferSize`|8.0| | | |`hipsolverDnSormqr_bufferSize`|5.1.0| | | |6.1.0| | | | | | | +|`cusolverDnSormtr`|8.0| | | |`hipsolverDnSormtr`|5.1.0| | | |6.1.0| | | | | | | +|`cusolverDnSormtr_bufferSize`|8.0| | | |`hipsolverDnSormtr_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnSpotrf`| | | | |`hipsolverDnSpotrf`|5.1.0| | | |6.1.0|`rocsolver_spotrf`|3.2.0| | | |6.1.0| |`cusolverDnSpotrfBatched`|9.1| | | |`hipsolverDnSpotrfBatched`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnSpotrf_bufferSize`| | | | |`hipsolverDnSpotrf_bufferSize`|5.1.0| | | |6.1.0| | | | | | | @@ -343,6 +349,8 @@ |`cusolverDnZungtr_bufferSize`|8.0| | | |`hipsolverDnZungtr_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnZunmqr`| | | | |`hipsolverDnZunmqr`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnZunmqr_bufferSize`|8.0| | | |`hipsolverDnZunmqr_bufferSize`|5.1.0| | | |6.1.0| | | | | | | +|`cusolverDnZunmtr`|8.0| | | |`hipsolverDnZunmtr`|5.1.0| | | |6.1.0| | | | | | | +|`cusolverDnZunmtr_bufferSize`|8.0| | | |`hipsolverDnZunmtr_bufferSize`|5.1.0| | | |6.1.0| | | | | | | \*A - Added; D - Deprecated; C - Changed; R - Removed; E - Experimental \ No newline at end of file diff --git a/docs/tables/CUSOLVER_API_supported_by_ROC.md b/docs/tables/CUSOLVER_API_supported_by_ROC.md index 9c5e4438..02d97fef 100644 --- a/docs/tables/CUSOLVER_API_supported_by_ROC.md +++ b/docs/tables/CUSOLVER_API_supported_by_ROC.md @@ -157,6 +157,8 @@ |`cusolverDnCungtr_bufferSize`|8.0| | | | | | | | | | |`cusolverDnCunmqr`| | | | | | | | | | | |`cusolverDnCunmqr_bufferSize`|8.0| | | | | | | | | | +|`cusolverDnCunmtr`|8.0| | | | | | | | | | +|`cusolverDnCunmtr_bufferSize`|8.0| | | | | | | | | | |`cusolverDnDBgels`|11.0| | | | | | | | | | |`cusolverDnDBgels_bufferSize`|11.0| | | | | | | | | | |`cusolverDnDBgesv`|11.0| | | | | | | | | | @@ -196,6 +198,8 @@ |`cusolverDnDorgtr_bufferSize`|8.0| | | | | | | | | | |`cusolverDnDormqr`| | | | | | | | | | | |`cusolverDnDormqr_bufferSize`|8.0| | | | | | | | | | +|`cusolverDnDormtr`|8.0| | | | | | | | | | +|`cusolverDnDormtr_bufferSize`|8.0| | | | | | | | | | |`cusolverDnDpotrf`| | | | |`rocsolver_dpotrf`|3.2.0| | | |6.1.0| |`cusolverDnDpotrfBatched`|9.1| | | | | | | | | | |`cusolverDnDpotrf_bufferSize`| | | | | | | | | | | @@ -272,6 +276,8 @@ |`cusolverDnSorgtr_bufferSize`|8.0| | | | | | | | | | |`cusolverDnSormqr`| | | | | | | | | | | |`cusolverDnSormqr_bufferSize`|8.0| | | | | | | | | | +|`cusolverDnSormtr`|8.0| | | | | | | | | | +|`cusolverDnSormtr_bufferSize`|8.0| | | | | | | | | | |`cusolverDnSpotrf`| | | | |`rocsolver_spotrf`|3.2.0| | | |6.1.0| |`cusolverDnSpotrfBatched`|9.1| | | | | | | | | | |`cusolverDnSpotrf_bufferSize`| | | | | | | | | | | @@ -343,6 +349,8 @@ |`cusolverDnZungtr_bufferSize`|8.0| | | | | | | | | | |`cusolverDnZunmqr`| | | | | | | | | | | |`cusolverDnZunmqr_bufferSize`|8.0| | | | | | | | | | +|`cusolverDnZunmtr`|8.0| | | | | | | | | | +|`cusolverDnZunmtr_bufferSize`|8.0| | | | | | | | | | \*A - Added; D - Deprecated; C - Changed; R - Removed; E - Experimental \ No newline at end of file diff --git a/src/CUDA2HIP_SOLVER_API_functions.cpp b/src/CUDA2HIP_SOLVER_API_functions.cpp index 727b4c8a..095decf8 100644 --- a/src/CUDA2HIP_SOLVER_API_functions.cpp +++ b/src/CUDA2HIP_SOLVER_API_functions.cpp @@ -301,6 +301,16 @@ const std::map CUDA_SOLVER_FUNCTION_MAP { {"cusolverDnDorgtr", {"hipsolverDnDorgtr", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, {"cusolverDnCungtr", {"hipsolverDnCungtr", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, {"cusolverDnZungtr", {"hipsolverDnZungtr", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + // NOTE: rocsolver_(s|d)ormtr and rocsolver_(c|z)unmtr have a harness of other HIP and ROC API calls + {"cusolverDnSormtr_bufferSize", {"hipsolverDnSormtr_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + {"cusolverDnDormtr_bufferSize", {"hipsolverDnDormtr_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + {"cusolverDnCunmtr_bufferSize", {"hipsolverDnCunmtr_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + {"cusolverDnZunmtr_bufferSize", {"hipsolverDnZunmtr_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + // NOTE: rocsolver_(s|d)ormtr and rocsolver_(c|z)unmtr have a harness of other HIP and ROC API calls + {"cusolverDnSormtr", {"hipsolverDnSormtr", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + {"cusolverDnDormtr", {"hipsolverDnDormtr", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + {"cusolverDnCunmtr", {"hipsolverDnCunmtr", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + {"cusolverDnZunmtr", {"hipsolverDnZunmtr", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, }; const std::map CUDA_SOLVER_FUNCTION_VER_MAP { @@ -477,6 +487,14 @@ const std::map CUDA_SOLVER_FUNCTION_VER_MAP { {"cusolverDnDorgtr", {CUDA_80, CUDA_0, CUDA_0}}, {"cusolverDnCungtr", {CUDA_80, CUDA_0, CUDA_0}}, {"cusolverDnZungtr", {CUDA_80, CUDA_0, CUDA_0}}, + {"cusolverDnSormtr_bufferSize", {CUDA_80, CUDA_0, CUDA_0}}, + {"cusolverDnDormtr_bufferSize", {CUDA_80, CUDA_0, CUDA_0}}, + {"cusolverDnCunmtr_bufferSize", {CUDA_80, CUDA_0, CUDA_0}}, + {"cusolverDnZunmtr_bufferSize", {CUDA_80, CUDA_0, CUDA_0}}, + {"cusolverDnSormtr", {CUDA_80, CUDA_0, CUDA_0}}, + {"cusolverDnDormtr", {CUDA_80, CUDA_0, CUDA_0}}, + {"cusolverDnCunmtr", {CUDA_80, CUDA_0, CUDA_0}}, + {"cusolverDnZunmtr", {CUDA_80, CUDA_0, CUDA_0}}, }; const std::map HIP_SOLVER_FUNCTION_VER_MAP { @@ -604,6 +622,14 @@ const std::map HIP_SOLVER_FUNCTION_VER_MAP { {"hipsolverDnDorgtr", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, {"hipsolverDnCungtr", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, {"hipsolverDnZungtr", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnSormtr_bufferSize", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnDormtr_bufferSize", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnCunmtr_bufferSize", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnZunmtr_bufferSize", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnSormtr", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnDormtr", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnCunmtr", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnZunmtr", {HIP_5010, 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}}, diff --git a/tests/unit_tests/synthetic/libraries/cusolver2hipsolver.cu b/tests/unit_tests/synthetic/libraries/cusolver2hipsolver.cu index d2a3669c..950b7f68 100644 --- a/tests/unit_tests/synthetic/libraries/cusolver2hipsolver.cu +++ b/tests/unit_tests/synthetic/libraries/cusolver2hipsolver.cu @@ -580,6 +580,46 @@ int main() { // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnZungtr(hipsolverHandle_t handle, hipblasFillMode_t uplo, int n, hipDoubleComplex* A, int lda, const hipDoubleComplex* tau, hipDoubleComplex* work, int lwork, int* devInfo); // CHECK: status = hipsolverDnZungtr(handle, fillMode, n, &dComplexA, lda, &dComplexTAU, &dComplexWorkspace, Lwork, &info); status = cusolverDnZungtr(handle, fillMode, n, &dComplexA, lda, &dComplexTAU, &dComplexWorkspace, Lwork, &info); + + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnSormtr_bufferSize(cusolverDnHandle_t handle, cublasSideMode_t side, cublasFillMode_t uplo, cublasOperation_t trans, int m, int n, const float * A, int lda, const float * tau, const float * C, int ldc, int * lwork); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnSormtr_bufferSize(hipsolverHandle_t handle, hipblasSideMode_t side, hipblasFillMode_t uplo, hipblasOperation_t trans, int m, int n, const float* A, int lda, const float* tau, const float* C, int ldc, int* lwork); + // CHECK: status = hipsolverDnSormtr_bufferSize(handle, blasSideMode, fillMode, blasOperation, m, n, &fA, lda, &fTAU, &fC, ldc, &Lwork); + status = cusolverDnSormtr_bufferSize(handle, blasSideMode, fillMode, blasOperation, m, n, &fA, lda, &fTAU, &fC, ldc, &Lwork); + + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnDormtr_bufferSize(cusolverDnHandle_t handle, cublasSideMode_t side, cublasFillMode_t uplo, cublasOperation_t trans, int m, int n, const double * A, int lda, const double * tau, const double * C, int ldc, int * lwork); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnDormtr_bufferSize(hipsolverHandle_t handle, hipblasSideMode_t side, hipblasFillMode_t uplo, hipblasOperation_t trans, int m, int n, const double* A, int lda, const double* tau, const double* C, int ldc, int* lwork); + // CHECK: status = hipsolverDnDormtr_bufferSize(handle, blasSideMode, fillMode, blasOperation, m, n, &dA, lda, &dTAU, &dC, ldc, &Lwork); + status = cusolverDnDormtr_bufferSize(handle, blasSideMode, fillMode, blasOperation, m, n, &dA, lda, &dTAU, &dC, ldc, &Lwork); + + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnCunmtr_bufferSize(cusolverDnHandle_t handle, cublasSideMode_t side, cublasFillMode_t uplo, cublasOperation_t trans, int m, int n, const cuComplex * A, int lda, const cuComplex * tau, const cuComplex * C, int ldc, int * lwork); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnCunmtr_bufferSize(hipsolverHandle_t handle, hipblasSideMode_t side, hipblasFillMode_t uplo, hipblasOperation_t trans, int m, int n, const hipFloatComplex* A, int lda, const hipFloatComplex* tau, const hipFloatComplex* C, int ldc, int* lwork); + // CHECK: status = hipsolverDnCunmtr_bufferSize(handle, blasSideMode, fillMode, blasOperation, m, n, &complexA, lda, &complexTAU, &complexC, ldc, &Lwork); + status = cusolverDnCunmtr_bufferSize(handle, blasSideMode, fillMode, blasOperation, m, n, &complexA, lda, &complexTAU, &complexC, ldc, &Lwork); + + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnZunmtr_bufferSize(cusolverDnHandle_t handle, cublasSideMode_t side, cublasFillMode_t uplo, cublasOperation_t trans, int m, int n, const cuDoubleComplex *A, int lda, const cuDoubleComplex *tau, const cuDoubleComplex *C, int ldc, int * lwork); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnZunmtr_bufferSize(hipsolverHandle_t handle, hipblasSideMode_t side, hipblasFillMode_t uplo, hipblasOperation_t trans, int m, int n, const hipDoubleComplex* A, int lda, const hipDoubleComplex* tau, const hipDoubleComplex* C, int ldc, int* lwork); + // CHECK: status = hipsolverDnZunmtr_bufferSize(handle, blasSideMode, fillMode, blasOperation, m, n, &dComplexA, lda, &dComplexTAU, &dComplexC, ldc, &Lwork); + status = cusolverDnZunmtr_bufferSize(handle, blasSideMode, fillMode, blasOperation, m, n, &dComplexA, lda, &dComplexTAU, &dComplexC, ldc, &Lwork); + + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnSormtr(cusolverDnHandle_t handle, cublasSideMode_t side, cublasFillMode_t uplo, cublasOperation_t trans, int m, int n, float * A, int lda, float * tau, float * C, int ldc, float * work, int lwork, int * info); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnSormtr(hipsolverHandle_t handle, hipblasSideMode_t side, hipblasFillMode_t uplo, hipblasOperation_t trans, int m, int n, float* A, int lda, float* tau, float* C, int ldc, float* work, int lwork, int* devInfo); + // CHECK: status = hipsolverDnSormtr(handle, blasSideMode, fillMode, blasOperation, m, n, &fA, lda, &fTAU, &fC, ldc, &fWorkspace, Lwork, &info); + status = cusolverDnSormtr(handle, blasSideMode, fillMode, blasOperation, m, n, &fA, lda, &fTAU, &fC, ldc, &fWorkspace, Lwork, &info); + + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnDormtr(cusolverDnHandle_t handle, cublasSideMode_t side, cublasFillMode_t uplo, cublasOperation_t trans, int m, int n, double * A, int lda, double * tau, double * C, int ldc, double * work, int lwork, int * info); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnDormtr(hipsolverHandle_t handle, hipblasSideMode_t side, hipblasFillMode_t uplo, hipblasOperation_t trans, int m, int n, double* A, int lda, double* tau, double* C, int ldc, double* work, int lwork, int* devInfo); + // CHECK: status = hipsolverDnDormtr(handle, blasSideMode, fillMode, blasOperation, m, n, &dA, lda, &dTAU, &dC, ldc, &dWorkspace, Lwork, &info); + status = cusolverDnDormtr(handle, blasSideMode, fillMode, blasOperation, m, n, &dA, lda, &dTAU, &dC, ldc, &dWorkspace, Lwork, &info); + + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnCunmtr(cusolverDnHandle_t handle, cublasSideMode_t side, cublasFillMode_t uplo, cublasOperation_t trans, int m, int n, cuComplex * A, int lda, cuComplex * tau, cuComplex * C, int ldc, cuComplex * work, int lwork, int * info); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnCunmtr(hipsolverHandle_t handle, hipblasSideMode_t side, hipblasFillMode_t uplo, hipblasOperation_t trans, int m, int n, hipFloatComplex* A, int lda, hipFloatComplex* tau, hipFloatComplex* C, int ldc, hipFloatComplex* work, int lwork, int* devInfo); + // CHECK: status = hipsolverDnCunmtr(handle, blasSideMode, fillMode, blasOperation, m, n, &complexA, lda, &complexTAU, &complexC, ldc, &complexWorkspace, Lwork, &info); + status = cusolverDnCunmtr(handle, blasSideMode, fillMode, blasOperation, m, n, &complexA, lda, &complexTAU, &complexC, ldc, &complexWorkspace, Lwork, &info); + + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnZunmtr(cusolverDnHandle_t handle, cublasSideMode_t side, cublasFillMode_t uplo, cublasOperation_t trans, int m, int n, cuDoubleComplex * A, int lda, cuDoubleComplex * tau, cuDoubleComplex * C, int ldc, cuDoubleComplex * work, int lwork, int * info); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnZunmtr(hipsolverHandle_t handle, hipblasSideMode_t side, hipblasFillMode_t uplo, hipblasOperation_t trans, int m, int n, hipDoubleComplex* A, int lda, hipDoubleComplex* tau, hipDoubleComplex* C, int ldc, hipDoubleComplex* work, int lwork, int* devInfo); + // CHECK: status = hipsolverDnZunmtr(handle, blasSideMode, fillMode, blasOperation, m, n, &dComplexA, lda, &dComplexTAU, &dComplexC, ldc, &dComplexWorkspace, Lwork, &info); + status = cusolverDnZunmtr(handle, blasSideMode, fillMode, blasOperation, m, n, &dComplexA, lda, &dComplexTAU, &dComplexC, ldc, &dComplexWorkspace, Lwork, &info); #endif #if CUDA_VERSION >= 9000