diff --git a/bin/hipify-perl b/bin/hipify-perl index 6ca70c13..23da6adc 100755 --- a/bin/hipify-perl +++ b/bin/hipify-perl @@ -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"); @@ -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"); @@ -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"); @@ -8145,7 +8146,6 @@ sub warnRocOnlyUnsupportedFunctions { "cublasSetMathMode", "cublasSetLoggerCallback", "cublasSetKernelStream", - "cublasSetAtomicsMode", "cublasRotmgEx", "cublasRotmEx", "cublasRotgEx", @@ -8156,6 +8156,7 @@ sub warnRocOnlyUnsupportedFunctions { "cublasIaminEx", "cublasIamaxEx", "cublasGetVersion_v2", + "cublasGetVersion", "cublasGetStatusName", "cublasGetSmCountTarget", "cublasGetProperty", @@ -8163,7 +8164,6 @@ sub warnRocOnlyUnsupportedFunctions { "cublasGetLoggerCallback", "cublasGetError", "cublasGetCudartVersion", - "cublasGetAtomicsMode", "cublasFree", "cublasDtrttp", "cublasDtpttr", diff --git a/src/CUDA2HIP_BLAS_API_functions.cpp b/src/CUDA2HIP_BLAS_API_functions.cpp index a6d88cb0..a912fa1f 100644 --- a/src/CUDA2HIP_BLAS_API_functions.cpp +++ b/src/CUDA2HIP_BLAS_API_functions.cpp @@ -28,13 +28,13 @@ const std::map 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}}, @@ -1150,7 +1150,22 @@ const std::map 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 CUDA_BLAS_API_SECTION_MAP {