Skip to content

Commit b0bc3bf

Browse files
add eventPoolImmediate; going to test
1 parent 4bc101d commit b0bc3bf

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ ur_queue_batched_t::ur_queue_batched_t(
6969

7070
eventPoolRegular = hContext->getEventPoolCache(PoolCacheType::Regular)
7171
.borrow(hDevice->Id.value(), v2::EVENT_FLAGS_COUNTER);
72+
73+
eventPoolImmediate = hContext->getEventPoolCache(PoolCacheType::Immediate)
74+
.borrow(hDevice->Id.value(), eventFlags);
7275
}
7376

7477
ur_event_handle_t ur_queue_batched_t::createEventIfRequestedRegular(
@@ -983,8 +986,9 @@ ur_result_t ur_queue_batched_t::enqueueCommandBufferExp(
983986

984987
return lockedBatch->getImmediateManager().appendCommandBufferExp(
985988
hCommandBuffer, waitListView,
986-
createEventAndRetainRegular(phEvent,
987-
lockedBatch->getCurrentGeneration()));
989+
createEventAndRetain(eventPoolImmediate.get(), phEvent, this));
990+
// createEventAndRetainRegular(phEvent,
991+
// lockedBatch->getCurrentGeneration()));
988992
// lockedBatch->markIssuedCommand();
989993

990994
// return lockedBatch->getActiveBatch().appendCommandBufferExp(

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ struct ur_queue_batched_t : ur_object, ur_queue_t_ {
153153

154154
v2::raii::cache_borrowed_event_pool eventPoolRegular;
155155

156+
v2::raii::cache_borrowed_event_pool eventPoolImmediate;
157+
156158
v2::raii::command_list_unique_handle getNewRegularCmdList() {
157159
TRACK_SCOPE_LATENCY("ur_queue_batched_t::getNewRegularCmdList");
158160

0 commit comments

Comments
 (0)