From feeb794d40884d3e1e319917367f2063517164e7 Mon Sep 17 00:00:00 2001 From: Evgeny Mankov Date: Tue, 5 Dec 2023 12:57:59 +0100 Subject: [PATCH] [HIPIFY][#675][#677][SOLVER][feature] `cuSOLVER` support - Step 25 - Functions (DN) + `cusolverDn(S|D|C|Z)geqrf_bufferSize` are `SUPPORTED` by `hipSOLVER` only + [NOTE] `rocsolver_(s|d|c|z)geqrf` 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 | 50 +++++++++++++++++-- 6 files changed, 104 insertions(+), 4 deletions(-) diff --git a/bin/hipify-perl b/bin/hipify-perl index 7deb12f2..29171463 100755 --- a/bin/hipify-perl +++ b/bin/hipify-perl @@ -1090,6 +1090,8 @@ my %experimental_funcs = ( "cusolverDnZgetrs" => "6.1.0", "cusolverDnZgetrf_bufferSize" => "6.1.0", "cusolverDnZgetrf" => "6.1.0", + "cusolverDnZgeqrf_bufferSize" => "6.1.0", + "cusolverDnZgeqrf" => "6.1.0", "cusolverDnZZgesv_bufferSize" => "6.1.0", "cusolverDnZZgesv" => "6.1.0", "cusolverDnZZgels_bufferSize" => "6.1.0", @@ -1104,6 +1106,8 @@ my %experimental_funcs = ( "cusolverDnSgetrs" => "6.1.0", "cusolverDnSgetrf_bufferSize" => "6.1.0", "cusolverDnSgetrf" => "6.1.0", + "cusolverDnSgeqrf_bufferSize" => "6.1.0", + "cusolverDnSgeqrf" => "6.1.0", "cusolverDnSetStream" => "6.1.0", "cusolverDnSSgesv_bufferSize" => "6.1.0", "cusolverDnSSgesv" => "6.1.0", @@ -1121,6 +1125,8 @@ my %experimental_funcs = ( "cusolverDnDgetrs" => "6.1.0", "cusolverDnDgetrf_bufferSize" => "6.1.0", "cusolverDnDgetrf" => "6.1.0", + "cusolverDnDgeqrf_bufferSize" => "6.1.0", + "cusolverDnDgeqrf" => "6.1.0", "cusolverDnDestroy" => "6.1.0", "cusolverDnDDgesv_bufferSize" => "6.1.0", "cusolverDnDDgesv" => "6.1.0", @@ -1137,6 +1143,8 @@ my %experimental_funcs = ( "cusolverDnCgetrs" => "6.1.0", "cusolverDnCgetrf_bufferSize" => "6.1.0", "cusolverDnCgetrf" => "6.1.0", + "cusolverDnCgeqrf_bufferSize" => "6.1.0", + "cusolverDnCgeqrf" => "6.1.0", "cusolverDnCCgesv_bufferSize" => "6.1.0", "cusolverDnCCgesv" => "6.1.0", "cusolverDnCCgels_bufferSize" => "6.1.0", @@ -1300,6 +1308,8 @@ sub experimentalSubstitutions { subst("cusolverDnCCgels_bufferSize", "hipsolverDnCCgels_bufferSize", "library"); subst("cusolverDnCCgesv", "hipsolverDnCCgesv", "library"); subst("cusolverDnCCgesv_bufferSize", "hipsolverDnCCgesv_bufferSize", "library"); + subst("cusolverDnCgeqrf", "hipsolverDnCgeqrf", "library"); + subst("cusolverDnCgeqrf_bufferSize", "hipsolverDnCgeqrf_bufferSize", "library"); subst("cusolverDnCgetrf", "hipsolverDnCgetrf", "library"); subst("cusolverDnCgetrf_bufferSize", "hipsolverDnCgetrf_bufferSize", "library"); subst("cusolverDnCgetrs", "hipsolverDnCgetrs", "library"); @@ -1316,6 +1326,8 @@ sub experimentalSubstitutions { subst("cusolverDnDDgesv", "hipsolverDnDDgesv", "library"); subst("cusolverDnDDgesv_bufferSize", "hipsolverDnDDgesv_bufferSize", "library"); subst("cusolverDnDestroy", "hipsolverDnDestroy", "library"); + subst("cusolverDnDgeqrf", "hipsolverDnDgeqrf", "library"); + subst("cusolverDnDgeqrf_bufferSize", "hipsolverDnDgeqrf_bufferSize", "library"); subst("cusolverDnDgetrf", "hipsolverDnDgetrf", "library"); subst("cusolverDnDgetrf_bufferSize", "hipsolverDnDgetrf_bufferSize", "library"); subst("cusolverDnDgetrs", "hipsolverDnDgetrs", "library"); @@ -1332,6 +1344,8 @@ sub experimentalSubstitutions { subst("cusolverDnSSgesv", "hipsolverDnSSgesv", "library"); subst("cusolverDnSSgesv_bufferSize", "hipsolverDnSSgesv_bufferSize", "library"); subst("cusolverDnSetStream", "hipsolverSetStream", "library"); + subst("cusolverDnSgeqrf", "hipsolverDnSgeqrf", "library"); + subst("cusolverDnSgeqrf_bufferSize", "hipsolverDnSgeqrf_bufferSize", "library"); subst("cusolverDnSgetrf", "hipsolverDnSgetrf", "library"); subst("cusolverDnSgetrf_bufferSize", "hipsolverDnSgetrf_bufferSize", "library"); subst("cusolverDnSgetrs", "hipsolverDnSgetrs", "library"); @@ -1346,6 +1360,8 @@ sub experimentalSubstitutions { subst("cusolverDnZZgels_bufferSize", "hipsolverDnZZgels_bufferSize", "library"); subst("cusolverDnZZgesv", "hipsolverDnZZgesv", "library"); subst("cusolverDnZZgesv_bufferSize", "hipsolverDnZZgesv_bufferSize", "library"); + subst("cusolverDnZgeqrf", "hipsolverDnZgeqrf", "library"); + subst("cusolverDnZgeqrf_bufferSize", "hipsolverDnZgeqrf_bufferSize", "library"); subst("cusolverDnZgetrf", "hipsolverDnZgetrf", "library"); subst("cusolverDnZgetrf_bufferSize", "hipsolverDnZgetrf_bufferSize", "library"); subst("cusolverDnZgetrs", "hipsolverDnZgetrs", "library"); diff --git a/docs/tables/CUSOLVER_API_supported_by_HIP.md b/docs/tables/CUSOLVER_API_supported_by_HIP.md index fea58438..0339c8da 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| | | | | | | | | | +|`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| |`cusolverDnCgetrf_bufferSize`| | | | |`hipsolverDnCgetrf_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnCgetrs`| | | | |`hipsolverDnCgetrs`|5.1.0| | | |6.1.0| @@ -160,6 +162,8 @@ |`cusolverDnDXgesv`|11.0| | | | | | | | | | |`cusolverDnDXgesv_bufferSize`|11.0| | | | | | | | | | |`cusolverDnDestroy`| | | | |`hipsolverDnDestroy`|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| |`cusolverDnDgetrf_bufferSize`| | | | |`hipsolverDnDgetrf_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnDgetrs`| | | | |`hipsolverDnDgetrs`|5.1.0| | | |6.1.0| @@ -218,6 +222,8 @@ |`cusolverDnSetAdvOptions`|11.0| | | | | | | | | | |`cusolverDnSetDeterministicMode`|12.2| | | | | | | | | | |`cusolverDnSetStream`| | | | |`hipsolverSetStream`|4.5.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| |`cusolverDnSgetrf_bufferSize`| | | | |`hipsolverDnSgetrf_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnSgetrs`| | | | |`hipsolverDnSgetrs`|5.1.0| | | |6.1.0| @@ -256,6 +262,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| +|`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| |`cusolverDnZgetrf_bufferSize`| | | | |`hipsolverDnZgetrf_bufferSize`|5.1.0| | | |6.1.0| |`cusolverDnZgetrs`| | | | |`hipsolverDnZgetrs`|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 47c5f0ef..4f8ef972 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| | | | | | | | | | | | | | | | +|`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| | | | | | | |`cusolverDnCgetrf_bufferSize`| | | | |`hipsolverDnCgetrf_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnCgetrs`| | | | |`hipsolverDnCgetrs`|5.1.0| | | |6.1.0| | | | | | | @@ -160,6 +162,8 @@ |`cusolverDnDXgesv`|11.0| | | | | | | | | | | | | | | | |`cusolverDnDXgesv_bufferSize`|11.0| | | | | | | | | | | | | | | | |`cusolverDnDestroy`| | | | |`hipsolverDnDestroy`|5.1.0| | | |6.1.0|`rocblas_destroy_handle`| | | | | | +|`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| | | | | | | |`cusolverDnDgetrf_bufferSize`| | | | |`hipsolverDnDgetrf_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnDgetrs`| | | | |`hipsolverDnDgetrs`|5.1.0| | | |6.1.0| | | | | | | @@ -218,6 +222,8 @@ |`cusolverDnSetAdvOptions`|11.0| | | | | | | | | | | | | | | | |`cusolverDnSetDeterministicMode`|12.2| | | | | | | | | | | | | | | | |`cusolverDnSetStream`| | | | |`hipsolverSetStream`|4.5.0| | | |6.1.0|`rocblas_set_stream`| | | | | | +|`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| | | | | | | |`cusolverDnSgetrf_bufferSize`| | | | |`hipsolverDnSgetrf_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnSgetrs`| | | | |`hipsolverDnSgetrs`|5.1.0| | | |6.1.0| | | | | | | @@ -256,6 +262,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| | | | | | | +|`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| | | | | | | |`cusolverDnZgetrf_bufferSize`| | | | |`hipsolverDnZgetrf_bufferSize`|5.1.0| | | |6.1.0| | | | | | | |`cusolverDnZgetrs`| | | | |`hipsolverDnZgetrs`|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 4ca58ea2..6da5b6d1 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| | | | | | | | | | +|`cusolverDnCgeqrf`| | | | | | | | | | | +|`cusolverDnCgeqrf_bufferSize`| | | | | | | | | | | |`cusolverDnCgetrf`| | | | | | | | | | | |`cusolverDnCgetrf_bufferSize`| | | | | | | | | | | |`cusolverDnCgetrs`| | | | | | | | | | | @@ -160,6 +162,8 @@ |`cusolverDnDXgesv`|11.0| | | | | | | | | | |`cusolverDnDXgesv_bufferSize`|11.0| | | | | | | | | | |`cusolverDnDestroy`| | | | |`rocblas_destroy_handle`| | | | | | +|`cusolverDnDgeqrf`| | | | | | | | | | | +|`cusolverDnDgeqrf_bufferSize`| | | | | | | | | | | |`cusolverDnDgetrf`| | | | | | | | | | | |`cusolverDnDgetrf_bufferSize`| | | | | | | | | | | |`cusolverDnDgetrs`| | | | | | | | | | | @@ -218,6 +222,8 @@ |`cusolverDnSetAdvOptions`|11.0| | | | | | | | | | |`cusolverDnSetDeterministicMode`|12.2| | | | | | | | | | |`cusolverDnSetStream`| | | | |`rocblas_set_stream`| | | | | | +|`cusolverDnSgeqrf`| | | | | | | | | | | +|`cusolverDnSgeqrf_bufferSize`| | | | | | | | | | | |`cusolverDnSgetrf`| | | | | | | | | | | |`cusolverDnSgetrf_bufferSize`| | | | | | | | | | | |`cusolverDnSgetrs`| | | | | | | | | | | @@ -256,6 +262,8 @@ |`cusolverDnZZgels_bufferSize`|11.0| | | | | | | | | | |`cusolverDnZZgesv`|10.2| | | | | | | | | | |`cusolverDnZZgesv_bufferSize`|10.2| | | | | | | | | | +|`cusolverDnZgeqrf`| | | | | | | | | | | +|`cusolverDnZgeqrf_bufferSize`| | | | | | | | | | | |`cusolverDnZgetrf`| | | | | | | | | | | |`cusolverDnZgetrf_bufferSize`| | | | | | | | | | | |`cusolverDnZgetrs`| | | | | | | | | | | diff --git a/src/CUDA2HIP_SOLVER_API_functions.cpp b/src/CUDA2HIP_SOLVER_API_functions.cpp index 8292da45..131f3828 100644 --- a/src/CUDA2HIP_SOLVER_API_functions.cpp +++ b/src/CUDA2HIP_SOLVER_API_functions.cpp @@ -211,6 +211,16 @@ const std::map CUDA_SOLVER_FUNCTION_MAP { {"cusolverDnDlaswp", {"hipsolverDnDlaswp", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}}, {"cusolverDnClaswp", {"hipsolverDnClaswp", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}}, {"cusolverDnZlaswp", {"hipsolverDnZlaswp", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}}, + // NOTE: rocsolver_(s|d|c|z)geqrf have a harness of other HIP and ROC API calls + {"cusolverDnSgeqrf_bufferSize", {"hipsolverDnSgeqrf_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + {"cusolverDnDgeqrf_bufferSize", {"hipsolverDnDgeqrf_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + {"cusolverDnCgeqrf_bufferSize", {"hipsolverDnCgeqrf_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + {"cusolverDnZgeqrf_bufferSize", {"hipsolverDnZgeqrf_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + // NOTE: rocsolver_(s|d|c|z)geqrf have a harness of other HIP and ROC API calls + {"cusolverDnSgeqrf", {"hipsolverDnSgeqrf", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + {"cusolverDnDgeqrf", {"hipsolverDnDgeqrf", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + {"cusolverDnCgeqrf", {"hipsolverDnCgeqrf", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + {"cusolverDnZgeqrf", {"hipsolverDnZgeqrf", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, }; const std::map CUDA_SOLVER_FUNCTION_VER_MAP { @@ -406,6 +416,14 @@ const std::map HIP_SOLVER_FUNCTION_VER_MAP { {"hipsolverDnDpotri", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, {"hipsolverDnCpotri", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, {"hipsolverDnZpotri", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnSgeqrf_bufferSize", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnDgeqrf_bufferSize", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnCgeqrf_bufferSize", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnZgeqrf_bufferSize", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnSgeqrf", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnDgeqrf", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnCgeqrf", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnZgeqrf", {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 28fe5a76..d91aba76 100644 --- a/tests/unit_tests/synthetic/libraries/cusolver2hipsolver.cu +++ b/tests/unit_tests/synthetic/libraries/cusolver2hipsolver.cu @@ -22,9 +22,11 @@ int main() { float fA = 0.f; float fB = 0.f; float fX = 0.f; + float fTAU = 0.f; double dA = 0.f; double dB = 0.f; double dX = 0.f; + double dTAU = 0.f; float fWorkspace = 0.f; double dWorkspace = 0.f; void *Workspace = nullptr; @@ -35,11 +37,11 @@ int main() { double** dAarray = 0; double** dBarray = 0; - // CHECK: hipDoubleComplex dComplexA, dComplexB, dComplexX, dComplexWorkspace; - cuDoubleComplex dComplexA, dComplexB, dComplexX, dComplexWorkspace; + // CHECK: hipDoubleComplex dComplexA, dComplexB, dComplexX, dComplexWorkspace, dComplexTAU; + cuDoubleComplex dComplexA, dComplexB, dComplexX, dComplexWorkspace, dComplexTAU; - // CHECK: hipComplex complexA, complexB, complexX, complexWorkspace; - cuComplex complexA, complexB, complexX, complexWorkspace; + // CHECK: hipComplex complexA, complexB, complexX, complexWorkspace, complexTAU; + cuComplex complexA, complexB, complexX, complexWorkspace, complexTAU; // CHECK: hipDoubleComplex** dcomplexAarray = 0; // CHECK-NEXT: hipDoubleComplex** dcomplexBarray = 0; @@ -226,6 +228,46 @@ int main() { // CHECK: status = hipsolverDnZpotrs(handle, fillMode, n, nrhs, &dComplexA, lda, &dComplexB, ldb, &devInfo); status = cusolverDnZpotrs(handle, fillMode, n, nrhs, &dComplexA, lda, &dComplexB, ldb, &devInfo); + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnSgeqrf_bufferSize(cusolverDnHandle_t handle, int m, int n, float * A, int lda, int * lwork); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnSgeqrf_bufferSize(hipsolverHandle_t handle, int m, int n, float* A, int lda, int* lwork); + // CHECK: status = hipsolverDnSgeqrf_bufferSize(handle, m, n, &fA, lda, &Lwork); + status = cusolverDnSgeqrf_bufferSize(handle, m, n, &fA, lda, &Lwork); + + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnDgeqrf_bufferSize(cusolverDnHandle_t handle, int m, int n, double * A, int lda, int * lwork); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnDgeqrf_bufferSize(hipsolverHandle_t handle, int m, int n, double* A, int lda, int* lwork); + // CHECK: status = hipsolverDnDgeqrf_bufferSize(handle, m, n, &dA, lda, &Lwork); + status = cusolverDnDgeqrf_bufferSize(handle, m, n, &dA, lda, &Lwork); + + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnCgeqrf_bufferSize(cusolverDnHandle_t handle, int m, int n, cuComplex * A, int lda, int * lwork); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnCgeqrf_bufferSize(hipsolverHandle_t handle, int m, int n, hipFloatComplex* A, int lda, int* lwork); + // CHECK: status = hipsolverDnCgeqrf_bufferSize(handle, m, n, &complexA, lda, &Lwork); + status = cusolverDnCgeqrf_bufferSize(handle, m, n, &complexA, lda, &Lwork); + + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnZgeqrf_bufferSize(cusolverDnHandle_t handle, int m, int n, cuDoubleComplex * A, int lda, int * lwork); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnZgeqrf_bufferSize(hipsolverHandle_t handle, int m, int n, hipDoubleComplex* A, int lda, int* lwork); + // CHECK: status = hipsolverDnZgeqrf_bufferSize(handle, m, n, &dComplexA, lda, &Lwork); + status = cusolverDnZgeqrf_bufferSize(handle, m, n, &dComplexA, lda, &Lwork); + + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnSgeqrf(cusolverDnHandle_t handle, int m, int n, float * A, int lda, float * TAU, float * Workspace, int Lwork, int * devInfo); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnSgeqrf(hipsolverHandle_t handle, int m, int n, float* A, int lda, float* tau, float* work, int lwork, int* devInfo); + // CHECK: status = hipsolverDnSgeqrf(handle, m, n, &fA, lda, &fTAU, &fWorkspace, Lwork, &devInfo); + status = cusolverDnSgeqrf(handle, m, n, &fA, lda, &fTAU, &fWorkspace, Lwork, &devInfo); + + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnDgeqrf(cusolverDnHandle_t handle, int m, int n, double * A, int lda, double * TAU, double * Workspace, int Lwork, int * devInfo); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnDgeqrf(hipsolverHandle_t handle, int m, int n, double* A, int lda, double* tau, double* work, int lwork, int* devInfo); + // CHECK: status = hipsolverDnDgeqrf(handle, m, n, &dA, lda, &dTAU, &dWorkspace, Lwork, &devInfo); + status = cusolverDnDgeqrf(handle, m, n, &dA, lda, &dTAU, &dWorkspace, Lwork, &devInfo); + + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnCgeqrf(cusolverDnHandle_t handle, int m, int n, cuComplex * A, int lda, cuComplex * TAU, cuComplex * Workspace, int Lwork, int * devInfo); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnCgeqrf(hipsolverHandle_t handle, int m, int n, hipFloatComplex* A, int lda, hipFloatComplex* tau, hipFloatComplex* work, int lwork, int* devInfo); + // CHECK: status = hipsolverDnCgeqrf(handle, m, n, &complexA, lda, &complexTAU, &complexWorkspace, Lwork, &devInfo); + status = cusolverDnCgeqrf(handle, m, n, &complexA, lda, &complexTAU, &complexWorkspace, Lwork, &devInfo); + + // CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnZgeqrf(cusolverDnHandle_t handle, int m, int n, cuDoubleComplex * A, int lda, cuDoubleComplex * TAU, cuDoubleComplex * Workspace, int Lwork, int * devInfo); + // HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnZgeqrf(hipsolverHandle_t handle, int m, int n, hipDoubleComplex* A, int lda, hipDoubleComplex* tau, hipDoubleComplex* work, int lwork, int* devInfo); + // CHECK: status = hipsolverDnZgeqrf(handle, m, n, &dComplexA, lda, &dComplexTAU, &dComplexWorkspace, Lwork, &devInfo); + status = cusolverDnZgeqrf(handle, m, n, &dComplexA, lda, &dComplexTAU, &dComplexWorkspace, Lwork, &devInfo); + #if CUDA_VERSION >= 8000 // CHECK: hipsolverEigType_t eigType; // CHECK-NEXT: hipsolverEigType_t EIG_TYPE_1 = HIPSOLVER_EIG_TYPE_1;