Skip to content

[UR] added filename and line number to logs #17684

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 37 commits into
base: sycl
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
5e1d659
[UR] added filename and line number to logs
mateuszpn Mar 27, 2025
5e901d9
Merge branch 'urlog' of github.com:mateuszpn/llvm into urlog
mateuszpn Mar 27, 2025
146e801
Merge remote-tracking branch 'upstream/sycl' into urlog
mateuszpn Mar 27, 2025
6196264
Merge of 'upstream/sycl' into urlog and minor fixes
mateuszpn Mar 27, 2025
03b1b1e
Merge branch 'sycl' into urlog
mateuszpn Mar 31, 2025
1187d8b
Merge remote-tracking branch 'upstream/sycl' into urlog
mateuszpn Mar 28, 2025
a312a82
Temporary asserts for verification of changes
mateuszpn Apr 1, 2025
407c459
Merge branch 'urlog' of github.com:mateuszpn/llvm into urlog
mateuszpn Apr 1, 2025
39076ee
Merge remote-tracking branch 'upstream/sycl' into urlog
mateuszpn Apr 2, 2025
baf1fcd
verification asserts removed
mateuszpn Apr 3, 2025
1158fba
Merge remote-tracking branch 'upstream/sycl' into urlog
mateuszpn Apr 3, 2025
40a296e
Merge branch 'intel:sycl' into urlog
mateuszpn Apr 7, 2025
57d9baa
Merge remote-tracking branch 'upstream/sycl' into urlog
mateuszpn Apr 8, 2025
49f06b0
Merge branch 'intel:sycl' into urlog
mateuszpn Apr 9, 2025
4eb3bf6
change macros names and reduce their number
mateuszpn Apr 11, 2025
c27184c
Merge remote-tracking branch 'upstream/sycl' into urlog
mateuszpn Apr 14, 2025
e56dcf9
merge with upstream and adapt macros
mateuszpn Apr 15, 2025
f881e45
Merge remote-tracking branch 'upstream/sycl' into urlog
mateuszpn Apr 15, 2025
967d313
Merge remote-tracking branch 'upstream/sycl' into urlog
mateuszpn Apr 16, 2025
149119f
revert changes outside unified-runtime
mateuszpn Apr 16, 2025
e78a0a7
apply comments
mateuszpn Apr 18, 2025
daaba27
Merge remote-tracking branch 'upstream/sycl' into urlog
mateuszpn Apr 18, 2025
937bc22
apply comments
mateuszpn Apr 22, 2025
9ab1113
Merge remote-tracking branch 'upstream/sycl' into urlog
mateuszpn Apr 22, 2025
e767c82
Windows workaround
mateuszpn Apr 22, 2025
ffcf873
Windows workaround
mateuszpn Apr 22, 2025
864f0d2
Merge remote-tracking branch 'upstream/sycl' into urlog
mateuszpn Apr 23, 2025
9295115
Merge branch 'urlog' of github.com:mateuszpn/llvm into urlog
mateuszpn Apr 24, 2025
db4c349
Windows workaround
mateuszpn Apr 24, 2025
6c16d89
Windows workaround
mateuszpn Apr 24, 2025
221c61c
Windows workaround
mateuszpn Apr 24, 2025
d2eadd1
Merge branch 'urlog' of github.com:mateuszpn/llvm into urlog
mateuszpn Apr 24, 2025
9c76aad
Merge branch 'urlog' of github.com:mateuszpn/llvm into urlog
mateuszpn Apr 24, 2025
88f149d
Merge branch 'urlog' of github.com:mateuszpn/llvm into urlog
mateuszpn Apr 24, 2025
df73b49
Merge remote-tracking branch 'upstream/sycl' into urlog
mateuszpn Apr 24, 2025
57c4739
Windows workaround
mateuszpn Apr 24, 2025
4272297
Merge branch 'urlog' of github.com:mateuszpn/llvm into urlog
mateuszpn Apr 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions unified-runtime/scripts/templates/trcddi.cpp.mako
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace ur_tracing_layer
uint64_t instance = getContext()->notify_begin(${th.make_func_etor(n, tags, obj)}, "${th.make_func_name(n, tags, obj)}", &params);

