Skip to content

Commit

Permalink
Merge pull request #686 from emankov/HIPIFY
Browse files Browse the repository at this point in the history
[HIPIFY][rocBLAS][fix] Sync with rocBLAS - functions only - Part 5 - final
  • Loading branch information
emankov authored Nov 7, 2022
2 parents 1521a51 + 017a378 commit 0050fa2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
6 changes: 3 additions & 3 deletions bin/hipify-perl
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,7 @@ sub rocSubstitutions {
subst("cublasGemmBatchedEx", "rocblas_gemm_batched_ex", "library");
subst("cublasGemmEx", "rocblas_gemm_ex", "library");
subst("cublasGemmStridedBatchedEx", "rocblas_gemm_strided_batched_ex", "library");
subst("cublasGetAtomicsMode", "rocblas_get_atomics_mode", "library");
subst("cublasGetMatrix", "rocblas_get_matrix", "library");
subst("cublasGetMatrixAsync", "rocblas_get_matrix_async", "library");
subst("cublasGetPointerMode", "rocblas_get_pointer_mode", "library");
Expand All @@ -1041,7 +1042,6 @@ sub rocSubstitutions {
subst("cublasGetStream_v2", "rocblas_get_stream", "library");
subst("cublasGetVector", "rocblas_get_vector", "library");
subst("cublasGetVectorAsync", "rocblas_get_vector_async", "library");
subst("cublasGetVersion", "rocblas_get_version_string", "library");
subst("cublasHgemm", "rocblas_hgemm", "library");
subst("cublasHgemmBatched", "rocblas_hgemm_batched", "library");
subst("cublasHgemmStridedBatched", "rocblas_hgemm_strided_batched", "library");
Expand Down Expand Up @@ -1078,6 +1078,7 @@ sub rocSubstitutions {
subst("cublasSdgmm", "rocblas_sdgmm", "library");
subst("cublasSdot", "rocblas_sdot", "library");
subst("cublasSdot_v2", "rocblas_sdot", "library");
subst("cublasSetAtomicsMode", "rocblas_set_atomics_mode", "library");
subst("cublasSetMatrix", "rocblas_set_matrix", "library");
subst("cublasSetMatrixAsync", "rocblas_set_matrix_async", "library");
subst("cublasSetPointerMode", "rocblas_set_pointer_mode", "library");
Expand Down Expand Up @@ -8145,7 +8146,6 @@ sub warnRocOnlyUnsupportedFunctions {
"cublasSetMathMode",
"cublasSetLoggerCallback",
"cublasSetKernelStream",
"cublasSetAtomicsMode",
"cublasRotmgEx",
"cublasRotmEx",
"cublasRotgEx",
Expand All @@ -8156,14 +8156,14 @@ sub warnRocOnlyUnsupportedFunctions {
"cublasIaminEx",
"cublasIamaxEx",
"cublasGetVersion_v2",
"cublasGetVersion",
"cublasGetStatusName",
"cublasGetSmCountTarget",
"cublasGetProperty",
"cublasGetMathMode",
"cublasGetLoggerCallback",
"cublasGetError",
"cublasGetCudartVersion",
"cublasGetAtomicsMode",
"cublasFree",
"cublasDtrttp",
"cublasDtpttr",
Expand Down
23 changes: 19 additions & 4 deletions src/CUDA2HIP_BLAS_API_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ const std::map<llvm::StringRef, hipCounter> CUDA_BLAS_FUNCTION_MAP {
// Blas management functions
{"cublasInit", {"hipblasInit", "rocblas_initialize", CONV_LIB_FUNC, API_BLAS, 4, HIP_UNSUPPORTED}},
{"cublasShutdown", {"hipblasShutdown", "", CONV_LIB_FUNC, API_BLAS, 4, UNSUPPORTED}},
{"cublasGetVersion", {"hipblasGetVersion", "rocblas_get_version_string", CONV_LIB_FUNC, API_BLAS, 4, HIP_UNSUPPORTED}},
{"cublasGetVersion", {"hipblasGetVersion", "", CONV_LIB_FUNC, API_BLAS, 4, UNSUPPORTED}},
{"cublasGetError", {"hipblasGetError", "", CONV_LIB_FUNC, API_BLAS, 4, UNSUPPORTED}},
{"cublasAlloc", {"hipblasAlloc", "", CONV_LIB_FUNC, API_BLAS, 4, UNSUPPORTED}},
{"cublasFree", {"hipblasFree", "", CONV_LIB_FUNC, API_BLAS, 4, UNSUPPORTED}},
{"cublasSetKernelStream", {"hipblasSetKernelStream", "", CONV_LIB_FUNC, API_BLAS, 4, UNSUPPORTED}},
{"cublasGetAtomicsMode", {"hipblasGetAtomicsMode", "", CONV_LIB_FUNC, API_BLAS, 4, ROC_UNSUPPORTED}},
{"cublasSetAtomicsMode", {"hipblasSetAtomicsMode", "", CONV_LIB_FUNC, API_BLAS, 4, ROC_UNSUPPORTED}},
{"cublasGetAtomicsMode", {"hipblasGetAtomicsMode", "rocblas_get_atomics_mode", CONV_LIB_FUNC, API_BLAS, 4}},
{"cublasSetAtomicsMode", {"hipblasSetAtomicsMode", "rocblas_set_atomics_mode", CONV_LIB_FUNC, API_BLAS, 4}},
{"cublasGetMathMode", {"hipblasGetMathMode", "", CONV_LIB_FUNC, API_BLAS, 4, UNSUPPORTED}},
{"cublasSetMathMode", {"hipblasSetMathMode", "", CONV_LIB_FUNC, API_BLAS, 4, UNSUPPORTED}},
{"cublasMigrateComputeType", {"hipblasMigrateComputeType", "", CONV_LIB_FUNC, API_BLAS, 4, UNSUPPORTED}},
Expand Down Expand Up @@ -1150,7 +1150,22 @@ const std::map<llvm::StringRef, hipAPIversions> HIP_BLAS_FUNCTION_VER_MAP {
{"rocblas_rot_ex", {HIP_4010, HIP_0, HIP_0 }},
{"rocblas_scal_ex", {HIP_4010, HIP_0, HIP_0 }},
{"rocblas_initialize", {HIP_3050, HIP_0, HIP_0 }},
{"rocblas_get_version_string", {HIP_2000, HIP_0, HIP_0 }},
{"rocblas_create_handle", {HIP_1050, HIP_0, HIP_0 }},
{"rocblas_destroy_handle", {HIP_1050, HIP_0, HIP_0 }},
{"rocblas_set_stream", {HIP_1050, HIP_0, HIP_0 }},
{"rocblas_get_stream", {HIP_1050, HIP_0, HIP_0 }},
{"rocblas_set_pointer_mode", {HIP_1060, HIP_0, HIP_0 }},
{"rocblas_get_pointer_mode", {HIP_1060, HIP_0, HIP_0 }},
{"rocblas_set_atomics_mode", {HIP_3080, HIP_0, HIP_0 }},
{"rocblas_get_atomics_mode", {HIP_3080, HIP_0, HIP_0 }},
{"rocblas_set_vector", {HIP_1060, HIP_0, HIP_0 }},
{"rocblas_get_vector", {HIP_1060, HIP_0, HIP_0 }},
{"rocblas_set_matrix", {HIP_1060, HIP_0, HIP_0 }},
{"rocblas_get_matrix", {HIP_1060, HIP_0, HIP_0 }},
{"rocblas_set_vector_async", {HIP_3050, HIP_0, HIP_0 }},
{"rocblas_get_vector_async", {HIP_3050, HIP_0, HIP_0 }},
{"rocblas_set_matrix_async", {HIP_3050, HIP_0, HIP_0 }},
{"rocblas_get_matrix_async", {HIP_3050, HIP_0, HIP_0 }},
};

const std::map<unsigned int, llvm::StringRef> CUDA_BLAS_API_SECTION_MAP {
Expand Down

0 comments on commit 0050fa2

Please sign in to comment.