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;