Skip to content

Commit b84d49b

Browse files
[SYCL] Make Level-Zero events visible on the host (#2576)
The runtime is waiting for many of them there. Signed-off-by: Sergey V Maslov <sergey.v.maslov@intel.com>
1 parent 6ba2260 commit b84d49b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

sycl/plugins/level_zero/pi_level_zero.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,13 @@ _pi_context::getFreeSlotInExistingOrNewPool(ze_event_pool_handle_t &ZePool,
228228
ze_event_pool_desc_t ZeEventPoolDesc = {};
229229
ZeEventPoolDesc.stype = ZE_STRUCTURE_TYPE_EVENT_POOL_DESC;
230230
ZeEventPoolDesc.count = MaxNumEventsPerPool;
231-
ZeEventPoolDesc.flags = ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP;
231+
232+
// Make all events visible on the host.
233+
// TODO: events that are used only on device side APIs can be optimized
234+
// to not be from the host-visible pool.
235+
//
236+
ZeEventPoolDesc.flags =
237+
ZE_EVENT_POOL_FLAG_HOST_VISIBLE | ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP;
232238

233239
std::vector<ze_device_handle_t> ZeDevices;
234240
std::for_each(Devices.begin(), Devices.end(),

0 commit comments

Comments
 (0)