Skip to content

Commit

Permalink
Merge pull request #1164 from emankov/HIPIFY
Browse files Browse the repository at this point in the history
[HIPIFY][#675][#677][SOLVER][feature] `cuSOLVER` support - Step 17 - Functions (DN)
  • Loading branch information
emankov authored Nov 24, 2023
2 parents e58267b + 3fb5166 commit c83a493
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bin/hipify-perl
Original file line number Diff line number Diff line change
Expand Up @@ -1080,10 +1080,12 @@ my %experimental_funcs = (
"cusolverEigType_t" => "6.1.0",
"cusolverEigRange_t" => "6.1.0",
"cusolverEigMode_t" => "6.1.0",
"cusolverDnZpotrf_bufferSize" => "6.1.0",
"cusolverDnZZgesv_bufferSize" => "6.1.0",
"cusolverDnZZgesv" => "6.1.0",
"cusolverDnZZgels_bufferSize" => "6.1.0",
"cusolverDnZZgels" => "6.1.0",
"cusolverDnSpotrf_bufferSize" => "6.1.0",
"cusolverDnSgetrs" => "6.1.0",
"cusolverDnSgetrf_bufferSize" => "6.1.0",
"cusolverDnSgetrf" => "6.1.0",
Expand All @@ -1094,6 +1096,7 @@ my %experimental_funcs = (
"cusolverDnSSgels" => "6.1.0",
"cusolverDnHandle_t" => "6.1.0",
"cusolverDnGetStream" => "6.1.0",
"cusolverDnDpotrf_bufferSize" => "6.1.0",
"cusolverDnDgetrs" => "6.1.0",
"cusolverDnDgetrf_bufferSize" => "6.1.0",
"cusolverDnDgetrf" => "6.1.0",
Expand All @@ -1103,6 +1106,7 @@ my %experimental_funcs = (
"cusolverDnDDgels_bufferSize" => "6.1.0",
"cusolverDnDDgels" => "6.1.0",
"cusolverDnCreate" => "6.1.0",
"cusolverDnCpotrf_bufferSize" => "6.1.0",
"cusolverDnCCgesv_bufferSize" => "6.1.0",
"cusolverDnCCgesv" => "6.1.0",
"cusolverDnCCgels_bufferSize" => "6.1.0",
Expand Down Expand Up @@ -1266,6 +1270,7 @@ sub experimentalSubstitutions {
subst("cusolverDnCCgels_bufferSize", "hipsolverDnCCgels_bufferSize", "library");
subst("cusolverDnCCgesv", "hipsolverDnCCgesv", "library");
subst("cusolverDnCCgesv_bufferSize", "hipsolverDnCCgesv_bufferSize", "library");
subst("cusolverDnCpotrf_bufferSize", "hipsolverDnCpotrf_bufferSize", "library");
subst("cusolverDnCreate", "hipsolverDnCreate", "library");
subst("cusolverDnDDgels", "hipsolverDnDDgels", "library");
subst("cusolverDnDDgels_bufferSize", "hipsolverDnDDgels_bufferSize", "library");
Expand All @@ -1275,6 +1280,7 @@ sub experimentalSubstitutions {
subst("cusolverDnDgetrf", "hipsolverDnDgetrf", "library");
subst("cusolverDnDgetrf_bufferSize", "hipsolverDnDgetrf_bufferSize", "library");
subst("cusolverDnDgetrs", "hipsolverDnDgetrs", "library");
subst("cusolverDnDpotrf_bufferSize", "hipsolverDnDpotrf_bufferSize", "library");
subst("cusolverDnGetStream", "hipsolverGetStream", "library");
subst("cusolverDnSSgels", "hipsolverDnSSgels", "library");
subst("cusolverDnSSgels_bufferSize", "hipsolverDnSSgels_bufferSize", "library");
Expand All @@ -1284,10 +1290,12 @@ sub experimentalSubstitutions {
subst("cusolverDnSgetrf", "hipsolverDnSgetrf", "library");
subst("cusolverDnSgetrf_bufferSize", "hipsolverDnSgetrf_bufferSize", "library");
subst("cusolverDnSgetrs", "hipsolverDnSgetrs", "library");
subst("cusolverDnSpotrf_bufferSize", "hipsolverDnSpotrf_bufferSize", "library");
subst("cusolverDnZZgels", "hipsolverDnZZgels", "library");
subst("cusolverDnZZgels_bufferSize", "hipsolverDnZZgels_bufferSize", "library");
subst("cusolverDnZZgesv", "hipsolverDnZZgesv", "library");
subst("cusolverDnZZgesv_bufferSize", "hipsolverDnZZgesv_bufferSize", "library");
subst("cusolverDnZpotrf_bufferSize", "hipsolverDnZpotrf_bufferSize", "library");
subst("cusolverDnHandle_t", "hipsolverHandle_t", "type");
subst("cusolverEigMode_t", "hipsolverEigMode_t", "type");
subst("cusolverEigRange_t", "hipsolverEigRange_t", "type");
Expand Down Expand Up @@ -7175,6 +7183,10 @@ sub warnUnsupportedFunctions {
"cusolverDnSBgels",
"cusolverDnParams_t",
"cusolverDnParams",
"cusolverDnIRSXgesv_bufferSize",
"cusolverDnIRSXgesv",
"cusolverDnIRSXgels_bufferSize",
"cusolverDnIRSXgels",
"cusolverDnIRSParams_t",
"cusolverDnIRSParamsSetTolInner",
"cusolverDnIRSParamsSetTol",
Expand Down
8 changes: 8 additions & 0 deletions docs/tables/CUSOLVER_API_supported_by_HIP.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
|`cusolverDnCYgels_bufferSize`|11.0| | | | | | | | | |
|`cusolverDnCYgesv`|11.0| | | | | | | | | |
|`cusolverDnCYgesv_bufferSize`|11.0| | | | | | | | | |
|`cusolverDnCpotrf_bufferSize`|10.0| | | |`hipsolverDnCpotrf_bufferSize`|5.1.0| | | |6.1.0|
|`cusolverDnCreate`| | | | |`hipsolverDnCreate`|5.1.0| | | |6.1.0|
|`cusolverDnCreateParams`|11.0| | | | | | | | | |
|`cusolverDnDBgels`|11.0| | | | | | | | | |
Expand All @@ -150,6 +151,7 @@
|`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|
|`cusolverDnDpotrf_bufferSize`|10.0| | | |`hipsolverDnDpotrf_bufferSize`|5.1.0| | | |6.1.0|
|`cusolverDnGetDeterministicMode`|12.2| | | | | | | | | |
|`cusolverDnGetStream`| | | | |`hipsolverGetStream`|4.5.0| | | |6.1.0|
|`cusolverDnIRSInfosCreate`|10.2| | | | | | | | | |
Expand All @@ -172,6 +174,10 @@
|`cusolverDnIRSParamsSetSolverPrecisions`|10.2| | | | | | | | | |
|`cusolverDnIRSParamsSetTol`|10.2| | | | | | | | | |
|`cusolverDnIRSParamsSetTolInner`|10.2| | | | | | | | | |
|`cusolverDnIRSXgels`|11.0| | | | | | | | | |
|`cusolverDnIRSXgels_bufferSize`|11.0| | | | | | | | | |
|`cusolverDnIRSXgesv`|10.2| | | | | | | | | |
|`cusolverDnIRSXgesv_bufferSize`|10.2| | | | | | | | | |
|`cusolverDnSBgels`|11.0| | | | | | | | | |
|`cusolverDnSBgels_bufferSize`|11.0| | | | | | | | | |
|`cusolverDnSBgesv`|11.0| | | | | | | | | |
Expand All @@ -194,6 +200,7 @@
|`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|
|`cusolverDnSpotrf_bufferSize`|10.0| | | |`hipsolverDnSpotrf_bufferSize`|5.1.0| | | |6.1.0|
|`cusolverDnXgetrf`|11.1| | | | | | | | | |
|`cusolverDnXgetrf_bufferSize`|11.1| | | | | | | | | |
|`cusolverDnXgetrs`|11.1| | | | | | | | | |
Expand All @@ -217,6 +224,7 @@
|`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|
|`cusolverDnZpotrf_bufferSize`|10.0| | | |`hipsolverDnZpotrf_bufferSize`|5.1.0| | | |6.1.0|


\*A - Added; D - Deprecated; C - Changed; R - Removed; E - Experimental
8 changes: 8 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 @@ -124,6 +124,7 @@
|`cusolverDnCYgels_bufferSize`|11.0| | | | | | | | | | | | | | | |
|`cusolverDnCYgesv`|11.0| | | | | | | | | | | | | | | |
|`cusolverDnCYgesv_bufferSize`|11.0| | | | | | | | | | | | | | | |
|`cusolverDnCpotrf_bufferSize`|10.0| | | |`hipsolverDnCpotrf_bufferSize`|5.1.0| | | |6.1.0| | | | | | |
|`cusolverDnCreate`| | | | |`hipsolverDnCreate`|5.1.0| | | |6.1.0|`rocblas_create_handle`| | | | | |
|`cusolverDnCreateParams`|11.0| | | | | | | | | | | | | | | |
|`cusolverDnDBgels`|11.0| | | | | | | | | | | | | | | |
Expand All @@ -150,6 +151,7 @@
|`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| | | | | | |
|`cusolverDnDpotrf_bufferSize`|10.0| | | |`hipsolverDnDpotrf_bufferSize`|5.1.0| | | |6.1.0| | | | | | |
|`cusolverDnGetDeterministicMode`|12.2| | | | | | | | | | | | | | | |
|`cusolverDnGetStream`| | | | |`hipsolverGetStream`|4.5.0| | | |6.1.0|`rocblas_get_stream`| | | | | |
|`cusolverDnIRSInfosCreate`|10.2| | | | | | | | | | | | | | | |
Expand All @@ -172,6 +174,10 @@
|`cusolverDnIRSParamsSetSolverPrecisions`|10.2| | | | | | | | | | | | | | | |
|`cusolverDnIRSParamsSetTol`|10.2| | | | | | | | | | | | | | | |
|`cusolverDnIRSParamsSetTolInner`|10.2| | | | | | | | | | | | | | | |
|`cusolverDnIRSXgels`|11.0| | | | | | | | | | | | | | | |
|`cusolverDnIRSXgels_bufferSize`|11.0| | | | | | | | | | | | | | | |
|`cusolverDnIRSXgesv`|10.2| | | | | | | | | | | | | | | |
|`cusolverDnIRSXgesv_bufferSize`|10.2| | | | | | | | | | | | | | | |
|`cusolverDnSBgels`|11.0| | | | | | | | | | | | | | | |
|`cusolverDnSBgels_bufferSize`|11.0| | | | | | | | | | | | | | | |
|`cusolverDnSBgesv`|11.0| | | | | | | | | | | | | | | |
Expand All @@ -194,6 +200,7 @@
|`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| | | | | | |
|`cusolverDnSpotrf_bufferSize`|10.0| | | |`hipsolverDnSpotrf_bufferSize`|5.1.0| | | |6.1.0| | | | | | |
|`cusolverDnXgetrf`|11.1| | | | | | | | | | | | | | | |
|`cusolverDnXgetrf_bufferSize`|11.1| | | | | | | | | | | | | | | |
|`cusolverDnXgetrs`|11.1| | | | | | | | | | | | | | | |
Expand All @@ -217,6 +224,7 @@
|`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| | | | | | |
|`cusolverDnZpotrf_bufferSize`|10.0| | | |`hipsolverDnZpotrf_bufferSize`|5.1.0| | | |6.1.0| | | | | | |


\*A - Added; D - Deprecated; C - Changed; R - Removed; E - Experimental
8 changes: 8 additions & 0 deletions docs/tables/CUSOLVER_API_supported_by_ROC.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
|`cusolverDnCYgels_bufferSize`|11.0| | | | | | | | | |
|`cusolverDnCYgesv`|11.0| | | | | | | | | |
|`cusolverDnCYgesv_bufferSize`|11.0| | | | | | | | | |
|`cusolverDnCpotrf_bufferSize`|10.0| | | | | | | | | |
|`cusolverDnCreate`| | | | |`rocblas_create_handle`| | | | | |
|`cusolverDnCreateParams`|11.0| | | | | | | | | |
|`cusolverDnDBgels`|11.0| | | | | | | | | |
Expand All @@ -150,6 +151,7 @@
|`cusolverDnDgetrf`| | | | | | | | | | |
|`cusolverDnDgetrf_bufferSize`| | | | | | | | | | |
|`cusolverDnDgetrs`| | | | | | | | | | |
|`cusolverDnDpotrf_bufferSize`|10.0| | | | | | | | | |
|`cusolverDnGetDeterministicMode`|12.2| | | | | | | | | |
|`cusolverDnGetStream`| | | | |`rocblas_get_stream`| | | | | |
|`cusolverDnIRSInfosCreate`|10.2| | | | | | | | | |
Expand All @@ -172,6 +174,10 @@
|`cusolverDnIRSParamsSetSolverPrecisions`|10.2| | | | | | | | | |
|`cusolverDnIRSParamsSetTol`|10.2| | | | | | | | | |
|`cusolverDnIRSParamsSetTolInner`|10.2| | | | | | | | | |
|`cusolverDnIRSXgels`|11.0| | | | | | | | | |
|`cusolverDnIRSXgels_bufferSize`|11.0| | | | | | | | | |
|`cusolverDnIRSXgesv`|10.2| | | | | | | | | |
|`cusolverDnIRSXgesv_bufferSize`|10.2| | | | | | | | | |
|`cusolverDnSBgels`|11.0| | | | | | | | | |
|`cusolverDnSBgels_bufferSize`|11.0| | | | | | | | | |
|`cusolverDnSBgesv`|11.0| | | | | | | | | |
Expand All @@ -194,6 +200,7 @@
|`cusolverDnSgetrf`| | | | | | | | | | |
|`cusolverDnSgetrf_bufferSize`| | | | | | | | | | |
|`cusolverDnSgetrs`| | | | | | | | | | |
|`cusolverDnSpotrf_bufferSize`|10.0| | | | | | | | | |
|`cusolverDnXgetrf`|11.1| | | | | | | | | |
|`cusolverDnXgetrf_bufferSize`|11.1| | | | | | | | | |
|`cusolverDnXgetrs`|11.1| | | | | | | | | |
Expand All @@ -217,6 +224,7 @@
|`cusolverDnZZgels_bufferSize`|11.0| | | | | | | | | |
|`cusolverDnZZgesv`|10.2| | | | | | | | | |
|`cusolverDnZZgesv_bufferSize`|10.2| | | | | | | | | |
|`cusolverDnZpotrf_bufferSize`|10.0| | | | | | | | | |


\*A - Added; D - Deprecated; C - Changed; R - Removed; E - Experimental
24 changes: 24 additions & 0 deletions src/CUDA2HIP_SOLVER_API_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,18 @@ const std::map<llvm::StringRef, hipCounter> CUDA_SOLVER_FUNCTION_MAP {
{"cusolverDnSHgels_bufferSize", {"hipsolverDnSHgels_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverDnSBgels_bufferSize", {"hipsolverDnSBgels_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverDnSXgels_bufferSize", {"hipsolverDnSXgels_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverDnIRSXgesv", {"hipsolverDnIRSXgesv", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverDnIRSXgesv_bufferSize", {"hipsolverDnIRSXgesv_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverDnIRSXgels", {"hipsolverDnIRSXgels", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverDnIRSXgels_bufferSize", {"hipsolverDnIRSXgels_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
// NOTE: rocsolver_spotrf has a harness of rocblas_start_device_memory_size_query and rocblas_stop_device_memory_size_query
{"cusolverDnSpotrf_bufferSize", {"hipsolverDnSpotrf_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
// NOTE: rocsolver_dpotrf has a harness of rocblas_start_device_memory_size_query and rocblas_stop_device_memory_size_query
{"cusolverDnDpotrf_bufferSize", {"hipsolverDnDpotrf_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
// NOTE: rocsolver_cpotrf has a harness of rocblas_start_device_memory_size_query and rocblas_stop_device_memory_size_query
{"cusolverDnCpotrf_bufferSize", {"hipsolverDnCpotrf_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
// NOTE: rocsolver_zpotrf has a harness of rocblas_start_device_memory_size_query and rocblas_stop_device_memory_size_query
{"cusolverDnZpotrf_bufferSize", {"hipsolverDnZpotrf_bufferSize", "", 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 @@ -257,6 +269,14 @@ const std::map<llvm::StringRef, cudaAPIversions> CUDA_SOLVER_FUNCTION_VER_MAP {
{"cusolverDnSHgels_bufferSize", {CUDA_110, CUDA_0, CUDA_0}},
{"cusolverDnSBgels_bufferSize", {CUDA_110, CUDA_0, CUDA_0}},
{"cusolverDnSXgels_bufferSize", {CUDA_110, CUDA_0, CUDA_0}},
{"cusolverDnIRSXgesv", {CUDA_102, CUDA_0, CUDA_0}},
{"cusolverDnIRSXgesv_bufferSize", {CUDA_102, CUDA_0, CUDA_0}},
{"cusolverDnIRSXgels", {CUDA_110, CUDA_0, CUDA_0}},
{"cusolverDnIRSXgels_bufferSize", {CUDA_110, CUDA_0, CUDA_0}},
{"cusolverDnSpotrf_bufferSize", {CUDA_100, CUDA_0, CUDA_0}},
{"cusolverDnDpotrf_bufferSize", {CUDA_100, CUDA_0, CUDA_0}},
{"cusolverDnCpotrf_bufferSize", {CUDA_100, CUDA_0, CUDA_0}},
{"cusolverDnZpotrf_bufferSize", {CUDA_100, CUDA_0, CUDA_0}},
};

const std::map<llvm::StringRef, hipAPIversions> HIP_SOLVER_FUNCTION_VER_MAP {
Expand Down Expand Up @@ -286,6 +306,10 @@ const std::map<llvm::StringRef, hipAPIversions> HIP_SOLVER_FUNCTION_VER_MAP {
{"hipsolverDnCCgels_bufferSize", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverDnDDgels_bufferSize", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverDnSSgels_bufferSize", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverDnSpotrf_bufferSize", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverDnDpotrf_bufferSize", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverDnCpotrf_bufferSize", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverDnZpotrf_bufferSize", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}},
};

const std::map<unsigned int, llvm::StringRef> CUDA_SOLVER_API_SECTION_MAP {
Expand Down
25 changes: 25 additions & 0 deletions tests/unit_tests/synthetic/libraries/cusolver2hipsolver.cu
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ int main() {
// CHECK: hipsolverHandle_t handle;
cusolverDnHandle_t handle;

// CHECK: hipblasFillMode_t fillMode;
cublasFillMode_t fillMode;

// CHECK: hipsolverStatus_t status;
// CHECK-NEXT: hipsolverStatus_t STATUS_SUCCESS = HIPSOLVER_STATUS_SUCCESS;
// CHECK-NEXT: hipsolverStatus_t STATUS_NOT_INITIALIZED = HIPSOLVER_STATUS_NOT_INITIALIZED;
Expand Down Expand Up @@ -174,6 +177,28 @@ int main() {
cusolverEigRange_t EIG_RANGE_V = CUSOLVER_EIG_RANGE_V;
#endif

#if CUDA_VERSION >= 10000
// CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnSpotrf_bufferSize(cusolverDnHandle_t handle, cublasFillMode_t uplo, int n, float * A, int lda, int * Lwork);
// HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnSpotrf_bufferSize(hipsolverHandle_t handle, hipblasFillMode_t uplo, int n, float* A, int lda, int* lwork);
// CHECK: status = hipsolverDnSpotrf_bufferSize(handle, fillMode, n, &fA, lda, &Lwork);
status = cusolverDnSpotrf_bufferSize(handle, fillMode, n, &fA, lda, &Lwork);

// CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnDpotrf_bufferSize(cusolverDnHandle_t handle, cublasFillMode_t uplo, int n, double * A, int lda, int * Lwork);
// HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnDpotrf_bufferSize(hipsolverHandle_t handle, hipblasFillMode_t uplo, int n, double* A, int lda, int* lwork);
// CHECK: status = hipsolverDnDpotrf_bufferSize(handle, fillMode, n, &dA, lda, &Lwork);
status = cusolverDnDpotrf_bufferSize(handle, fillMode, n, &dA, lda, &Lwork);

// CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnCpotrf_bufferSize(cusolverDnHandle_t handle, cublasFillMode_t uplo, int n, cuComplex * A, int lda, int * Lwork);
// HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnCpotrf_bufferSize(hipsolverHandle_t handle, hipblasFillMode_t uplo, int n, hipFloatComplex* A, int lda, int* lwork);
// CHECK: status = hipsolverDnCpotrf_bufferSize(handle, fillMode, n, &complexA, lda, &Lwork);
status = cusolverDnCpotrf_bufferSize(handle, fillMode, n, &complexA, lda, &Lwork);

// CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnZpotrf_bufferSize(cusolverDnHandle_t handle, cublasFillMode_t uplo, int n, cuDoubleComplex * A, int lda, int * Lwork);
// HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnZpotrf_bufferSize(hipsolverHandle_t handle, hipblasFillMode_t uplo, int n, hipDoubleComplex* A, int lda, int* lwork);
// CHECK: status = hipsolverDnZpotrf_bufferSize(handle, fillMode, n, &dComplexA, lda, &Lwork);
status = cusolverDnZpotrf_bufferSize(handle, fillMode, n, &dComplexA, lda, &Lwork);
#endif

#if CUDA_VERSION >= 10020
// CHECK: hipsolverStatus_t STATUS_IRS_PARAMS_INVALID = HIPSOLVER_STATUS_INVALID_VALUE;
// CHECK-NEXT: hipsolverStatus_t STATUS_IRS_INTERNAL_ERROR = HIPSOLVER_STATUS_INTERNAL_ERROR;
Expand Down

0 comments on commit c83a493

Please sign in to comment.