From 88aae1272ab58f0fddbd937fd890d91342569481 Mon Sep 17 00:00:00 2001 From: Evgeny Mankov Date: Wed, 13 Dec 2023 20:04:15 +0000 Subject: [PATCH] [HIPIFY][#675][#677][SOLVER][feature] `cuSOLVER` support - Step 36 - Functions (DN) + `cusolverDn(S|D)syevdr_(bufferSize)?` and `cusolverDn(C|Z)heevd_(bufferSize)?`are `SUPPORTED` by `hipSOLVER` only + [NOTE] `rocsolver_(s|d)syevd` and `rocsolver_(c|z)heevd` 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 | 42 +++++++++++++++++++ 6 files changed, 108 insertions(+) diff --git a/bin/hipify-perl b/bin/hipify-perl index 10052407..0f1e1ef9 100755 --- a/bin/hipify-perl +++ b/bin/hipify-perl @@ -1101,6 +1101,8 @@ my %experimental_funcs = ( "cusolverDnZpotrf" => "6.1.0", "cusolverDnZhetrd_bufferSize" => "6.1.0", "cusolverDnZhetrd" => "6.1.0", + "cusolverDnZheevd_bufferSize" => "6.1.0", + "cusolverDnZheevd" => "6.1.0", "cusolverDnZgetrs" => "6.1.0", "cusolverDnZgetrf_bufferSize" => "6.1.0", "cusolverDnZgetrf" => "6.1.0", @@ -1118,6 +1120,8 @@ my %experimental_funcs = ( "cusolverDnSsytrf" => "6.1.0", "cusolverDnSsytrd_bufferSize" => "6.1.0", "cusolverDnSsytrd" => "6.1.0", + "cusolverDnSsyevd_bufferSize" => "6.1.0", + "cusolverDnSsyevd" => "6.1.0", "cusolverDnSpotrsBatched" => "6.1.0", "cusolverDnSpotrs" => "6.1.0", "cusolverDnSpotri_bufferSize" => "6.1.0", @@ -1155,6 +1159,8 @@ my %experimental_funcs = ( "cusolverDnDsytrf" => "6.1.0", "cusolverDnDsytrd_bufferSize" => "6.1.0", "cusolverDnDsytrd" => "6.1.0", + "cusolverDnDsyevd_bufferSize" => "6.1.0", + "cusolverDnDsyevd" => "6.1.0", "cusolverDnDpotrsBatched" => "6.1.0", "cusolverDnDpotrs" => "6.1.0", "cusolverDnDpotri_bufferSize" => "6.1.0", @@ -1208,6 +1214,8 @@ my %experimental_funcs = ( "cusolverDnCpotrf" => "6.1.0", "cusolverDnChetrd_bufferSize" => "6.1.0", "cusolverDnChetrd" => "6.1.0", + "cusolverDnCheevd_bufferSize" => "6.1.0", + "cusolverDnCheevd" => "6.1.0", "cusolverDnCgetrs" => "6.1.0", "cusolverDnCgetrf_bufferSize" => "6.1.0", "cusolverDnCgetrf" => "6.1.0", @@ -1389,6 +1397,8 @@ sub experimentalSubstitutions { subst("cusolverDnCgetrf", "hipsolverDnCgetrf", "library"); subst("cusolverDnCgetrf_bufferSize", "hipsolverDnCgetrf_bufferSize", "library"); subst("cusolverDnCgetrs", "hipsolverDnCgetrs", "library"); + subst("cusolverDnCheevd", "hipsolverDnCheevd", "library"); + subst("cusolverDnCheevd_bufferSize", "hipsolverDnCheevd_bufferSize", "library"); subst("cusolverDnChetrd", "hipsolverDnChetrd", "library"); subst("cusolverDnChetrd_bufferSize", "hipsolverDnChetrd_bufferSize", "library"); subst("cusolverDnCpotrf", "hipsolverDnCpotrf", "library"); @@ -1442,6 +1452,8 @@ sub experimentalSubstitutions { subst("cusolverDnDpotri_bufferSize", "hipsolverDnDpotri_bufferSize", "library"); subst("cusolverDnDpotrs", "hipsolverDnDpotrs", "library"); subst("cusolverDnDpotrsBatched", "hipsolverDnDpotrsBatched", "library"); + subst("cusolverDnDsyevd", "hipsolverDnDsyevd", "library"); + subst("cusolverDnDsyevd_bufferSize", "hipsolverDnDsyevd_bufferSize", "library"); subst("cusolverDnDsytrd", "hipsolverDnDsytrd", "library"); subst("cusolverDnDsytrd_bufferSize", "hipsolverDnDsytrd_bufferSize", "library"); subst("cusolverDnDsytrf", "hipsolverDnDsytrf", "library"); @@ -1478,6 +1490,8 @@ sub experimentalSubstitutions { subst("cusolverDnSpotri_bufferSize", "hipsolverDnSpotri_bufferSize", "library"); subst("cusolverDnSpotrs", "hipsolverDnSpotrs", "library"); subst("cusolverDnSpotrsBatched", "hipsolverDnSpotrsBatched", "library"); + subst("cusolverDnSsyevd", "hipsolverDnSsyevd", "library"); + subst("cusolverDnSsyevd_bufferSize", "hipsolverDnSsyevd_bufferSize", "library"); subst("cusolverDnSsytrd", "hipsolverDnSsytrd", "library"); subst("cusolverDnSsytrd_bufferSize", "hipsolverDnSsytrd_bufferSize", "library"); subst("cusolverDnSsytrf", "hipsolverDnSsytrf", "library"); @@ -1495,6 +1509,8 @@ sub experimentalSubstitutions { subst("cusolverDnZgetrf", "hipsolverDnZgetrf", "library"); subst("cusolverDnZgetrf_bufferSize", "hipsolverDnZgetrf_bufferSize", "library"); subst("cusolverDnZgetrs", "hipsolverDnZgetrs", "library"); + subst("cusolverDnZheevd", "hipsolverDnZheevd", "library"); + subst("cusolverDnZheevd_bufferSize", "hipsolverDnZheevd_bufferSize", "library"); subst("cusolverDnZhetrd", "hipsolverDnZhetrd", "library"); subst("cusolverDnZhetrd_bufferSize", "hipsolverDnZhetrd_bufferSize", "library"); subst("cusolverDnZpotrf", "hipsolverDnZpotrf", "library"); diff --git a/docs/tables/CUSOLVER_API_supported_by_HIP.md b/docs/tables/CUSOLVER_API_supported_by_HIP.md index c296ddf0..a8cd0f22 100644 --- a/docs/tables/CUSOLVER_API_supported_by_HIP.md +++ b/docs/tables/CUSOLVER_API_supported_by_HIP.md @@ -133,6 +133,8 @@ |`cusolverDnCgetrf`| | | | |`hipsolverDnCgetrf`|5.1.0| | | |6.1.0| |`cusolverDnCgetrf_bufferSize`| | | | |`hipsolverDnCgetrf_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnCgetrs`| | | | |`hipsolverDnCgetrs`|5.1.0| | | |6.1.0| +|`cusolverDnCheevd`|8.0| | | |`hipsolverDnCheevd`|5.1.0| | | |6.1.0| +|`cusolverDnCheevd_bufferSize`|8.0| | | |`hipsolverDnCheevd_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnChetrd`|8.0| | | |`hipsolverDnChetrd`|5.1.0| | | |6.1.0| |`cusolverDnChetrd_bufferSize`|8.0| | | |`hipsolverDnChetrd_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnClaswp`| | | | | | | | | | | @@ -211,6 +213,8 @@ |`cusolverDnDpotri_bufferSize`|10.1| | | |`hipsolverDnDpotri_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnDpotrs`| | | | |`hipsolverDnDpotrs`|5.1.0| | | |6.1.0| |`cusolverDnDpotrsBatched`|9.1| | | |`hipsolverDnDpotrsBatched`|5.1.0| | | |6.1.0| +|`cusolverDnDsyevd`|8.0| | | |`hipsolverDnDsyevd`|5.1.0| | | |6.1.0| +|`cusolverDnDsyevd_bufferSize`|8.0| | | |`hipsolverDnDsyevd_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnDsytrd`| | | | |`hipsolverDnDsytrd`|5.1.0| | | |6.1.0| |`cusolverDnDsytrd_bufferSize`|8.0| | | |`hipsolverDnDsytrd_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnDsytrf`| | | | |`hipsolverDnDsytrf`|5.1.0| | | |6.1.0| @@ -291,6 +295,8 @@ |`cusolverDnSpotri_bufferSize`|10.1| | | |`hipsolverDnSpotri_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnSpotrs`| | | | |`hipsolverDnSpotrs`|5.1.0| | | |6.1.0| |`cusolverDnSpotrsBatched`|9.1| | | |`hipsolverDnSpotrsBatched`|5.1.0| | | |6.1.0| +|`cusolverDnSsyevd`|8.0| | | |`hipsolverDnSsyevd`|5.1.0| | | |6.1.0| +|`cusolverDnSsyevd_bufferSize`|8.0| | | |`hipsolverDnSsyevd_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnSsytrd`| | | | |`hipsolverDnSsytrd`|5.1.0| | | |6.1.0| |`cusolverDnSsytrd_bufferSize`|8.0| | | |`hipsolverDnSsytrd_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnSsytrf`| | | | |`hipsolverDnSsytrf`|5.1.0| | | |6.1.0| @@ -333,6 +339,8 @@ |`cusolverDnZgetrf`| | | | |`hipsolverDnZgetrf`|5.1.0| | | |6.1.0| |`cusolverDnZgetrf_bufferSize`| | | | |`hipsolverDnZgetrf_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnZgetrs`| | | | |`hipsolverDnZgetrs`|5.1.0| | | |6.1.0| +|`cusolverDnZheevd`|8.0| | | |`hipsolverDnZheevd`|5.1.0| | | |6.1.0| +|`cusolverDnZheevd_bufferSize`|8.0| | | |`hipsolverDnZheevd_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnZhetrd`|8.0| | | |`hipsolverDnZhetrd`|5.1.0| | | |6.1.0| |`cusolverDnZhetrd_bufferSize`|8.0| | | |`hipsolverDnZhetrd_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnZlaswp`| | | | | | | | | | | 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 1a04a46e..42a94fed 100644 --- a/docs/tables/CUSOLVER_API_supported_by_HIP_and_ROC.md +++ b/docs/tables/CUSOLVER_API_supported_by_HIP_and_ROC.md @@ -133,6 +133,8 @@ |`cusolverDnCgetrf`| | | | |`hipsolverDnCgetrf`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnCgetrf_bufferSize`| | | | |`hipsolverDnCgetrf_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnCgetrs`| | | | |`hipsolverDnCgetrs`|5.1.0| | | |6.1.0| | | | | | | +|`cusolverDnCheevd`|8.0| | | |`hipsolverDnCheevd`|5.1.0| | | |6.1.0| | | | | | | +|`cusolverDnCheevd_bufferSize`|8.0| | | |`hipsolverDnCheevd_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnChetrd`|8.0| | | |`hipsolverDnChetrd`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnChetrd_bufferSize`|8.0| | | |`hipsolverDnChetrd_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnClaswp`| | | | | | | | | | | | | | | | | @@ -211,6 +213,8 @@ |`cusolverDnDpotri_bufferSize`|10.1| | | |`hipsolverDnDpotri_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnDpotrs`| | | | |`hipsolverDnDpotrs`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnDpotrsBatched`|9.1| | | |`hipsolverDnDpotrsBatched`|5.1.0| | | |6.1.0| | | | | | | +|`cusolverDnDsyevd`|8.0| | | |`hipsolverDnDsyevd`|5.1.0| | | |6.1.0| | | | | | | +|`cusolverDnDsyevd_bufferSize`|8.0| | | |`hipsolverDnDsyevd_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnDsytrd`| | | | |`hipsolverDnDsytrd`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnDsytrd_bufferSize`|8.0| | | |`hipsolverDnDsytrd_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnDsytrf`| | | | |`hipsolverDnDsytrf`|5.1.0| | | |6.1.0| | | | | | | @@ -291,6 +295,8 @@ |`cusolverDnSpotri_bufferSize`|10.1| | | |`hipsolverDnSpotri_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnSpotrs`| | | | |`hipsolverDnSpotrs`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnSpotrsBatched`|9.1| | | |`hipsolverDnSpotrsBatched`|5.1.0| | | |6.1.0| | | | | | | +|`cusolverDnSsyevd`|8.0| | | |`hipsolverDnSsyevd`|5.1.0| | | |6.1.0| | | | | | | +|`cusolverDnSsyevd_bufferSize`|8.0| | | |`hipsolverDnSsyevd_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnSsytrd`| | | | |`hipsolverDnSsytrd`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnSsytrd_bufferSize`|8.0| | | |`hipsolverDnSsytrd_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnSsytrf`| | | | |`hipsolverDnSsytrf`|5.1.0| | | |6.1.0| | | | | | | @@ -333,6 +339,8 @@ |`cusolverDnZgetrf`| | | | |`hipsolverDnZgetrf`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnZgetrf_bufferSize`| | | | |`hipsolverDnZgetrf_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnZgetrs`| | | | |`hipsolverDnZgetrs`|5.1.0| | | |6.1.0| | | | | | | +|`cusolverDnZheevd`|8.0| | | |`hipsolverDnZheevd`|5.1.0| | | |6.1.0| | | | | | | +|`cusolverDnZheevd_bufferSize`|8.0| | | |`hipsolverDnZheevd_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnZhetrd`|8.0| | | |`hipsolverDnZhetrd`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnZhetrd_bufferSize`|8.0| | | |`hipsolverDnZhetrd_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnZlaswp`| | | | | | | | | | | | | | | | | diff --git a/docs/tables/CUSOLVER_API_supported_by_ROC.md b/docs/tables/CUSOLVER_API_supported_by_ROC.md index 098bd873..03205d8c 100644 --- a/docs/tables/CUSOLVER_API_supported_by_ROC.md +++ b/docs/tables/CUSOLVER_API_supported_by_ROC.md @@ -133,6 +133,8 @@ |`cusolverDnCgetrf`| | | | | | | | | | | |`cusolverDnCgetrf_bufferSize`| | | | | | | | | | | |`cusolverDnCgetrs`| | | | | | | | | | | +|`cusolverDnCheevd`|8.0| | | | | | | | | | +|`cusolverDnCheevd_bufferSize`|8.0| | | | | | | | | | |`cusolverDnChetrd`|8.0| | | | | | | | | | |`cusolverDnChetrd_bufferSize`|8.0| | | | | | | | | | |`cusolverDnClaswp`| | | | | | | | | | | @@ -211,6 +213,8 @@ |`cusolverDnDpotri_bufferSize`|10.1| | | | | | | | | | |`cusolverDnDpotrs`| | | | | | | | | | | |`cusolverDnDpotrsBatched`|9.1| | | | | | | | | | +|`cusolverDnDsyevd`|8.0| | | | | | | | | | +|`cusolverDnDsyevd_bufferSize`|8.0| | | | | | | | | | |`cusolverDnDsytrd`| | | | | | | | | | | |`cusolverDnDsytrd_bufferSize`|8.0| | | | | | | | | | |`cusolverDnDsytrf`| | | | | | | | | | | @@ -291,6 +295,8 @@ |`cusolverDnSpotri_bufferSize`|10.1| | | | | | | | | | |`cusolverDnSpotrs`| | | | | | | | | | | |`cusolverDnSpotrsBatched`|9.1| | | | | | | | | | +|`cusolverDnSsyevd`|8.0| | | | | | | | | | +|`cusolverDnSsyevd_bufferSize`|8.0| | | | | | | | | | |`cusolverDnSsytrd`| | | | | | | | | | | |`cusolverDnSsytrd_bufferSize`|8.0| | | | | | | | | | |`cusolverDnSsytrf`| | | | | | | | | | | @@ -333,6 +339,8 @@ |`cusolverDnZgetrf`| | | | | | | | | | | |`cusolverDnZgetrf_bufferSize`| | | | | | | | | | | |`cusolverDnZgetrs`| | | | | | | | | | | +|`cusolverDnZheevd`|8.0| | | | | | | | | | +|`cusolverDnZheevd_bufferSize`|8.0| | | | | | | | | | |`cusolverDnZhetrd`|8.0| | | | | | | | | | |`cusolverDnZhetrd_bufferSize`|8.0| | | | | | | | | | |`cusolverDnZlaswp`| | | | | | | | | | | diff --git a/src/CUDA2HIP_SOLVER_API_functions.cpp b/src/CUDA2HIP_SOLVER_API_functions.cpp index 22577afe..f9f9c61a 100644 --- a/src/CUDA2HIP_SOLVER_API_functions.cpp +++ b/src/CUDA2HIP_SOLVER_API_functions.cpp @@ -321,6 +321,16 @@ const std::map CUDA_SOLVER_FUNCTION_MAP { {"cusolverDnDgesvd", {"hipsolverDnDgesvd", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, {"cusolverDnCgesvd", {"hipsolverDnCgesvd", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, {"cusolverDnZgesvd", {"hipsolverDnZgesvd", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + // NOTE: rocsolver_(s|d|c|z)gesvd have a harness of other HIP and ROC API calls + {"cusolverDnSsyevd_bufferSize", {"hipsolverDnSsyevd_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + {"cusolverDnDsyevd_bufferSize", {"hipsolverDnDsyevd_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + {"cusolverDnCheevd_bufferSize", {"hipsolverDnCheevd_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + {"cusolverDnZheevd_bufferSize", {"hipsolverDnZheevd_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + // NOTE: rocsolver_(s|d)syevd and rocsolver_(c|z)heevd have a harness of other HIP and ROC API calls + {"cusolverDnSsyevd", {"hipsolverDnSsyevd", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + {"cusolverDnDsyevd", {"hipsolverDnDsyevd", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + {"cusolverDnCheevd", {"hipsolverDnCheevd", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + {"cusolverDnZheevd", {"hipsolverDnZheevd", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, }; const std::map CUDA_SOLVER_FUNCTION_VER_MAP { @@ -505,6 +515,14 @@ const std::map CUDA_SOLVER_FUNCTION_VER_MAP { {"cusolverDnDormtr", {CUDA_80, CUDA_0, CUDA_0}}, {"cusolverDnCunmtr", {CUDA_80, CUDA_0, CUDA_0}}, {"cusolverDnZunmtr", {CUDA_80, CUDA_0, CUDA_0}}, + {"cusolverDnSsyevd_bufferSize", {CUDA_80, CUDA_0, CUDA_0}}, + {"cusolverDnDsyevd_bufferSize", {CUDA_80, CUDA_0, CUDA_0}}, + {"cusolverDnCheevd_bufferSize", {CUDA_80, CUDA_0, CUDA_0}}, + {"cusolverDnZheevd_bufferSize", {CUDA_80, CUDA_0, CUDA_0}}, + {"cusolverDnSsyevd", {CUDA_80, CUDA_0, CUDA_0}}, + {"cusolverDnDsyevd", {CUDA_80, CUDA_0, CUDA_0}}, + {"cusolverDnCheevd", {CUDA_80, CUDA_0, CUDA_0}}, + {"cusolverDnZheevd", {CUDA_80, CUDA_0, CUDA_0}}, }; const std::map HIP_SOLVER_FUNCTION_VER_MAP { @@ -648,6 +666,14 @@ const std::map HIP_SOLVER_FUNCTION_VER_MAP { {"hipsolverDnDgesvd", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, {"hipsolverDnCgesvd", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, {"hipsolverDnZgesvd", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnSsyevd_bufferSize", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnDsyevd_bufferSize", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnCheevd_bufferSize", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnZheevd_bufferSize", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnSsyevd", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnDsyevd", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnCheevd", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnZheevd", {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 553020e8..241fbf4f 100644 --- a/tests/unit_tests/synthetic/libraries/cusolver2hipsolver.cu +++ b/tests/unit_tests/synthetic/libraries/cusolver2hipsolver.cu @@ -33,6 +33,7 @@ int main() { float fU = 0.f; float fVT = 0.f; float fX = 0.f; + float fW = 0.f; float fTAU = 0.f; float fTAUQ = 0.f; float fTAUP = 0.f; @@ -45,6 +46,7 @@ int main() { double dU = 0.f; double dVT = 0.f; double dX = 0.f; + double dW = 0.f; double dTAU = 0.f; double dTAUQ = 0.f; double dTAUP = 0.f; @@ -673,6 +675,46 @@ int main() { // 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); + + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnSsyevd_bufferSize(cusolverDnHandle_t handle, cusolverEigMode_t jobz, cublasFillMode_t uplo, int n, const float * A, int lda, const float * W, int * lwork); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnSsyevd_bufferSize(hipsolverHandle_t handle, hipsolverEigMode_t jobz, hipblasFillMode_t uplo, int n, const float* A, int lda, const float* W, int* lwork); + // CHECK: status = hipsolverDnSsyevd_bufferSize(handle, eigMode, fillMode, n, &fA, lda, &fW, &Lwork); + status = cusolverDnSsyevd_bufferSize(handle, eigMode, fillMode, n, &fA, lda, &fW, &Lwork); + + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnDsyevd_bufferSize(cusolverDnHandle_t handle, cusolverEigMode_t jobz, cublasFillMode_t uplo, int n, const double * A, int lda, const double * W, int * lwork); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnDsyevd_bufferSize(hipsolverHandle_t handle, hipsolverEigMode_t jobz, hipblasFillMode_t uplo, int n, const double* A, int lda, const double* W, int* lwork); + // CHECK: status = hipsolverDnDsyevd_bufferSize(handle, eigMode, fillMode, n, &dA, lda, &dW, &Lwork); + status = cusolverDnDsyevd_bufferSize(handle, eigMode, fillMode, n, &dA, lda, &dW, &Lwork); + + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnCheevd_bufferSize(cusolverDnHandle_t handle, cusolverEigMode_t jobz, cublasFillMode_t uplo, int n, const cuComplex * A, int lda, const float * W, int * lwork); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnCheevd_bufferSize(hipsolverHandle_t handle, hipsolverEigMode_t jobz, hipblasFillMode_t uplo, int n, const hipFloatComplex* A, int lda, const float* W, int* lwork); + // CHECK: status = hipsolverDnCheevd_bufferSize(handle, eigMode, fillMode, n, &complexA, lda, &fW, &Lwork); + status = cusolverDnCheevd_bufferSize(handle, eigMode, fillMode, n, &complexA, lda, &fW, &Lwork); + + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnZheevd_bufferSize(cusolverDnHandle_t handle, cusolverEigMode_t jobz, cublasFillMode_t uplo, int n, const cuDoubleComplex *A, int lda, const double * W, int * lwork); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnZheevd_bufferSize(hipsolverHandle_t handle, hipsolverEigMode_t jobz, hipblasFillMode_t uplo, int n, const hipDoubleComplex* A, int lda, const double* W, int* lwork); + // CHECK: status = hipsolverDnZheevd_bufferSize(handle, eigMode, fillMode, n, &dComplexA, lda, &dW, &Lwork); + status = cusolverDnZheevd_bufferSize(handle, eigMode, fillMode, n, &dComplexA, lda, &dW, &Lwork); + + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnSsyevd(cusolverDnHandle_t handle, cusolverEigMode_t jobz, cublasFillMode_t uplo, int n, float * A, int lda, float * W, float * work, int lwork, int * info); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnSsyevd(hipsolverHandle_t handle, hipsolverEigMode_t jobz, hipblasFillMode_t uplo, int n, float* A, int lda, float* W, float* work, int lwork, int* devInfo); + // CHECK: status = hipsolverDnSsyevd(handle, eigMode, fillMode, n, &fA, lda, &fW, &fWorkspace, Lwork, &info); + status = cusolverDnSsyevd(handle, eigMode, fillMode, n, &fA, lda, &fW, &fWorkspace, Lwork, &info); + + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnDsyevd(cusolverDnHandle_t handle, cusolverEigMode_t jobz, cublasFillMode_t uplo, int n, double * A, int lda, double * W, double * work, int lwork, int * info); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnDsyevd(hipsolverHandle_t handle, hipsolverEigMode_t jobz, hipblasFillMode_t uplo, int n, double* A, int lda, double* W, double* work, int lwork, int* devInfo); + // CHECK: status = hipsolverDnDsyevd(handle, eigMode, fillMode, n, &dA, lda, &dW, &dWorkspace, Lwork, &info); + status = cusolverDnDsyevd(handle, eigMode, fillMode, n, &dA, lda, &dW, &dWorkspace, Lwork, &info); + + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnCheevd(cusolverDnHandle_t handle, cusolverEigMode_t jobz, cublasFillMode_t uplo, int n, cuComplex * A, int lda, float * W, cuComplex * work, int lwork, int * info); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnCheevd(hipsolverHandle_t handle, hipsolverEigMode_t jobz, hipblasFillMode_t uplo, int n, hipFloatComplex* A, int lda, float* W, hipFloatComplex* work, int lwork, int* devInfo); + // CHECK: status = hipsolverDnCheevd(handle, eigMode, fillMode, n, &complexA, lda, &fW, &complexWorkspace, Lwork, &info); + status = cusolverDnCheevd(handle, eigMode, fillMode, n, &complexA, lda, &fW, &complexWorkspace, Lwork, &info); + + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnZheevd(cusolverDnHandle_t handle, cusolverEigMode_t jobz, cublasFillMode_t uplo, int n, cuDoubleComplex * A, int lda, double * W, cuDoubleComplex * work, int lwork, int * info); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnZheevd(hipsolverHandle_t handle, hipsolverEigMode_t jobz, hipblasFillMode_t uplo, int n, hipDoubleComplex* A, int lda, double* W, hipDoubleComplex* work, int lwork, int* devInfo); + // CHECK: status = hipsolverDnZheevd(handle, eigMode, fillMode, n, &dComplexA, lda, &dW, &dComplexWorkspace, Lwork, &info); + status = cusolverDnZheevd(handle, eigMode, fillMode, n, &dComplexA, lda, &dW, &dComplexWorkspace, Lwork, &info); #endif #if CUDA_VERSION >= 9000