Skip to content

Commit 1c93536

Browse files
committed
[L0] Add additional logs to enqueue alloc flow
1 parent d54cca0 commit 1c93536

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Diff for: source/adapters/level_zero/usm.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -1175,15 +1175,27 @@ ur_result_t ur_usm_pool_handle_t_::allocate(ur_context_handle_t Context,
11751175
UR_CALL(ur::level_zero::urContextRetain(Context));
11761176
}
11771177

1178+
const auto Desc =
1179+
usm::pool_descriptor{this, Context, Device, Type, DeviceReadOnly};
1180+
logger::debug("enqueueUSMAllocHelper: retrieving an appropriate UMF pool for "
1181+
"pool descriptor {}",
1182+
Desc);
11781183
auto umfPool = getPool(
11791184
usm::pool_descriptor{this, Context, Device, Type, DeviceReadOnly});
11801185
if (!umfPool) {
11811186
return UR_RESULT_ERROR_INVALID_ARGUMENT;
11821187
}
11831188

1189+
logger::debug(
1190+
"enqueueUSMAllocHelper: preparing an allocation from the {} UMF pool",
1191+
umfPool);
1192+
11841193
*RetMem = umfPoolAlignedMalloc(umfPool, Size, Alignment);
11851194
if (*RetMem == nullptr) {
11861195
auto umfRet = umfPoolGetLastAllocationError(umfPool);
1196+
logger::error(
1197+
"enqueueUSMAllocHelper: allocation from the UMF pool {} failed",
1198+
umfPool);
11871199
return umf::umf2urResult(umfRet);
11881200
}
11891201

0 commit comments

Comments
 (0)