From dd69a5edb6126617b516c3e4a3bc18782111bdb8 Mon Sep 17 00:00:00 2001 From: Evgeny Date: Thu, 3 May 2018 14:01:59 -0500 Subject: [PATCH] Tool load failure report changing to unconditional print bcos it's already is controlled with the env var Change-Id: I91b400ba94575a32005e825e6b41bda05c55b357 [ROCm/ROCR-Runtime commit: 0e0be791ecdd9cc374f0e638bcacd835344a754f] --- .../rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp | 2 +- projects/rocr-runtime/runtime/hsa-runtime/core/util/flag.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp index 0683adbfa2..af94a1ae64 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp @@ -1373,7 +1373,7 @@ void Runtime::LoadTools() { } else { if (flag().report_tool_load_failures()) - debug_print("Tool lib \"%s\" failed to load.\n", name.c_str()); + fprintf(stderr, "Tool lib \"%s\" failed to load.\n", name.c_str()); } } } diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/util/flag.h b/projects/rocr-runtime/runtime/hsa-runtime/core/util/flag.h index 7593bf36e2..6dd81ac9b5 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/util/flag.h +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/util/flag.h @@ -86,7 +86,11 @@ class Flag { tools_lib_names_ = os::GetEnvVar("HSA_TOOLS_LIB"); var = os::GetEnvVar("HSA_TOOLS_REPORT_LOAD_FAILURE"); +#ifdef NDEBUG + report_tool_load_failures_ = (var == "1") ? true : false; +#else report_tool_load_failures_ = (var == "0") ? false : true; +#endif var = os::GetEnvVar("HSA_DISABLE_FRAGMENT_ALLOCATOR"); disable_fragment_alloc_ = (var == "1") ? true : false;