From d16ccc8dcc5d5a747f2cae34bf69c3903bb99400 Mon Sep 17 00:00:00 2001
From: foreman
Date: Wed, 6 Nov 2019 12:11:11 -0500
Subject: [PATCH] P4 to Git Change 2025942 by axie@axie-hip-rocm on 2019/11/06
11:58:18
SWDEV-198863 - Options for hip-clang-vdi path to provide the chicken bits, or functional equivalents to HCC_DB (phase 2)
Enable the log functions for release build.
Tests:
1. Linux HIP ROCM platform. VEGA10. Driver is release build.
1.1 export LOG_LEVEL=3
./hipModule
There are many logs.
1.2 export GPU_LOG_MASK=0
./hipModule
There is no log
2. Windows HIP PAL platform. VEGA10, Driver is release or fastdbg build.
2.1 set LOG_LEVEL=3
run test hipPrintfKernel
There are many logs
2.2 set GPU_LOG_MASK=0
run test hipPrintfKernel
There is no log
3. http://ocltc.amd.com:8111/viewModification.html?modId=128481&personal=true&tab=vcsModificationBuilds
ReviewBoard: http://ocltc.amd.com/reviews/r/18240/
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/utils/debug.hpp#11 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#324 edit
---
rocclr/runtime/utils/debug.hpp | 5 ++---
rocclr/runtime/utils/flags.hpp | 2 +-
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/rocclr/runtime/utils/debug.hpp b/rocclr/runtime/utils/debug.hpp
index c3273505f8..d025bdb983 100644
--- a/rocclr/runtime/utils/debug.hpp
+++ b/rocclr/runtime/utils/debug.hpp
@@ -157,10 +157,9 @@ inline void warning(const char* msg) { amd::report_warning(msg); }
#define DebugInfoGuarantee(cond) LogGuarantee(cond, amd::LOG_INFO, "Warning")
-#ifndef NDEBUG
-#define CL_LOG
-#endif
// You may define CL_LOG to enable following log functions even for release build
+#define CL_LOG
+
#ifdef CL_LOG
#define ClPrint(level, mask, format, ...) \
do { \
diff --git a/rocclr/runtime/utils/flags.hpp b/rocclr/runtime/utils/flags.hpp
index cd5c914e4c..60a048e1d0 100644
--- a/rocclr/runtime/utils/flags.hpp
+++ b/rocclr/runtime/utils/flags.hpp
@@ -10,7 +10,7 @@
\
release(int, LOG_LEVEL, 0, \
"The default log level") \
-release(uint, GPU_LOG_MASK, 0, \
+release(uint, GPU_LOG_MASK, 0X7FFFFFFF, \
"The mask to enable specific kinds of logs") \
debug(uint, DEBUG_GPU_FLAGS, 0, \
"The debug options for GPU device") \