Skip to content

Commit 34e4196

Browse files
committed
[L0] Add additional logs to enqueue alloc flow
1 parent 1766dda commit 34e4196

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

source/adapters/level_zero/usm.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -1187,15 +1187,27 @@ ur_result_t ur_usm_pool_handle_t_::allocate(ur_context_handle_t Context,
11871187
UR_CALL(ur::level_zero::urContextRetain(Context));
11881188
}
11891189

1190+
const auto Desc =
1191+
usm::pool_descriptor{this, Context, Device, Type, DeviceReadOnly};
1192+
logger::debug("enqueueUSMAllocHelper: retrieving an appropriate UMF pool for "
1193+
"pool descriptor {}",
1194+
Desc);
11901195
auto umfPool = getPool(
11911196
usm::pool_descriptor{this, Context, Device, Type, DeviceReadOnly});
11921197
if (!umfPool) {
11931198
return UR_RESULT_ERROR_INVALID_ARGUMENT;
11941199
}
11951200

1201+
logger::debug(
1202+
"enqueueUSMAllocHelper: preparing an allocation from the UMF pool {}",
1203+
umfPool);
1204+
11961205
*RetMem = umfPoolAlignedMalloc(umfPool, Size, Alignment);
11971206
if (*RetMem == nullptr) {
11981207
auto umfRet = umfPoolGetLastAllocationError(umfPool);
1208+
logger::error(
1209+
"enqueueUSMAllocHelper: allocation from the UMF pool {} failed",
1210+
umfPool);
11991211
return umf::umf2urResult(umfRet);
12001212
}
12011213

0 commit comments

Comments
 (0)