diff --git a/sycl/plugins/level_zero/pi_level_zero.cpp b/sycl/plugins/level_zero/pi_level_zero.cpp index 65d3a29fcba06..69bd8b77c879b 100644 --- a/sycl/plugins/level_zero/pi_level_zero.cpp +++ b/sycl/plugins/level_zero/pi_level_zero.cpp @@ -228,7 +228,13 @@ _pi_context::getFreeSlotInExistingOrNewPool(ze_event_pool_handle_t &ZePool, ze_event_pool_desc_t ZeEventPoolDesc = {}; ZeEventPoolDesc.stype = ZE_STRUCTURE_TYPE_EVENT_POOL_DESC; ZeEventPoolDesc.count = MaxNumEventsPerPool; - ZeEventPoolDesc.flags = ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP; + + // Make all events visible on the host. + // TODO: events that are used only on device side APIs can be optimized + // to not be from the host-visible pool. + // + ZeEventPoolDesc.flags = + ZE_EVENT_POOL_FLAG_HOST_VISIBLE | ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP; std::vector ZeDevices; std::for_each(Devices.begin(), Devices.end(),