auto &logger = getContext()->logger;
logger.info(" ---> ${th.make_func_name(n, tags, obj)}\n");
UR_LOG_L(logger, INFO, " ---> ${th.make_func_name(n, tags, obj)}\n");

${x}_result_t result = ${th.make_pfn_name(n, tags, obj)}( ${", ".join(th.make_param_lines(n, tags, obj, format=["name"]))} );

Expand All @@ -57,7 +57,7 @@ namespace ur_tracing_layer
if (logger.getLevel() <= UR_LOGGER_LEVEL_INFO) {
std::ostringstream args_str;
ur::extras::printFunctionParams(args_str, ${th.make_func_etor(n, tags, obj)}, &params);
logger.info(" <--- ${th.make_func_name(n, tags, obj)}({}) -> {};\n", args_str.str(), result);
UR_LOG_L(logger, INFO, " <--- ${th.make_func_name(n, tags, obj)}({}) -> {};\n", args_str.str(), result);
}

return result;
Expand Down
4 changes: 2 additions & 2 deletions unified-runtime/scripts/templates/valddi.cpp.mako
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ namespace ur_validation_layer
%>
%if tp_input_handle_funcs and not is_related_create_get_retain_release_func:
if (getContext()->enableLifetimeValidation && !getContext()->refCountContext->isReferenceValid(${tp['name']})) {
getContext()->refCountContext->logInvalidReference(${tp['name']});
URLOG_CTX_INVALID_REFERENCE(${tp['name']});
}
%endif
%endfor
Expand Down Expand Up @@ -239,7 +239,7 @@ namespace ur_validation_layer

