diff --git a/projects/clr/hipamd/src/hip_error.cpp b/projects/clr/hipamd/src/hip_error.cpp index 2c0f72eda9..ae995f2007 100644 --- a/projects/clr/hipamd/src/hip_error.cpp +++ b/projects/clr/hipamd/src/hip_error.cpp @@ -37,7 +37,7 @@ hipError_t hipPeekAtLastError() HIP_RETURN(err); } -const char *hipGetErrorName(hipError_t hip_error) +const char *ihipGetErrorName(hipError_t hip_error) { switch (hip_error) { case hipSuccess: @@ -169,8 +169,13 @@ const char *hipGetErrorName(hipError_t hip_error) }; } -const char *hipGetErrorString(hipError_t hip_error) -{ - return hipGetErrorName(hip_error); +const char* hipGetErrorName(hipError_t hip_error) +{ + return ihipGetErrorName(hip_error); +} + +const char *hipGetErrorString(hipError_t hip_error) +{ + return ihipGetErrorName(hip_error); } diff --git a/projects/clr/hipamd/src/hip_internal.hpp b/projects/clr/hipamd/src/hip_internal.hpp index 63cbee6d3a..c2f6d57562 100644 --- a/projects/clr/hipamd/src/hip_internal.hpp +++ b/projects/clr/hipamd/src/hip_internal.hpp @@ -72,6 +72,8 @@ typedef struct ihipIpcEventHandle_st { inline int getpid() { return _getpid(); } #endif +const char* ihipGetErrorName(hipError_t hip_error); + static amd::Monitor g_hipInitlock{"hipInit lock"}; #define HIP_INIT() {\ amd::ScopedLock lock(g_hipInitlock); \ @@ -104,7 +106,7 @@ static amd::Monitor g_hipInitlock{"hipInit lock"}; #define HIP_ERROR_PRINT(err, ...) \ ClPrint(amd::LOG_INFO, amd::LOG_API, "%s: Returned %s : %s", \ - __func__, hipGetErrorName(err), ToString( __VA_ARGS__ ).c_str()); + __func__, ihipGetErrorName(err), ToString( __VA_ARGS__ ).c_str()); // This macro should be called at the beginning of every HIP API. #define HIP_INIT_API(cid, ...) \ @@ -120,7 +122,7 @@ static amd::Monitor g_hipInitlock{"hipInit lock"}; hip::g_lastError = ret; \ HIPPrintDuration(amd::LOG_INFO, amd::LOG_API, &startTimeUs, \ "%s: Returned %s : %s", \ - __func__, hipGetErrorName(hip::g_lastError), \ + __func__, ihipGetErrorName(hip::g_lastError), \ ToString( __VA_ARGS__ ).c_str()); \ return hip::g_lastError;