Skip to content

Commit 8016b17

Browse files
committed
[L0] Add additional logs to enqueue alloc flow
1 parent 3d9a3c2 commit 8016b17

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
@@ -1188,15 +1188,27 @@ ur_result_t ur_usm_pool_handle_t_::allocate(ur_context_handle_t Context,
11881188
UR_CALL(ur::level_zero::urContextRetain(Context));
11891189
}
11901190

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

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

0 commit comments

Comments
 (0)