Event - Extensions#
oneAPI Level Zero Specification - Version 1.18.31
Event - Extension Functions#
zeEventQueryKernelTimestampsExt#
Added in version 1.6
-
ZE_APIEXPORT ze_result_t ZE_APICALL zeEventQueryKernelTimestampsExt(ze_event_handle_t hEvent, ze_device_handle_t hDevice, uint32_t *pCount, ze_event_query_kernel_timestamps_results_ext_properties_t *pResults)#
Query an event’s timestamp value on the host, with domain preference.
For collecting only kernel timestamps, the application must ensure the event was created from an event pool that was created using ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP flag.
For collecting synchronized timestamps, the application must ensure the event was created from an event pool that was created using ZE_EVENT_POOL_FLAG_KERNEL_MAPPED_TIMESTAMP flag. Kernel timestamps are also available from this type of event pool, but there is a performance cost.
The destination memory will be unmodified if the event has not been signaled.
The application may call this function from simultaneous threads.
The implementation of this function must be thread-safe.
The implementation must support ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_NAME extension.
The implementation must return all timestamps for the specified event and device pair.
The implementation must return all timestamps for all sub-devices when device handle is parent device.
The implementation may return all timestamps for sub-devices when device handle is sub-device or may return 0 for count.
- Parameters:
hEvent – [in] handle of the event
hDevice – [in] handle of the device to query
pCount – [in,out] pointer to the number of event packets available.
This value is implementation specific.
if
*pCountis zero, then the driver shall update the value with the total number of event packets available.if
*pCountis greater than the number of event packets available, the driver shall update the value with the correct value.Buffer(s) for query results must be sized by the application to accommodate a minimum of
*pCountelements.
pResults – [in,out][optional][range(0, *pCount)] pointer to event query properties structure(s).
This parameter may be null when
*pCountis zero.if
*pCountis less than the number of event packets available, the driver may only update*pCountelements, starting at element zero.if
*pCountis greater than the number of event packets available, the driver may only update the valid elements.
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hEventnullptr == hDevice
ZE_RESULT_ERROR_INVALID_NULL_POINTER
nullptr == pCount
Event - Extension Enums#
ze_event_query_kernel_timestamps_ext_flags_t#
Added in version 1.6
-
enum ze_event_query_kernel_timestamps_ext_flag_t#
Values:
-
enumerator ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_KERNEL#
Kernel timestamp results.
-
enumerator ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_SYNCHRONIZED#
Device event timestamps synchronized to the host time domain.
-
enumerator ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_FORCE_UINT32#
Value marking end of ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_* ENUMs.
-
enumerator ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_KERNEL#
Event - Extension Structures#
ze_synchronized_timestamp_data_ext_t#
Added in version 1.6
-
struct ze_synchronized_timestamp_data_ext_t#
Kernel timestamp clock data synchronized to the host time domain.
ze_synchronized_timestamp_result_ext_t#
Added in version 1.6
-
struct ze_synchronized_timestamp_result_ext_t#
Synchronized kernel timestamp result.
Public Members
-
ze_synchronized_timestamp_data_ext_t global#
[out] wall-clock data; free running device clock when device was active,on the host time domain
-
ze_synchronized_timestamp_data_ext_t context#
[out] context specific active data; only includes clocks while context was actively executing on the device, on the host time domain
-
ze_synchronized_timestamp_data_ext_t global#