${x}_result_t context_t::tearDown() {
if (enableLeakChecking) {
getContext()->refCountContext->logInvalidReferences();
URLOG_CTX_INVALID_REFERENCES();
}

return ${X}_RESULT_SUCCESS;
Expand Down
3 changes: 3 additions & 0 deletions unified-runtime/source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
add_definitions(-DUR_VERSION="${PROJECT_VERSION_MAJOR}")
add_definitions(-DUR_VALIDATION_LAYER_SUPPORTED_VERSION="${PROJECT_VERSION_MAJOR}")

string(LENGTH "${CMAKE_SOURCE_DIR}/" SRC_PATH_SIZE)
add_definitions("-DSRC_PATH_SIZE=${SRC_PATH_SIZE}") # for nicer log messages

add_subdirectory(common)
add_subdirectory(loader)
add_subdirectory(mock)
Expand Down
6 changes: 3 additions & 3 deletions unified-runtime/source/adapters/cuda/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void checkErrorUR(CUresult Result, const char *Function, int Line,
<< "\n\tDescription: " << ErrorString
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to the highlighted line: There is a very recently added logger warning call to cuda/usm.cpp L447 (at time of writing). That will need to be updated also.

Otherwise, CUDA/HIP changes LGTM so I'll approve now expecting you to change the line mentioned above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I expect more of these situations, and all changes in the upstream will be verified before merge (in most cases old-style log calls won't compile anyway).

<< "\n\tFunction: " << Function << "\n\tSource Location: " << File
<< ":" << Line << "\n";
logger::error("{}", SS.str());
UR_LOG(ERR, "{}", SS.str());

if (std::getenv("PI_CUDA_ABORT") != nullptr ||
std::getenv("UR_CUDA_ABORT") != nullptr) {
Expand All @@ -95,7 +95,7 @@ void checkErrorUR(nvmlReturn_t Result, const char *Function, int Line,
<< "\n\tDescription: " << ErrorString
<< "\n\tFunction: " << Function << "\n\tSource Location: " << File
<< ":" << Line << "\n";
logger::error("{}", SS.str());
UR_LOG(ERR, "{}", SS.str());

if (std::getenv("PI_CUDA_ABORT") != nullptr ||
std::getenv("UR_CUDA_ABORT") != nullptr) {
Expand All @@ -115,7 +115,7 @@ void checkErrorUR(ur_result_t Result, const char *Function, int Line,
SS << "\nUR ERROR:"
<< "\n\tValue: " << Result << "\n\tFunction: " << Function
<< "\n\tSource Location: " << File << ":" << Line << "\n";
logger::error("{}", SS.str());
UR_LOG(ERR, "{}", SS.str());

if (std::getenv("PI_CUDA_ABORT") != nullptr) {
std::abort();
Expand Down
3 changes: 2 additions & 1 deletion unified-runtime/source/adapters/cuda/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
} else if (std::getenv("SYCL_UR_CUDA_ENABLE_IMAGE_SUPPORT") != nullptr) {
Enabled = true;
} else {
logger::always(
UR_LOG(
QUIET,
"Images are not fully supported by the CUDA BE, their support is "
"disabled by default. Their partial support can be activated by "
"setting SYCL_UR_CUDA_ENABLE_IMAGE_SUPPORT environment variable at "
Expand Down
14 changes: 7 additions & 7 deletions unified-runtime/source/adapters/cuda/enqueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ ur_result_t setCuMemAdvise(CUdeviceptr DevPtr, size_t Size,

for (auto &UnmappedFlag : UnmappedMemAdviceFlags) {
if (URAdviceFlags & UnmappedFlag) {
logger::warning("Memory advice ignored because the CUDA backend does not "
"support some of the specified flags.");
UR_LOG(WARN, "Memory advice ignored because the CUDA backend does not "
"support some of the specified flags.");
return UR_RESULT_SUCCESS;
}
}
Expand Down Expand Up @@ -1608,16 +1608,16 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueUSMPrefetch(
// for managed memory. Therefore, ignore prefetch hint if concurrent managed
// memory access is not available.
if (!getAttribute(Device, CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS)) {
logger::warning("Prefetch hint ignored as device does not support "
"concurrent managed access.");
UR_LOG(WARN, "Prefetch hint ignored as device does not support "
"concurrent managed access.");
return UR_RESULT_SUCCESS;
}

unsigned int IsManaged;
UR_CHECK_ERROR(cuPointerGetAttribute(
&IsManaged, CU_POINTER_ATTRIBUTE_IS_MANAGED, (CUdeviceptr)pMem));
if (!IsManaged) {
logger::warning("Prefetch hint ignored as prefetch only works with USM.");
UR_LOG(WARN, "Prefetch hint ignored as prefetch only works with USM.");
return UR_RESULT_SUCCESS;
}

Expand Down Expand Up @@ -1668,8 +1668,8 @@ urEnqueueUSMAdvise(ur_queue_handle_t hQueue, const void *pMem, size_t size,
(advice & UR_USM_ADVICE_FLAG_DEFAULT)) {
ur_device_handle_t Device = hQueue->getDevice();
if (!getAttribute(Device, CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS)) {
logger::warning("Mem advise ignored as device does not support "
"concurrent managed access.");
UR_LOG(WARN, "Mem advise ignored as device does not support "
"concurrent managed access.");
return UR_RESULT_SUCCESS;
}

Expand Down
4 changes: 2 additions & 2 deletions unified-runtime/source/adapters/cuda/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -803,8 +803,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urBindlessImagesImageCopyExp(

// we don't support copying between different image types.
if (pSrcImageDesc->type != pDstImageDesc->type) {
logger::error(
"Unsupported copy operation between different type of images");
UR_LOG(ERR,
"Unsupported copy operation between different type of images");
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

Expand Down
4 changes: 2 additions & 2 deletions unified-runtime/source/adapters/cuda/usm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,8 @@ ur_usm_pool_handle_t_::ur_usm_pool_handle_t_(ur_context_handle_t Context,
// Otherwise, do nothing.
// Set maximum size is effectively ignored.
if (Limits->maxPoolableSize > 0)
logger::warning("The memory pool maximum size feature requires CUDA "
"12.2 or later.\n");
UR_LOG(WARN, "The memory pool maximum size feature requires CUDA "
"12.2 or later.\n");
#endif
maxSize = Limits->maxPoolableSize;
size_t chunkSize = 33554432; // 32MB
Expand Down
6 changes: 3 additions & 3 deletions unified-runtime/source/adapters/hip/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ void checkErrorUR(amd_comgr_status_t Result, const char *Function, int Line,
<< "\n\tDescription: " << ErrorString
<< "\n\tFunction: " << Function << "\n\tSource Location: " << File
<< ":" << Line << "\n";
logger::error("{}", SS.str());
UR_LOG(ERR, "{}", SS.str());

if (std::getenv("PI_HIP_ABORT") != nullptr ||
std::getenv("UR_HIP_ABORT") != nullptr) {
Expand All @@ -113,7 +113,7 @@ void checkErrorUR(hipError_t Result, const char *Function, int Line,
<< "\n\tDescription: " << ErrorString
<< "\n\tFunction: " << Function << "\n\tSource Location: " << File
<< ":" << Line << "\n";
logger::error("{}", SS.str());
UR_LOG(ERR, "{}", SS.str());

if (std::getenv("PI_HIP_ABORT") != nullptr ||
std::getenv("UR_HIP_ABORT") != nullptr) {
Expand All @@ -133,7 +133,7 @@ void checkErrorUR(ur_result_t Result, const char *Function, int Line,
SS << "\nUR HIP ERROR:"
<< "\n\tValue: " << Result << "\n\tFunction: " << Function
<< "\n\tSource Location: " << File << ":" << Line << "\n";
logger::error("{}", SS.str());
UR_LOG(ERR, "{}", SS.str());

if (std::getenv("PI_HIP_ABORT") != nullptr ||
std::getenv("UR_HIP_ABORT") != nullptr) {
Expand Down
22 changes: 11 additions & 11 deletions unified-runtime/source/adapters/hip/enqueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1374,8 +1374,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueUSMPrefetch(
// mem_advise.
if (!Device->getManagedMemSupport()) {
releaseEvent();
logger::warning("mem_advise ignored as device does not support "
"managed memory access.");
UR_LOG(WARN, "mem_advise ignored as device does not support "
"managed memory access.");
return UR_RESULT_SUCCESS;
}

Expand All @@ -1389,7 +1389,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueUSMPrefetch(
// async prefetch requires USM pointer (or hip SVM) to work.
if (!attribs.isManaged) {
releaseEvent();
logger::warning("Prefetch hint ignored as prefetch only works with USM.");
UR_LOG(WARN, "Prefetch hint ignored as prefetch only works with USM.");
return UR_RESULT_SUCCESS;
}

Expand Down Expand Up @@ -1444,8 +1444,8 @@ urEnqueueUSMAdvise(ur_queue_handle_t hQueue, const void *pMem, size_t size,
// mem_advise.
if (!Device->getManagedMemSupport()) {
releaseEvent();
logger::warning("mem_advise ignored as device does not support "
"managed memory access.");
UR_LOG(WARN, "mem_advise ignored as device does not support "
"managed memory access.");
return UR_RESULT_SUCCESS;
}

Expand All @@ -1461,8 +1461,8 @@ urEnqueueUSMAdvise(ur_queue_handle_t hQueue, const void *pMem, size_t size,
UR_USM_ADVICE_FLAG_DEFAULT)) {
if (!Device->getConcurrentManagedAccess()) {
releaseEvent();
logger::warning("mem_advise ignored as device does not support "
"concurrent memory access.");
UR_LOG(WARN, "mem_advise ignored as device does not support "
"concurrent memory access.");
return UR_RESULT_SUCCESS;
}

Expand All @@ -1481,8 +1481,8 @@ urEnqueueUSMAdvise(ur_queue_handle_t hQueue, const void *pMem, size_t size,
if (auto ptrAttribs = getPointerAttributes(pMem);
!ptrAttribs || !ptrAttribs->isManaged) {
releaseEvent();
logger::warning("mem_advise is ignored as the pointer argument is not "
"a shared USM pointer.");
UR_LOG(WARN, "mem_advise is ignored as the pointer argument is not "
"a shared USM pointer.");
return UR_RESULT_SUCCESS;
}

Expand Down Expand Up @@ -1510,8 +1510,8 @@ urEnqueueUSMAdvise(ur_queue_handle_t hQueue, const void *pMem, size_t size,
// the runtime.
if (Result == UR_RESULT_ERROR_INVALID_ENUMERATION) {
releaseEvent();
logger::warning("mem_advise is ignored as the advice argument is not "
"supported by this device.");
UR_LOG(WARN, "mem_advise is ignored as the advice argument is not "
"supported by this device.");
return UR_RESULT_SUCCESS;
}
UR_CHECK_ERROR(Result);
Expand Down
4 changes: 2 additions & 2 deletions unified-runtime/source/adapters/hip/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -822,8 +822,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urBindlessImagesImageCopyExp(

// we don't support copying between different image types.
if (pSrcImageDesc->type != pDstImageDesc->type) {
logger::error(
"Unsupported copy operation between different type of images");
UR_LOG(ERR,
"Unsupported copy operation between different type of images");
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

Expand Down
40 changes: 21 additions & 19 deletions unified-runtime/source/adapters/level_zero/adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ ur_result_t initPlatforms(PlatformVec &platforms,
ZE2UR_CALL(zeDriverGet, (&ZeDriverGetCount, ZeDriverGetHandles.data()));
}
if (ZeDriverGetCount == 0 && GlobalAdapter->ZeInitDriversCount == 0) {
logger::error("\nNo Valid L0 Drivers found.\n");
UR_LOG(ERR, "\nNo Valid L0 Drivers found.\n");
return UR_RESULT_SUCCESS;
}

Expand All @@ -188,9 +188,10 @@ ur_result_t initPlatforms(PlatformVec &platforms,
// newer drivers.
if (ZeDriverGetProperties.driverVersion !=
ZeInitDriverProperties.driverVersion) {
logger::debug("\nzeDriverHandle {} added to the zeInitDrivers list "
"of possible handles.\n",
ZeDriverGetHandles[Y]);
UR_LOG(DEBUG,
"\nzeDriverHandle {} added to the zeInitDrivers list "
"of possible handles.\n",
ZeDriverGetHandles[Y]);
ZeDrivers.push_back(ZeDriverGetHandles[Y]);
}
}
Expand All @@ -201,7 +202,7 @@ ur_result_t initPlatforms(PlatformVec &platforms,
ZeDrivers.assign(ZeDriverGetHandles.begin(), ZeDriverGetHandles.end());
}
ZeDriverCount = ZeDrivers.size();
logger::debug("\n{} L0 Drivers found.\n", ZeDriverCount);
UR_LOG(DEBUG, "\n{} L0 Drivers found.\n", ZeDriverCount);
for (uint32_t I = 0; I < ZeDriverCount; ++I) {
// Keep track of the first platform init for this Driver
bool DriverPlatformInit = false;
Expand Down Expand Up @@ -359,7 +360,8 @@ ur_adapter_handle_t_::ur_adapter_handle_t_()
}

if (getenv("SYCL_ENABLE_PCI") != nullptr) {
logger::warning(
UR_LOG(
WARN,
"WARNING: SYCL_ENABLE_PCI is deprecated and no longer needed.\n");
}

Expand All @@ -381,13 +383,13 @@ ur_adapter_handle_t_::ur_adapter_handle_t_()
if (UrL0InitAllDrivers) {
L0InitFlags |= ZE_INIT_FLAG_VPU_ONLY;
}
logger::debug("\nzeInit with flags value of {}\n",
static_cast<int>(L0InitFlags));
UR_LOG(DEBUG, "\nzeInit with flags value of {}\n",
static_cast<int>(L0InitFlags));
GlobalAdapter->ZeInitResult = ZE_CALL_NOCHECK(zeInit, (L0InitFlags));
if (GlobalAdapter->ZeInitResult != ZE_RESULT_SUCCESS) {
const char *ErrorString = "Unknown";
zeParseError(GlobalAdapter->ZeInitResult, ErrorString);
logger::error("\nzeInit failed with {}\n", ErrorString);
UR_LOG(ERR, "\nzeInit failed with {}\n", ErrorString);
}

bool useInitDrivers = false;
Expand All @@ -403,9 +405,9 @@ ur_adapter_handle_t_::ur_adapter_handle_t_()
if (strncmp(versions[i].component_name, "loader",
strlen("loader")) == 0) {
loader_version = versions[i].component_lib_version;
logger::debug("\nLevel Zero Loader Version: {}.{}.{}\n",
loader_version.major, loader_version.minor,
loader_version.patch);
UR_LOG(DEBUG, "\nLevel Zero Loader Version: {}.{}.{}\n",
loader_version.major, loader_version.minor,
loader_version.patch);
break;
}
}
Expand All @@ -428,8 +430,8 @@ ur_adapter_handle_t_::ur_adapter_handle_t_()
GlobalAdapter->processHandle, "zeInitDrivers");
#endif
if (GlobalAdapter->initDriversFunctionPtr) {
logger::debug("\nzeInitDrivers with flags value of {}\n",
static_cast<int>(GlobalAdapter->InitDriversDesc.flags));
UR_LOG(DEBUG, "\nzeInitDrivers with flags value of {}\n",
static_cast<int>(GlobalAdapter->InitDriversDesc.flags));
GlobalAdapter->ZeInitDriversResult =
ZE_CALL_NOCHECK(GlobalAdapter->initDriversFunctionPtr,
(&GlobalAdapter->ZeInitDriversCount, nullptr,
Expand All @@ -439,7 +441,7 @@ ur_adapter_handle_t_::ur_adapter_handle_t_()
} else {
const char *ErrorString = "Unknown";
zeParseError(GlobalAdapter->ZeInitDriversResult, ErrorString);
logger::error("\nzeInitDrivers failed with {}\n", ErrorString);
UR_LOG(ERR, "\nzeInitDrivers failed with {}\n", ErrorString);
}
}
}
Expand All @@ -457,12 +459,12 @@ ur_adapter_handle_t_::ur_adapter_handle_t_()

// Absorb the ZE_RESULT_ERROR_UNINITIALIZED and just return 0 Platforms.
if (*GlobalAdapter->ZeResult == ZE_RESULT_ERROR_UNINITIALIZED) {
logger::error("Level Zero Uninitialized\n");
UR_LOG(ERR, "Level Zero Uninitialized\n");
result = std::move(platforms);
return;
}
if (*GlobalAdapter->ZeResult != ZE_RESULT_SUCCESS) {
logger::error("Level Zero initialization failure\n");
UR_LOG(ERR, "Level Zero initialization failure\n");
result = ze2urResult(*GlobalAdapter->ZeResult);

return;
Expand Down Expand Up @@ -509,8 +511,8 @@ ur_adapter_handle_t_::ur_adapter_handle_t_()
GlobalAdapter->getSysManDriversFunctionPtr &&
GlobalAdapter->sysManInitFunctionPtr) {
ze_init_flags_t L0ZesInitFlags = 0;
logger::debug("\nzesInit with flags value of {}\n",
static_cast<int>(L0ZesInitFlags));
UR_LOG(DEBUG, "\nzesInit with flags value of {}\n",
static_cast<int>(L0ZesInitFlags));
GlobalAdapter->ZesResult = ZE_CALL_NOCHECK(
GlobalAdapter->sysManInitFunctionPtr, (L0ZesInitFlags));
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ static ur_result_t enqueueUSMAllocHelper(
CommandType = UR_COMMAND_ENQUEUE_USM_SHARED_ALLOC_EXP;
break;
default:
logger::error("enqueueUSMAllocHelper: unsupported USM type");
UR_LOG(ERR, "enqueueUSMAllocHelper: unsupported USM type");
throw UR_RESULT_ERROR_UNKNOWN;
}
UR_CALL(createEventAndAssociateQueue(Queue, Event, CommandType, CommandList,
Expand Down
Loading