P4 to Git Change 1604468 by skudchad@skudchad_test2_win_opencl on 2018/09/11 18:28:45

SWDEV-145570 - [HIP] - Assert functionality for error != hipSuccess with LOG_LEVEL=3

	ReviewBoardURL = http://ocltc.amd.com/reviews/r/15793/diff/

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/hip/hip_internal.hpp#18 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/debug.hpp#8 edit


[ROCm/clr commit: 832753f4d3]
This commit is contained in:
foreman
2018-09-11 18:34:50 -04:00
parent a2af1d68ae
commit 42a04159d8
@@ -127,6 +127,17 @@ inline void warning(const char* msg) { amd::report_warning(msg); }
} \
} while (false)
#ifdef DEBUG
#define LogGuarantee(cond, level, msg) \
do { \
if (LOG_LEVEL >= level) { \
guarantee(cond); \
} \
} while (false)
#else // !DEBUG
#define LogGuarantee(cond, level, msg) (void)(0)
#endif // !DEBUG
#define LogInfo(msg) Log(amd::LOG_INFO, msg)
#define LogError(msg) Log(amd::LOG_ERROR, msg)
#define LogWarning(msg) Log(amd::LOG_WARNING, msg)
@@ -140,4 +151,6 @@ inline void warning(const char* msg) { amd::report_warning(msg); }
#define LogPrintfWarning(format, ...) Logf(amd::LOG_WARNING, format, __VA_ARGS__)
#define LogPrintfInfo(format, ...) Logf(amd::LOG_INFO, format, __VA_ARGS__)
#define DebugInfoGuarantee(cond) LogGuarantee(cond, amd::LOG_INFO, "Warning")
#endif /*DEBUG_HPP_*/