SWDEV-318872 - workaround explicit loading functional issue in Blender

Change-Id: I6857a8724f164641bc8d656367736e0fa16a158e
Этот коммит содержится в:
haoyuan2
2022-01-18 20:06:26 -08:00
коммит произвёл Hao Yuan
родитель d5c46676b5
Коммит 167810d6c8
2 изменённых файлов: 13 добавлений и 6 удалений
+9 -4
Просмотреть файл
@@ -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);
}
+4 -2
Просмотреть файл
@@ -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;