Revert "SWDEV-252801 - Fix hipGetLastError/hipPeekAtLastError"

Temporarily reverting to resolve promotion issues.

This reverts commit b36803746b.

Change-Id: I578d1d627e4b9779b146bf2827894522d6673d13


[ROCm/clr commit: ce0995e799]
This commit is contained in:
Maneesh Gupta
2021-10-03 21:56:21 -07:00
committato da Maneesh Gupta
parent a4daa31a89
commit 2ff0c7c7bf
+7 -13
Vedi File
@@ -97,22 +97,16 @@ typedef struct ihipIpcEventHandle_st {
HIP_INIT() \
HIP_CB_SPAWNER_OBJECT(cid);
#define HIP_RETURN_DURATION(ret, ...) \
hipError_t _lastError = (ret); \
if (_lastError != hipSuccess) { \
hip::g_lastError = _lastError; \
} \
#define HIP_RETURN_DURATION(ret, ...) \
hip::g_lastError = ret; \
HIPPrintDuration(amd::LOG_INFO, amd::LOG_API, &startTimeUs, "%s: Returned %s : %s", \
__func__, hipGetErrorName(_lastError), ToString( __VA_ARGS__ ).c_str()); \
return _lastError;
__func__, hipGetErrorName(hip::g_lastError), ToString( __VA_ARGS__ ).c_str()); \
return hip::g_lastError;
#define HIP_RETURN(ret, ...) \
hipError_t _lastError = (ret); \
if (_lastError != hipSuccess) { \
hip::g_lastError = _lastError; \
} \
HIP_ERROR_PRINT(_lastError, __VA_ARGS__) \
return _lastError;
hip::g_lastError = ret; \
HIP_ERROR_PRINT(hip::g_lastError, __VA_ARGS__) \
return hip::g_lastError;
#define HIP_RETURN_ONFAIL(func) \
do { \