Skip to content

Commit 88f1f06

Browse files
committed
Move eventPool member up - it should be destroyed after cmd list manager
1 parent 95094f9 commit 88f1f06

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

unified-runtime/source/adapters/level_zero/v2/queue_immediate_out_of_order.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ ur_queue_immediate_out_of_order_t::ur_queue_immediate_out_of_order_t(
4444
ze_command_queue_priority_t priority, event_flags_t eventFlags,
4545
ur_queue_flags_t flags)
4646
: hContext(hContext), hDevice(hDevice),
47-
commandListManagers(createCommandListManagers<numCommandLists>(
48-
hContext, hDevice, ordinal, priority)),
4947
eventPool(hContext->getEventPoolCache(PoolCacheType::Immediate)
5048
.borrow(hDevice->Id.value(), eventFlags)),
49+
commandListManagers(createCommandListManagers<numCommandLists>(
50+
hContext, hDevice, ordinal, priority)),
5151
flags(flags) {
5252
for (size_t i = 0; i < numCommandLists; i++) {
5353
barrierEvents[i] = eventPool->allocate();

unified-runtime/source/adapters/level_zero/v2/queue_immediate_out_of_order.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ struct ur_queue_immediate_out_of_order_t : ur_object, ur_queue_t_ {
3030
ur_context_handle_t hContext;
3131
ur_device_handle_t hDevice;
3232

33+
v2::raii::cache_borrowed_event_pool eventPool;
34+
3335
std::atomic<uint32_t> commandListIndex = 0;
3436
lockable<std::array<ur_command_list_manager, numCommandLists>>
3537
commandListManagers;
3638

37-
v2::raii::cache_borrowed_event_pool eventPool;
38-
3939
ur_queue_flags_t flags;
4040

4141
std::array<ur_event_handle_t, numCommandLists> barrierEvents;

0 commit comments

Comments
 (0)