From 9e629133c3b139262bc3262f34f078865551471d Mon Sep 17 00:00:00 2001 From: Evgeny Mankov Date: Sun, 10 Dec 2023 14:11:50 +0100 Subject: [PATCH] [HIPIFY][#675][#677][SOLVER][feature] `cuSOLVER` support - Step 30 - Functions (DN) + `cusolverDn(S|D|C|Z)gebrd_(bufferSize)?` are `SUPPORTED` by `hipSOLVER` only + [NOTE] `rocsolver_(s|d|c|z)gebrd` 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 | 18 ++++++ .../synthetic/libraries/cusolver2hipsolver.cu | 56 +++++++++++++++++-- 6 files changed, 110 insertions(+), 4 deletions(-) diff --git a/bin/hipify-perl b/bin/hipify-perl index b5472899..6c6e3d62 100755 --- a/bin/hipify-perl +++ b/bin/hipify-perl @@ -1098,6 +1098,8 @@ my %experimental_funcs = ( "cusolverDnZgetrf" => "6.1.0", "cusolverDnZgeqrf_bufferSize" => "6.1.0", "cusolverDnZgeqrf" => "6.1.0", + "cusolverDnZgebrd_bufferSize" => "6.1.0", + "cusolverDnZgebrd" => "6.1.0", "cusolverDnZZgesv_bufferSize" => "6.1.0", "cusolverDnZZgesv" => "6.1.0", "cusolverDnZZgels_bufferSize" => "6.1.0", @@ -1120,6 +1122,8 @@ my %experimental_funcs = ( "cusolverDnSgetrf" => "6.1.0", "cusolverDnSgeqrf_bufferSize" => "6.1.0", "cusolverDnSgeqrf" => "6.1.0", + "cusolverDnSgebrd_bufferSize" => "6.1.0", + "cusolverDnSgebrd" => "6.1.0", "cusolverDnSetStream" => "6.1.0", "cusolverDnSSgesv_bufferSize" => "6.1.0", "cusolverDnSSgesv" => "6.1.0", @@ -1145,6 +1149,8 @@ my %experimental_funcs = ( "cusolverDnDgetrf" => "6.1.0", "cusolverDnDgeqrf_bufferSize" => "6.1.0", "cusolverDnDgeqrf" => "6.1.0", + "cusolverDnDgebrd_bufferSize" => "6.1.0", + "cusolverDnDgebrd" => "6.1.0", "cusolverDnDestroy" => "6.1.0", "cusolverDnDDgesv_bufferSize" => "6.1.0", "cusolverDnDDgesv" => "6.1.0", @@ -1169,6 +1175,8 @@ my %experimental_funcs = ( "cusolverDnCgetrf" => "6.1.0", "cusolverDnCgeqrf_bufferSize" => "6.1.0", "cusolverDnCgeqrf" => "6.1.0", + "cusolverDnCgebrd_bufferSize" => "6.1.0", + "cusolverDnCgebrd" => "6.1.0", "cusolverDnCCgesv_bufferSize" => "6.1.0", "cusolverDnCCgesv" => "6.1.0", "cusolverDnCCgels_bufferSize" => "6.1.0", @@ -1332,6 +1340,8 @@ sub experimentalSubstitutions { subst("cusolverDnCCgels_bufferSize", "hipsolverDnCCgels_bufferSize", "library"); subst("cusolverDnCCgesv", "hipsolverDnCCgesv", "library"); subst("cusolverDnCCgesv_bufferSize", "hipsolverDnCCgesv_bufferSize", "library"); + subst("cusolverDnCgebrd", "hipsolverDnCgebrd", "library"); + subst("cusolverDnCgebrd_bufferSize", "hipsolverDnCgebrd_bufferSize", "library"); subst("cusolverDnCgeqrf", "hipsolverDnCgeqrf", "library"); subst("cusolverDnCgeqrf_bufferSize", "hipsolverDnCgeqrf_bufferSize", "library"); subst("cusolverDnCgetrf", "hipsolverDnCgetrf", "library"); @@ -1356,6 +1366,8 @@ sub experimentalSubstitutions { subst("cusolverDnDDgesv", "hipsolverDnDDgesv", "library"); subst("cusolverDnDDgesv_bufferSize", "hipsolverDnDDgesv_bufferSize", "library"); subst("cusolverDnDestroy", "hipsolverDnDestroy", "library"); + subst("cusolverDnDgebrd", "hipsolverDnDgebrd", "library"); + subst("cusolverDnDgebrd_bufferSize", "hipsolverDnDgebrd_bufferSize", "library"); subst("cusolverDnDgeqrf", "hipsolverDnDgeqrf", "library"); subst("cusolverDnDgeqrf_bufferSize", "hipsolverDnDgeqrf_bufferSize", "library"); subst("cusolverDnDgetrf", "hipsolverDnDgetrf", "library"); @@ -1380,6 +1392,8 @@ sub experimentalSubstitutions { subst("cusolverDnSSgesv", "hipsolverDnSSgesv", "library"); subst("cusolverDnSSgesv_bufferSize", "hipsolverDnSSgesv_bufferSize", "library"); subst("cusolverDnSetStream", "hipsolverSetStream", "library"); + subst("cusolverDnSgebrd", "hipsolverDnSgebrd", "library"); + subst("cusolverDnSgebrd_bufferSize", "hipsolverDnSgebrd_bufferSize", "library"); subst("cusolverDnSgeqrf", "hipsolverDnSgeqrf", "library"); subst("cusolverDnSgeqrf_bufferSize", "hipsolverDnSgeqrf_bufferSize", "library"); subst("cusolverDnSgetrf", "hipsolverDnSgetrf", "library"); @@ -1402,6 +1416,8 @@ sub experimentalSubstitutions { subst("cusolverDnZZgels_bufferSize", "hipsolverDnZZgels_bufferSize", "library"); subst("cusolverDnZZgesv", "hipsolverDnZZgesv", "library"); subst("cusolverDnZZgesv_bufferSize", "hipsolverDnZZgesv_bufferSize", "library"); + subst("cusolverDnZgebrd", "hipsolverDnZgebrd", "library"); + subst("cusolverDnZgebrd_bufferSize", "hipsolverDnZgebrd_bufferSize", "library"); subst("cusolverDnZgeqrf", "hipsolverDnZgeqrf", "library"); subst("cusolverDnZgeqrf_bufferSize", "hipsolverDnZgeqrf_bufferSize", "library"); subst("cusolverDnZgetrf", "hipsolverDnZgetrf", "library"); diff --git a/docs/tables/CUSOLVER_API_supported_by_HIP.md b/docs/tables/CUSOLVER_API_supported_by_HIP.md index 4a96ff53..e7809ab0 100644 --- a/docs/tables/CUSOLVER_API_supported_by_HIP.md +++ b/docs/tables/CUSOLVER_API_supported_by_HIP.md @@ -124,6 +124,8 @@ |`cusolverDnCYgels_bufferSize`|11.0| | | | | | | | | | |`cusolverDnCYgesv`|11.0| | | | | | | | | | |`cusolverDnCYgesv_bufferSize`|11.0| | | | | | | | | | +|`cusolverDnCgebrd`| | | | |`hipsolverDnCgebrd`|5.1.0| | | |6.1.0| +|`cusolverDnCgebrd_bufferSize`| | | | |`hipsolverDnCgebrd_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnCgeqrf`| | | | |`hipsolverDnCgeqrf`|5.1.0| | | |6.1.0| |`cusolverDnCgeqrf_bufferSize`| | | | |`hipsolverDnCgeqrf_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnCgetrf`| | | | |`hipsolverDnCgetrf`|5.1.0| | | |6.1.0| @@ -170,6 +172,8 @@ |`cusolverDnDXgesv`|11.0| | | | | | | | | | |`cusolverDnDXgesv_bufferSize`|11.0| | | | | | | | | | |`cusolverDnDestroy`| | | | |`hipsolverDnDestroy`|5.1.0| | | |6.1.0| +|`cusolverDnDgebrd`| | | | |`hipsolverDnDgebrd`|5.1.0| | | |6.1.0| +|`cusolverDnDgebrd_bufferSize`| | | | |`hipsolverDnDgebrd_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnDgeqrf`| | | | |`hipsolverDnDgeqrf`|5.1.0| | | |6.1.0| |`cusolverDnDgeqrf_bufferSize`| | | | |`hipsolverDnDgeqrf_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnDgetrf`| | | | |`hipsolverDnDgetrf`|5.1.0| | | |6.1.0| @@ -238,6 +242,8 @@ |`cusolverDnSetAdvOptions`|11.0| | | | | | | | | | |`cusolverDnSetDeterministicMode`|12.2| | | | | | | | | | |`cusolverDnSetStream`| | | | |`hipsolverSetStream`|4.5.0| | | |6.1.0| +|`cusolverDnSgebrd`| | | | |`hipsolverDnSgebrd`|5.1.0| | | |6.1.0| +|`cusolverDnSgebrd_bufferSize`| | | | |`hipsolverDnSgebrd_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnSgeqrf`| | | | |`hipsolverDnSgeqrf`|5.1.0| | | |6.1.0| |`cusolverDnSgeqrf_bufferSize`| | | | |`hipsolverDnSgeqrf_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnSgetrf`| | | | |`hipsolverDnSgetrf`|5.1.0| | | |6.1.0| @@ -288,6 +294,8 @@ |`cusolverDnZZgels_bufferSize`|11.0| | | |`hipsolverDnZZgels_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnZZgesv`|10.2| | | |`hipsolverDnZZgesv`|5.1.0| | | |6.1.0| |`cusolverDnZZgesv_bufferSize`|10.2| | | |`hipsolverDnZZgesv_bufferSize`|5.1.0| | | |6.1.0| +|`cusolverDnZgebrd`| | | | |`hipsolverDnZgebrd`|5.1.0| | | |6.1.0| +|`cusolverDnZgebrd_bufferSize`| | | | |`hipsolverDnZgebrd_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnZgeqrf`| | | | |`hipsolverDnZgeqrf`|5.1.0| | | |6.1.0| |`cusolverDnZgeqrf_bufferSize`| | | | |`hipsolverDnZgeqrf_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnZgetrf`| | | | |`hipsolverDnZgetrf`|5.1.0| | | |6.1.0| 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 b6afbe8a..602ca7d9 100644 --- a/docs/tables/CUSOLVER_API_supported_by_HIP_and_ROC.md +++ b/docs/tables/CUSOLVER_API_supported_by_HIP_and_ROC.md @@ -124,6 +124,8 @@ |`cusolverDnCYgels_bufferSize`|11.0| | | | | | | | | | | | | | | | |`cusolverDnCYgesv`|11.0| | | | | | | | | | | | | | | | |`cusolverDnCYgesv_bufferSize`|11.0| | | | | | | | | | | | | | | | +|`cusolverDnCgebrd`| | | | |`hipsolverDnCgebrd`|5.1.0| | | |6.1.0| | | | | | | +|`cusolverDnCgebrd_bufferSize`| | | | |`hipsolverDnCgebrd_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnCgeqrf`| | | | |`hipsolverDnCgeqrf`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnCgeqrf_bufferSize`| | | | |`hipsolverDnCgeqrf_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnCgetrf`| | | | |`hipsolverDnCgetrf`|5.1.0| | | |6.1.0| | | | | | | @@ -170,6 +172,8 @@ |`cusolverDnDXgesv`|11.0| | | | | | | | | | | | | | | | |`cusolverDnDXgesv_bufferSize`|11.0| | | | | | | | | | | | | | | | |`cusolverDnDestroy`| | | | |`hipsolverDnDestroy`|5.1.0| | | |6.1.0|`rocblas_destroy_handle`| | | | | | +|`cusolverDnDgebrd`| | | | |`hipsolverDnDgebrd`|5.1.0| | | |6.1.0| | | | | | | +|`cusolverDnDgebrd_bufferSize`| | | | |`hipsolverDnDgebrd_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnDgeqrf`| | | | |`hipsolverDnDgeqrf`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnDgeqrf_bufferSize`| | | | |`hipsolverDnDgeqrf_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnDgetrf`| | | | |`hipsolverDnDgetrf`|5.1.0| | | |6.1.0| | | | | | | @@ -238,6 +242,8 @@ |`cusolverDnSetAdvOptions`|11.0| | | | | | | | | | | | | | | | |`cusolverDnSetDeterministicMode`|12.2| | | | | | | | | | | | | | | | |`cusolverDnSetStream`| | | | |`hipsolverSetStream`|4.5.0| | | |6.1.0|`rocblas_set_stream`| | | | | | +|`cusolverDnSgebrd`| | | | |`hipsolverDnSgebrd`|5.1.0| | | |6.1.0| | | | | | | +|`cusolverDnSgebrd_bufferSize`| | | | |`hipsolverDnSgebrd_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnSgeqrf`| | | | |`hipsolverDnSgeqrf`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnSgeqrf_bufferSize`| | | | |`hipsolverDnSgeqrf_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnSgetrf`| | | | |`hipsolverDnSgetrf`|5.1.0| | | |6.1.0| | | | | | | @@ -288,6 +294,8 @@ |`cusolverDnZZgels_bufferSize`|11.0| | | |`hipsolverDnZZgels_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnZZgesv`|10.2| | | |`hipsolverDnZZgesv`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnZZgesv_bufferSize`|10.2| | | |`hipsolverDnZZgesv_bufferSize`|5.1.0| | | |6.1.0| | | | | | | +|`cusolverDnZgebrd`| | | | |`hipsolverDnZgebrd`|5.1.0| | | |6.1.0| | | | | | | +|`cusolverDnZgebrd_bufferSize`| | | | |`hipsolverDnZgebrd_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnZgeqrf`| | | | |`hipsolverDnZgeqrf`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnZgeqrf_bufferSize`| | | | |`hipsolverDnZgeqrf_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnZgetrf`| | | | |`hipsolverDnZgetrf`|5.1.0| | | |6.1.0| | | | | | | diff --git a/docs/tables/CUSOLVER_API_supported_by_ROC.md b/docs/tables/CUSOLVER_API_supported_by_ROC.md index 58b5801a..86f4f8c8 100644 --- a/docs/tables/CUSOLVER_API_supported_by_ROC.md +++ b/docs/tables/CUSOLVER_API_supported_by_ROC.md @@ -124,6 +124,8 @@ |`cusolverDnCYgels_bufferSize`|11.0| | | | | | | | | | |`cusolverDnCYgesv`|11.0| | | | | | | | | | |`cusolverDnCYgesv_bufferSize`|11.0| | | | | | | | | | +|`cusolverDnCgebrd`| | | | | | | | | | | +|`cusolverDnCgebrd_bufferSize`| | | | | | | | | | | |`cusolverDnCgeqrf`| | | | | | | | | | | |`cusolverDnCgeqrf_bufferSize`| | | | | | | | | | | |`cusolverDnCgetrf`| | | | | | | | | | | @@ -170,6 +172,8 @@ |`cusolverDnDXgesv`|11.0| | | | | | | | | | |`cusolverDnDXgesv_bufferSize`|11.0| | | | | | | | | | |`cusolverDnDestroy`| | | | |`rocblas_destroy_handle`| | | | | | +|`cusolverDnDgebrd`| | | | | | | | | | | +|`cusolverDnDgebrd_bufferSize`| | | | | | | | | | | |`cusolverDnDgeqrf`| | | | | | | | | | | |`cusolverDnDgeqrf_bufferSize`| | | | | | | | | | | |`cusolverDnDgetrf`| | | | | | | | | | | @@ -238,6 +242,8 @@ |`cusolverDnSetAdvOptions`|11.0| | | | | | | | | | |`cusolverDnSetDeterministicMode`|12.2| | | | | | | | | | |`cusolverDnSetStream`| | | | |`rocblas_set_stream`| | | | | | +|`cusolverDnSgebrd`| | | | | | | | | | | +|`cusolverDnSgebrd_bufferSize`| | | | | | | | | | | |`cusolverDnSgeqrf`| | | | | | | | | | | |`cusolverDnSgeqrf_bufferSize`| | | | | | | | | | | |`cusolverDnSgetrf`| | | | | | | | | | | @@ -288,6 +294,8 @@ |`cusolverDnZZgels_bufferSize`|11.0| | | | | | | | | | |`cusolverDnZZgesv`|10.2| | | | | | | | | | |`cusolverDnZZgesv_bufferSize`|10.2| | | | | | | | | | +|`cusolverDnZgebrd`| | | | | | | | | | | +|`cusolverDnZgebrd_bufferSize`| | | | | | | | | | | |`cusolverDnZgeqrf`| | | | | | | | | | | |`cusolverDnZgeqrf_bufferSize`| | | | | | | | | | | |`cusolverDnZgetrf`| | | | | | | | | | | diff --git a/src/CUDA2HIP_SOLVER_API_functions.cpp b/src/CUDA2HIP_SOLVER_API_functions.cpp index 98bdb78a..59eead76 100644 --- a/src/CUDA2HIP_SOLVER_API_functions.cpp +++ b/src/CUDA2HIP_SOLVER_API_functions.cpp @@ -261,6 +261,16 @@ const std::map CUDA_SOLVER_FUNCTION_MAP { {"cusolverDnDsytri", {"hipsolverDnDsytri", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}}, {"cusolverDnCsytri", {"hipsolverDnCsytri", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}}, {"cusolverDnZsytri", {"hipsolverDnZsytri", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}}, + // NOTE: rocsolver_(s|d|c|z)gebrd have a harness of other HIP and ROC API calls + {"cusolverDnSgebrd_bufferSize", {"hipsolverDnSgebrd_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + {"cusolverDnDgebrd_bufferSize", {"hipsolverDnDgebrd_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + {"cusolverDnCgebrd_bufferSize", {"hipsolverDnCgebrd_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + {"cusolverDnZgebrd_bufferSize", {"hipsolverDnZgebrd_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + // NOTE: rocsolver_(s|d|c|z)gebrd have a harness of other HIP and ROC API calls + {"cusolverDnSgebrd", {"hipsolverDnSgebrd", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + {"cusolverDnDgebrd", {"hipsolverDnDgebrd", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + {"cusolverDnCgebrd", {"hipsolverDnCgebrd", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + {"cusolverDnZgebrd", {"hipsolverDnZgebrd", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, }; const std::map CUDA_SOLVER_FUNCTION_VER_MAP { @@ -510,6 +520,14 @@ const std::map HIP_SOLVER_FUNCTION_VER_MAP { {"hipsolverDnDsytrf", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, {"hipsolverDnCsytrf", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, {"hipsolverDnZsytrf", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnSgebrd_bufferSize", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnDgebrd_bufferSize", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnCgebrd_bufferSize", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnZgebrd_bufferSize", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnSgebrd", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnDgebrd", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnCgebrd", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnZgebrd", {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 0e225bf6..f152657f 100644 --- a/tests/unit_tests/synthetic/libraries/cusolver2hipsolver.cu +++ b/tests/unit_tests/synthetic/libraries/cusolver2hipsolver.cu @@ -25,13 +25,21 @@ int main() { float fA = 0.f; float fB = 0.f; float fC = 0.f; + float fD = 0.f; + float fE = 0.f; float fX = 0.f; float fTAU = 0.f; + float fTAUQ = 0.f; + float fTAUP = 0.f; double dA = 0.f; double dB = 0.f; double dC = 0.f; + double dD = 0.f; + double dE = 0.f; double dX = 0.f; double dTAU = 0.f; + double dTAUQ = 0.f; + double dTAUP = 0.f; float fWorkspace = 0.f; double dWorkspace = 0.f; void *Workspace = nullptr; @@ -42,11 +50,11 @@ int main() { double** dAarray = 0; double** dBarray = 0; - // CHECK: hipDoubleComplex dComplexA, dComplexB, dComplexC, dComplexX, dComplexWorkspace, dComplexTAU; - cuDoubleComplex dComplexA, dComplexB, dComplexC, dComplexX, dComplexWorkspace, dComplexTAU; + // CHECK: hipDoubleComplex dComplexA, dComplexB, dComplexC, dComplexD, dComplexE, dComplexX, dComplexWorkspace, dComplexTAU, dComplexTAUQ, dComplexTAUP; + cuDoubleComplex dComplexA, dComplexB, dComplexC, dComplexD, dComplexE, dComplexX, dComplexWorkspace, dComplexTAU, dComplexTAUQ, dComplexTAUP; - // CHECK: hipComplex complexA, complexB, complexC, complexX, complexWorkspace, complexTAU; - cuComplex complexA, complexB, complexC, complexX, complexWorkspace, complexTAU; + // CHECK: hipComplex complexA, complexB, complexC, complexD, complexE, complexX, complexWorkspace, complexTAU, complexTAUQ, complexTAUP; + cuComplex complexA, complexB, complexC, complexD, complexE, complexX, complexWorkspace, complexTAU, complexTAUQ, complexTAUP; // CHECK: hipDoubleComplex** dcomplexAarray = 0; // CHECK-NEXT: hipDoubleComplex** dcomplexBarray = 0; @@ -316,6 +324,46 @@ int main() { // CHECK: status = hipsolverDnZsytrf(handle, fillMode, n, &dComplexA, lda, &devIpiv, &dComplexWorkspace, Lwork, &devInfo); status = cusolverDnZsytrf(handle, fillMode, n, &dComplexA, lda, &devIpiv, &dComplexWorkspace, Lwork, &devInfo); + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnSgebrd_bufferSize(cusolverDnHandle_t handle, int m, int n, int * Lwork); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnSgebrd_bufferSize(hipsolverHandle_t handle, int m, int n, int* lwork); + // CHECK: status = hipsolverDnSgebrd_bufferSize(handle, m, n, &Lwork); + status = cusolverDnSgebrd_bufferSize(handle, m, n, &Lwork); + + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnDgebrd_bufferSize(cusolverDnHandle_t handle, int m, int n, int * Lwork); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnDgebrd_bufferSize(hipsolverHandle_t handle, int m, int n, int* lwork); + // CHECK: status = hipsolverDnDgebrd_bufferSize(handle, m, n, &Lwork); + status = cusolverDnDgebrd_bufferSize(handle, m, n, &Lwork); + + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnCgebrd_bufferSize(cusolverDnHandle_t handle, int m, int n, int * Lwork); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnCgebrd_bufferSize(hipsolverHandle_t handle, int m, int n, int* lwork); + // CHECK: status = hipsolverDnCgebrd_bufferSize(handle, m, n, &Lwork); + status = cusolverDnCgebrd_bufferSize(handle, m, n, &Lwork); + + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnZgebrd_bufferSize(cusolverDnHandle_t handle, int m, int n, int * Lwork); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnZgebrd_bufferSize(hipsolverHandle_t handle, int m, int n, int* lwork); + // CHECK: status = hipsolverDnZgebrd_bufferSize(handle, m, n, &Lwork); + status = cusolverDnZgebrd_bufferSize(handle, m, n, &Lwork); + + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnSgebrd(cusolverDnHandle_t handle, int m, int n, float * A, int lda, float * D, float * E, float * TAUQ, float * TAUP, float * Work, int Lwork, int * devInfo); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnSgebrd(hipsolverHandle_t handle, int m, int n, float* A, int lda, float* D, float* E, float* tauq, float* taup, float* work, int lwork, int* devInfo); + // CHECK: status = hipsolverDnSgebrd(handle, m, n, &fA, lda, &fD, &fE, &fTAUQ, &fTAUP, &fWorkspace, Lwork, &devInfo); + status = cusolverDnSgebrd(handle, m, n, &fA, lda, &fD, &fE, &fTAUQ, &fTAUP, &fWorkspace, Lwork, &devInfo); + + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnDgebrd(cusolverDnHandle_t handle, int m, int n, double * A, int lda, double * D, double * E, double * TAUQ, double * TAUP, double * Work, int Lwork, int * devInfo); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnDgebrd(hipsolverHandle_t handle, int m, int n, double* A, int lda, double* D, double* E, double* tauq, double* taup, double* work, int lwork, int* devInfo); + // CHECK: status = hipsolverDnDgebrd(handle, m, n, &dA, lda, &dD, &dE, &dTAUQ, &dTAUP, &dWorkspace, Lwork, &devInfo); + status = cusolverDnDgebrd(handle, m, n, &dA, lda, &dD, &dE, &dTAUQ, &dTAUP, &dWorkspace, Lwork, &devInfo); + + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnCgebrd(cusolverDnHandle_t handle, int m, int n, cuComplex * A, int lda, float * D, float * E, cuComplex * TAUQ, cuComplex * TAUP, cuComplex * Work, int Lwork, int * devInfo); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnCgebrd(hipsolverHandle_t handle, int m, int n, hipFloatComplex* A, int lda, float* D, float* E, hipFloatComplex* tauq, hipFloatComplex* taup, hipFloatComplex* work, int lwork, int* devInfo); + // CHECK: status = hipsolverDnCgebrd(handle, m, n, &complexA, lda, &fD, &fE, &complexTAUQ, &complexTAUP, &complexWorkspace, Lwork, &devInfo); + status = cusolverDnCgebrd(handle, m, n, &complexA, lda, &fD, &fE, &complexTAUQ, &complexTAUP, &complexWorkspace, Lwork, &devInfo); + + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnZgebrd(cusolverDnHandle_t handle, int m, int n, cuDoubleComplex * A, int lda, double * D, double * E, cuDoubleComplex * TAUQ, cuDoubleComplex * TAUP, cuDoubleComplex * Work, int Lwork, int * devInfo); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnZgebrd(hipsolverHandle_t handle, int m, int n, hipDoubleComplex* A, int lda, double* D, double* E, hipDoubleComplex* tauq, hipDoubleComplex* taup, hipDoubleComplex* work, int lwork, int* devInfo); + // CHECK: status = hipsolverDnZgebrd(handle, m, n, &dComplexA, lda, &dD, &dE, &dComplexTAUQ, &dComplexTAUP, &dComplexWorkspace, Lwork, &devInfo); + status = cusolverDnZgebrd(handle, m, n, &dComplexA, lda, &dD, &dE, &dComplexTAUQ, &dComplexTAUP, &dComplexWorkspace, Lwork, &devInfo); + #if CUDA_VERSION >= 8000 // CHECK: hipsolverEigType_t eigType; // CHECK-NEXT: hipsolverEigType_t EIG_TYPE_1 = HIPSOLVER_EIG_TYPE_1;