Skip to content

Commit

Permalink
Merge pull request #1180 from emankov/HIPIFY
Browse files Browse the repository at this point in the history
[HIPIFY][#675][#677][SOLVER][feature] `cuSOLVER` support - Step 23 - Functions (DN)
  • Loading branch information
emankov authored Dec 3, 2023
2 parents c34f5d5 + 26fc4e3 commit 7544def
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 24 deletions.
8 changes: 8 additions & 0 deletions bin/hipify-perl
Original file line number Diff line number Diff line change
Expand Up @@ -1087,6 +1087,8 @@ my %experimental_funcs = (
"cusolverDnZpotrf_bufferSize" => "6.1.0",
"cusolverDnZpotrfBatched" => "6.1.0",
"cusolverDnZpotrf" => "6.1.0",
"cusolverDnZgetrf_bufferSize" => "6.1.0",
"cusolverDnZgetrf" => "6.1.0",
"cusolverDnZZgesv_bufferSize" => "6.1.0",
"cusolverDnZZgesv" => "6.1.0",
"cusolverDnZZgels_bufferSize" => "6.1.0",
Expand Down Expand Up @@ -1131,6 +1133,8 @@ my %experimental_funcs = (
"cusolverDnCpotrf_bufferSize" => "6.1.0",
"cusolverDnCpotrfBatched" => "6.1.0",
"cusolverDnCpotrf" => "6.1.0",
"cusolverDnCgetrf_bufferSize" => "6.1.0",
"cusolverDnCgetrf" => "6.1.0",
"cusolverDnCCgesv_bufferSize" => "6.1.0",
"cusolverDnCCgesv" => "6.1.0",
"cusolverDnCCgels_bufferSize" => "6.1.0",
Expand Down Expand Up @@ -1294,6 +1298,8 @@ sub experimentalSubstitutions {
subst("cusolverDnCCgels_bufferSize", "hipsolverDnCCgels_bufferSize", "library");
subst("cusolverDnCCgesv", "hipsolverDnCCgesv", "library");
subst("cusolverDnCCgesv_bufferSize", "hipsolverDnCCgesv_bufferSize", "library");
subst("cusolverDnCgetrf", "hipsolverDnCgetrf", "library");
subst("cusolverDnCgetrf_bufferSize", "hipsolverDnCgetrf_bufferSize", "library");
subst("cusolverDnCpotrf", "hipsolverDnCpotrf", "library");
subst("cusolverDnCpotrfBatched", "hipsolverDnCpotrfBatched", "library");
subst("cusolverDnCpotrf_bufferSize", "hipsolverDnCpotrf_bufferSize", "library");
Expand Down Expand Up @@ -1337,6 +1343,8 @@ sub experimentalSubstitutions {
subst("cusolverDnZZgels_bufferSize", "hipsolverDnZZgels_bufferSize", "library");
subst("cusolverDnZZgesv", "hipsolverDnZZgesv", "library");
subst("cusolverDnZZgesv_bufferSize", "hipsolverDnZZgesv_bufferSize", "library");
subst("cusolverDnZgetrf", "hipsolverDnZgetrf", "library");
subst("cusolverDnZgetrf_bufferSize", "hipsolverDnZgetrf_bufferSize", "library");
subst("cusolverDnZpotrf", "hipsolverDnZpotrf", "library");
subst("cusolverDnZpotrfBatched", "hipsolverDnZpotrfBatched", "library");
subst("cusolverDnZpotrf_bufferSize", "hipsolverDnZpotrf_bufferSize", "library");
Expand Down
4 changes: 4 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,8 @@
|`cusolverDnCYgels_bufferSize`|11.0| | | | | | | | | |
|`cusolverDnCYgesv`|11.0| | | | | | | | | |
|`cusolverDnCYgesv_bufferSize`|11.0| | | | | | | | | |
|`cusolverDnCgetrf`| | | | |`hipsolverDnCgetrf`|5.1.0| | | |6.1.0|
|`cusolverDnCgetrf_bufferSize`| | | | |`hipsolverDnCgetrf_bufferSize`|5.1.0| | | |6.1.0|
|`cusolverDnClauum`|10.1| | | | | | | | | |
|`cusolverDnClauum_bufferSize`|10.1| | | | | | | | | |
|`cusolverDnCpotrf`| | | | |`hipsolverDnCpotrf`|5.1.0| | | |6.1.0|
Expand Down Expand Up @@ -250,6 +252,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|
|`cusolverDnZgetrf`| | | | |`hipsolverDnZgetrf`|5.1.0| | | |6.1.0|
|`cusolverDnZgetrf_bufferSize`| | | | |`hipsolverDnZgetrf_bufferSize`|5.1.0| | | |6.1.0|
|`cusolverDnZlauum`|10.1| | | | | | | | | |
|`cusolverDnZlauum_bufferSize`|10.1| | | | | | | | | |
|`cusolverDnZpotrf`| | | | |`hipsolverDnZpotrf`|5.1.0| | | |6.1.0|
Expand Down
4 changes: 4 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,8 @@
|`cusolverDnCYgels_bufferSize`|11.0| | | | | | | | | | | | | | | |
|`cusolverDnCYgesv`|11.0| | | | | | | | | | | | | | | |
|`cusolverDnCYgesv_bufferSize`|11.0| | | | | | | | | | | | | | | |
|`cusolverDnCgetrf`| | | | |`hipsolverDnCgetrf`|5.1.0| | | |6.1.0| | | | | | |
|`cusolverDnCgetrf_bufferSize`| | | | |`hipsolverDnCgetrf_bufferSize`|5.1.0| | | |6.1.0| | | | | | |
|`cusolverDnClauum`|10.1| | | | | | | | | | | | | | | |
|`cusolverDnClauum_bufferSize`|10.1| | | | | | | | | | | | | | | |
|`cusolverDnCpotrf`| | | | |`hipsolverDnCpotrf`|5.1.0| | | |6.1.0|`rocsolver_cpotrf`|3.6.0| | | |6.1.0|
Expand Down Expand Up @@ -250,6 +252,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| | | | | | |
|`cusolverDnZgetrf`| | | | |`hipsolverDnZgetrf`|5.1.0| | | |6.1.0| | | | | | |
|`cusolverDnZgetrf_bufferSize`| | | | |`hipsolverDnZgetrf_bufferSize`|5.1.0| | | |6.1.0| | | | | | |
|`cusolverDnZlauum`|10.1| | | | | | | | | | | | | | | |
|`cusolverDnZlauum_bufferSize`|10.1| | | | | | | | | | | | | | | |
|`cusolverDnZpotrf`| | | | |`hipsolverDnZpotrf`|5.1.0| | | |6.1.0|`rocsolver_zpotrf`|3.6.0| | | |6.1.0|
Expand Down
4 changes: 4 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,8 @@
|`cusolverDnCYgels_bufferSize`|11.0| | | | | | | | | |
|`cusolverDnCYgesv`|11.0| | | | | | | | | |
|`cusolverDnCYgesv_bufferSize`|11.0| | | | | | | | | |
|`cusolverDnCgetrf`| | | | | | | | | | |
|`cusolverDnCgetrf_bufferSize`| | | | | | | | | | |
|`cusolverDnClauum`|10.1| | | | | | | | | |
|`cusolverDnClauum_bufferSize`|10.1| | | | | | | | | |
|`cusolverDnCpotrf`| | | | |`rocsolver_cpotrf`|3.6.0| | | |6.1.0|
Expand Down Expand Up @@ -250,6 +252,8 @@
|`cusolverDnZZgels_bufferSize`|11.0| | | | | | | | | |
|`cusolverDnZZgesv`|10.2| | | | | | | | | |
|`cusolverDnZZgesv_bufferSize`|10.2| | | | | | | | | |
|`cusolverDnZgetrf`| | | | | | | | | | |
|`cusolverDnZgetrf_bufferSize`| | | | | | | | | | |
|`cusolverDnZlauum`|10.1| | | | | | | | | |
|`cusolverDnZlauum_bufferSize`|10.1| | | | | | | | | |
|`cusolverDnZpotrf`| | | | |`rocsolver_zpotrf`|3.6.0| | | |6.1.0|
Expand Down
29 changes: 17 additions & 12 deletions src/CUDA2HIP_SOLVER_API_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,19 @@ THE SOFTWARE.
const std::map<llvm::StringRef, hipCounter> CUDA_SOLVER_FUNCTION_MAP {
{"cusolverDnCreate", {"hipsolverDnCreate", "rocblas_create_handle", CONV_LIB_FUNC, API_SOLVER, 2, HIP_EXPERIMENTAL}},
{"cusolverDnDestroy", {"hipsolverDnDestroy", "rocblas_destroy_handle", CONV_LIB_FUNC, API_SOLVER, 2, HIP_EXPERIMENTAL}},
// [HIPIFY feature] TODO: cusolverDnDgetrf -> rocsolver_dgetrf + harness of other API calls
{"cusolverDnDgetrf", {"hipsolverDnDgetrf", "rocsolver_dgetrf", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
// [HIPIFY feature] TODO: cusolverDnDgetrf_bufferSize -> rocsolver_dgetrf + harness of other API calls
{"cusolverDnDgetrf_bufferSize", {"hipsolverDnDgetrf_bufferSize", "rocsolver_dgetrf", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
// [HIPIFY feature] TODO: cusolverDnSgetrf -> rocsolver_sgetrf + harness of other API calls
// NOTE: cusolverDn(S|D|C|Z)getrf -> rocsolver_(s|d|c|z)getrf + harness of other API calls
{"cusolverDnSgetrf", {"hipsolverDnSgetrf", "rocsolver_sgetrf", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
// [HIPIFY feature] TODO: cusolverDnSgetrf_bufferSize -> rocsolver_sgetrf + harness of other API calls
{"cusolverDnDgetrf", {"hipsolverDnDgetrf", "rocsolver_dgetrf", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
{"cusolverDnCgetrf", {"hipsolverDnCgetrf", "rocsolver_cgetrf", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
{"cusolverDnZgetrf", {"hipsolverDnZgetrf", "rocsolver_zgetrf", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
// NOTE: cusolverDn(S|D|C|Z)getrf_bufferSize -> rocsolver_(s|d|c|z)getrf + harness of other API calls
{"cusolverDnSgetrf_bufferSize", {"hipsolverDnSgetrf_bufferSize", "rocsolver_sgetrf", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
// [HIPIFY feature] TODO: cusolverDnDgetrs -> rocsolver_dgetrs + harness of other API calls
{"cusolverDnDgetrs", {"hipsolverDnDgetrs", "rocsolver_dgetrs", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
// [HIPIFY feature] TODO: cusolverDnSgetrs -> rocsolver_sgetrs + harness of other API calls
{"cusolverDnDgetrf_bufferSize", {"hipsolverDnDgetrf_bufferSize", "rocsolver_dgetrf", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
{"cusolverDnCgetrf_bufferSize", {"hipsolverDnCgetrf_bufferSize", "rocsolver_cgetrf", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
{"cusolverDnZgetrf_bufferSize", {"hipsolverDnZgetrf_bufferSize", "rocsolver_zgetrf", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
// NOTE: cusolverDn(S|D)getrs -> rocsolver_(s|d)getrs + harness of other API calls
{"cusolverDnSgetrs", {"hipsolverDnSgetrs", "rocsolver_sgetrs", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
{"cusolverDnDgetrs", {"hipsolverDnDgetrs", "rocsolver_dgetrs", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}},
{"cusolverDnXgetrf", {"hipsolverDnXgetrf", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverDnXgetrf_bufferSize", {"hipsolverDnXgetrf_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
{"cusolverDnXgetrs", {"hipsolverDnXgetrs", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}},
Expand Down Expand Up @@ -341,12 +342,16 @@ const std::map<llvm::StringRef, cudaAPIversions> CUDA_SOLVER_FUNCTION_VER_MAP {
const std::map<llvm::StringRef, hipAPIversions> HIP_SOLVER_FUNCTION_VER_MAP {
{"hipsolverDnCreate", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverDnDestroy", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverDnDgetrf", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverDnDgetrf_bufferSize", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverDnSgetrf", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverDnDgetrf", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverDnCgetrf", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverDnZgetrf", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverDnSgetrf_bufferSize", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverDnDgetrs", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverDnDgetrf_bufferSize", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverDnCgetrf_bufferSize", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverDnZgetrf_bufferSize", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverDnSgetrs", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverDnDgetrs", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverSetStream", {HIP_4050, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverGetStream", {HIP_4050, HIP_0, HIP_0, HIP_LATEST}},
{"hipsolverDnZZgesv", {HIP_5010, HIP_0, HIP_0, HIP_LATEST}},
Expand Down
44 changes: 32 additions & 12 deletions tests/unit_tests/synthetic/libraries/cusolver2hipsolver.cu
Original file line number Diff line number Diff line change
Expand Up @@ -96,36 +96,56 @@ int main() {
// CHECK: status = hipsolverDnDestroy(handle);
status = cusolverDnDestroy(handle);

// CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnSgetrf(cusolverDnHandle_t handle, int m, int n, float* A, int lda, float* Workspace, int* devIpiv, int* devInfo);
// HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnSgetrf(hipsolverHandle_t handle, int m, int n, float* A, int lda, float* work, int* devIpiv, int* devInfo);
// CHECK: status = hipsolverDnSgetrf(handle, m, n, &fA, lda, &fWorkspace, &devIpiv, &devInfo);
status = cusolverDnSgetrf(handle, m, n, &fA, lda, &fWorkspace, &devIpiv, &devInfo);

// CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnDgetrf(cusolverDnHandle_t handle, int m, int n, double* A, int lda, double* Workspace, int* devIpiv, int* devInfo);
// HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnDgetrf(hipsolverHandle_t handle, int m, int n,double* A, int lda, double* work, int* devIpiv, int* devInfo);
// CHECK: status = hipsolverDnDgetrf(handle, m, n, &dA, lda, &dWorkspace, &devIpiv, &devInfo);
status = cusolverDnDgetrf(handle, m, n, &dA, lda, &dWorkspace, &devIpiv, &devInfo);

// CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnDgetrf_bufferSize(cusolverDnHandle_t handle, int m, int n, double* A, int lda, int* Lwork);
// HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnDgetrf_bufferSize(hipsolverHandle_t handle, int m, int n, double* A, int lda, int* lwork);
// CHECK: status = hipsolverDnDgetrf_bufferSize(handle, m, n, &dA, lda, &Lwork);
status = cusolverDnDgetrf_bufferSize(handle, m, n, &dA, lda, &Lwork);
// CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnCgetrf(cusolverDnHandle_t handle, int m, int n, cuComplex * A, int lda, cuComplex * Workspace, int * devIpiv, int * devInfo);
// HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnCgetrf(hipsolverHandle_t handle, int m, int n, hipFloatComplex* A, int lda, hipFloatComplex* work, int* devIpiv, int* devInfo);
// CHECK: status = hipsolverDnCgetrf(handle, m, n, &complexA, lda, &complexWorkspace, &devIpiv, &devInfo);
status = cusolverDnCgetrf(handle, m, n, &complexA, lda, &complexWorkspace, &devIpiv, &devInfo);

// CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnSgetrf(cusolverDnHandle_t handle, int m, int n, float* A, int lda, float* Workspace, int* devIpiv, int* devInfo);
// HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnSgetrf(hipsolverHandle_t handle, int m, int n, float* A, int lda, float* work, int* devIpiv, int* devInfo);
// CHECK: status = hipsolverDnSgetrf(handle, m, n, &fA, lda, &fWorkspace, &devIpiv, &devInfo);
status = cusolverDnSgetrf(handle, m, n, &fA, lda, &fWorkspace, &devIpiv, &devInfo);
// CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnZgetrf(cusolverDnHandle_t handle, int m, int n, cuDoubleComplex * A, int lda, cuDoubleComplex * Workspace, int * devIpiv, int * devInfo);
// HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnZgetrf(hipsolverHandle_t handle, int m, int n, hipDoubleComplex* A, int lda, hipDoubleComplex* work, int* devIpiv, int* devInfo);
// CHECK: status = hipsolverDnZgetrf(handle, m, n, &dComplexA, lda, &dComplexWorkspace, &devIpiv, &devInfo);
status = cusolverDnZgetrf(handle, m, n, &dComplexA, lda, &dComplexWorkspace, &devIpiv, &devInfo);

// CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnSgetrf_bufferSize(cusolverDnHandle_t handle, int m, int n, float* A, int lda, int* Lwork);
// HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnSgetrf_bufferSize(hipsolverHandle_t handle, int m, int n, float* A, int lda, int* lwork);
// CHECK: status = hipsolverDnSgetrf_bufferSize(handle, m, n, &fA, lda, &Lwork);
status = cusolverDnSgetrf_bufferSize(handle, m, n, &fA, lda, &Lwork);

// CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnDgetrs(cusolverDnHandle_t handle, cublasOperation_t trans, int n, int nrhs,const double* A, int lda, const int* devIpiv, double* B, int ldb, int* devInfo);
// HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnDgetrs(hipsolverHandle_t handle, hipsolverOperation_t trans, int n, int nrhs, const double* A, int lda, const int* devIpiv, double* B, int ldb, int* devInfo);
// CHECK: status = hipsolverDnDgetrs(handle, blasOperation, n, nrhs , &dA, lda, &devIpiv, &dB, ldb, &devInfo);
status = cusolverDnDgetrs(handle, blasOperation, n, nrhs , &dA, lda, &devIpiv, &dB, ldb, &devInfo);
// CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnDgetrf_bufferSize(cusolverDnHandle_t handle, int m, int n, double* A, int lda, int* Lwork);
// HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnDgetrf_bufferSize(hipsolverHandle_t handle, int m, int n, double* A, int lda, int* lwork);
// CHECK: status = hipsolverDnDgetrf_bufferSize(handle, m, n, &dA, lda, &Lwork);
status = cusolverDnDgetrf_bufferSize(handle, m, n, &dA, lda, &Lwork);

// CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnCgetrf_bufferSize(cusolverDnHandle_t handle, int m, int n, cuComplex * A, int lda, int * Lwork);
// HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnCgetrf_bufferSize(hipsolverHandle_t handle, int m, int n, hipFloatComplex* A, int lda, int* lwork);
// CHECK: status = hipsolverDnCgetrf_bufferSize(handle, m, n, &complexA, lda, &Lwork);
status = cusolverDnCgetrf_bufferSize(handle, m, n, &complexA, lda, &Lwork);

// CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnZgetrf_bufferSize(cusolverDnHandle_t handle, int m, int n, cuDoubleComplex * A, int lda, int * Lwork);
// HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnZgetrf_bufferSize(hipsolverHandle_t handle, int m, int n, hipDoubleComplex* A, int lda, int* lwork);
// CHECK: status = hipsolverDnZgetrf_bufferSize(handle, m, n, &dComplexA, lda, &Lwork);
status = cusolverDnZgetrf_bufferSize(handle, m, n, &dComplexA, lda, &Lwork);

// CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnSgetrs(cusolverDnHandle_t handle, cublasOperation_t trans, int n, int nrhs, const float* A, int lda, const int* devIpiv, float* B, int ldb, int* devInfo);
// HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnSgetrs(hipsolverHandle_t handle, hipsolverOperation_t trans, int n, int nrhs, const float* A, int lda, const int* devIpiv, float* B, int ldb, int* devInfo);
// CHECK: status = hipsolverDnSgetrs(handle, blasOperation, n, nrhs , &fA, lda, &devIpiv, &fB, ldb, &devInfo);
status = cusolverDnSgetrs(handle, blasOperation, n, nrhs , &fA, lda, &devIpiv, &fB, ldb, &devInfo);

// CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnDgetrs(cusolverDnHandle_t handle, cublasOperation_t trans, int n, int nrhs,const double* A, int lda, const int* devIpiv, double* B, int ldb, int* devInfo);
// HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverDnDgetrs(hipsolverHandle_t handle, hipsolverOperation_t trans, int n, int nrhs, const double* A, int lda, const int* devIpiv, double* B, int ldb, int* devInfo);
// CHECK: status = hipsolverDnDgetrs(handle, blasOperation, n, nrhs , &dA, lda, &devIpiv, &dB, ldb, &devInfo);
status = cusolverDnDgetrs(handle, blasOperation, n, nrhs , &dA, lda, &devIpiv, &dB, ldb, &devInfo);

// CUDA: cusolverStatus_t CUSOLVERAPI cusolverDnSetStream(cusolverDnHandle_t handle, cudaStream_t streamId);
// HIP: HIPSOLVER_EXPORT hipsolverStatus_t hipsolverSetStream(hipsolverHandle_t handle, hipStream_t streamId);
// CHECK: status = hipsolverSetStream(handle, stream_t);
Expand Down

0 comments on commit 7544def

Please sign in to comment.