diff --git a/source/adapters/opencl/adapter.cpp b/source/adapters/opencl/adapter.cpp index 4c1bb6bca1..1decaa92ca 100644 --- a/source/adapters/opencl/adapter.cpp +++ b/source/adapters/opencl/adapter.cpp @@ -9,10 +9,12 @@ //===----------------------------------------------------------------------===// #include "common.hpp" +#include "logger/ur_logger.hpp" struct ur_adapter_handle_t_ { std::atomic RefCount = 0; std::mutex Mutex; + logger::Logger &log = logger::get_logger("opencl"); }; static ur_adapter_handle_t_ *adapter = nullptr; diff --git a/source/adapters/opencl/common.cpp b/source/adapters/opencl/common.cpp index 5e03c0f4cb..c1668494da 100644 --- a/source/adapters/opencl/common.cpp +++ b/source/adapters/opencl/common.cpp @@ -9,7 +9,7 @@ //===----------------------------------------------------------------------===// #include "common.hpp" - +#include "logger/ur_logger.hpp" namespace cl_adapter { /* Global variables for urPlatformGetLastError() */ @@ -91,7 +91,7 @@ ur_result_t mapCLErrorToUR(cl_int Result) { } void cl_adapter::die(const char *Message) { - std::cerr << "ur_die: " << Message << "\n"; + logger::always("ur_die: {}", Message); std::terminate(); }