@@ -222,6 +222,7 @@ typedef enum ur_function_t {
222222 UR_FUNCTION_COMMAND_BUFFER_UPDATE_KERNEL_LAUNCH_EXP = 220, ///< Enumerator for ::urCommandBufferUpdateKernelLaunchExp
223223 UR_FUNCTION_COMMAND_BUFFER_GET_INFO_EXP = 221, ///< Enumerator for ::urCommandBufferGetInfoExp
224224 UR_FUNCTION_COMMAND_BUFFER_COMMAND_GET_INFO_EXP = 222, ///< Enumerator for ::urCommandBufferCommandGetInfoExp
225+ UR_FUNCTION_ENQUEUE_TIMESTAMP_RECORDING_EXP = 223, ///< Enumerator for ::urEnqueueTimestampRecordingExp
225226 /// @cond
226227 UR_FUNCTION_FORCE_UINT32 = 0x7fffffff
227228 /// @endcond
@@ -1641,6 +1642,7 @@ typedef enum ur_device_info_t {
16411642 ///< backed 3D sampled image data.
16421643 UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D_EXP = 0x2017, ///< [::ur_bool_t] returns true if the device is capable of fetching
16431644 ///< non-USM backed 3D sampled image data.
1645+ UR_DEVICE_INFO_TIMESTAMP_RECORDING_SUPPORT_EXP = 0x2018, ///< [::ur_bool_t] returns true if the device supports timestamp recording
16441646 /// @cond
16451647 UR_DEVICE_INFO_FORCE_UINT32 = 0x7fffffff
16461648 /// @endcond
@@ -1666,7 +1668,7 @@ typedef enum ur_device_info_t {
16661668/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
16671669/// + `NULL == hDevice`
16681670/// - ::UR_RESULT_ERROR_INVALID_ENUMERATION
1669- /// + `::UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D_EXP < propName`
1671+ /// + `::UR_DEVICE_INFO_TIMESTAMP_RECORDING_SUPPORT_EXP < propName`
16701672/// - ::UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION
16711673/// + If `propName` is not supported by the adapter.
16721674/// - ::UR_RESULT_ERROR_INVALID_SIZE
@@ -5618,6 +5620,7 @@ typedef enum ur_command_t {
56185620 UR_COMMAND_COMMAND_BUFFER_ENQUEUE_EXP = 0x1000, ///< Event created by ::urCommandBufferEnqueueExp
56195621 UR_COMMAND_INTEROP_SEMAPHORE_WAIT_EXP = 0x2000, ///< Event created by ::urBindlessImagesWaitExternalSemaphoreExp
56205622 UR_COMMAND_INTEROP_SEMAPHORE_SIGNAL_EXP = 0x2001, ///< Event created by ::urBindlessImagesSignalExternalSemaphoreExp
5623+ UR_COMMAND_TIMESTAMP_RECORDING_EXP = 0x2002, ///< Event created by ::urEnqueueTimestampRecordingExp
56215624 /// @cond
56225625 UR_COMMAND_FORCE_UINT32 = 0x7fffffff
56235626 /// @endcond
@@ -8890,6 +8893,46 @@ urKernelSuggestMaxCooperativeGroupCountExp(
88908893 uint32_t *pGroupCountRet ///< [out] pointer to maximum number of groups
88918894);
88928895
8896+ #if !defined(__GNUC__)
8897+ #pragma endregion
8898+ #endif
8899+ // Intel 'oneAPI' Unified Runtime Experimental APIs for enqueuing timestamp recordings
8900+ #if !defined(__GNUC__)
8901+ #pragma region enqueue timestamp recording(experimental)
8902+ #endif
8903+ ///////////////////////////////////////////////////////////////////////////////
8904+ /// @brief Enqueue a command for recording the device timestamp
8905+ ///
8906+ /// @returns
8907+ /// - ::UR_RESULT_SUCCESS
8908+ /// - ::UR_RESULT_ERROR_UNINITIALIZED
8909+ /// - ::UR_RESULT_ERROR_DEVICE_LOST
8910+ /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
8911+ /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
8912+ /// + `NULL == hQueue`
8913+ /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
8914+ /// + `NULL == phEvent`
8915+ /// - ::UR_RESULT_ERROR_INVALID_EVENT_WAIT_LIST
8916+ UR_APIEXPORT ur_result_t UR_APICALL
8917+ urEnqueueTimestampRecordingExp(
8918+ ur_queue_handle_t hQueue, ///< [in] handle of the queue object
8919+ bool blocking, ///< [in] indicates whether the call to this function should block until
8920+ ///< until the device timestamp recording command has executed on the
8921+ ///< device.
8922+ uint32_t numEventsInWaitList, ///< [in] size of the event wait list
8923+ const ur_event_handle_t *phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of
8924+ ///< events that must be complete before the kernel execution.
8925+ ///< If nullptr, the numEventsInWaitList must be 0, indicating no wait
8926+ ///< events.
8927+ ur_event_handle_t *phEvent ///< [in,out] return an event object that identifies this particular kernel
8928+ ///< execution instance. Profiling information can be queried
8929+ ///< from this event as if `hQueue` had profiling enabled. Querying
8930+ ///< `UR_PROFILING_INFO_COMMAND_QUEUED` or `UR_PROFILING_INFO_COMMAND_SUBMIT`
8931+ ///< reports the timestamp at the time of the call to this function.
8932+ ///< Querying `UR_PROFILING_INFO_COMMAND_START` or `UR_PROFILING_INFO_COMMAND_END`
8933+ ///< reports the timestamp recorded when the command is executed on the device.
8934+ );
8935+
88938936#if !defined(__GNUC__)
88948937#pragma endregion
88958938#endif
@@ -10600,6 +10643,18 @@ typedef struct ur_enqueue_cooperative_kernel_launch_exp_params_t {
1060010643 ur_event_handle_t **pphEvent;
1060110644} ur_enqueue_cooperative_kernel_launch_exp_params_t;
1060210645
10646+ ///////////////////////////////////////////////////////////////////////////////
10647+ /// @brief Function parameters for urEnqueueTimestampRecordingExp
10648+ /// @details Each entry is a pointer to the parameter passed to the function;
10649+ /// allowing the callback the ability to modify the parameter's value
10650+ typedef struct ur_enqueue_timestamp_recording_exp_params_t {
10651+ ur_queue_handle_t *phQueue;
10652+ bool *pblocking;
10653+ uint32_t *pnumEventsInWaitList;
10654+ const ur_event_handle_t **pphEventWaitList;
10655+ ur_event_handle_t **pphEvent;
10656+ } ur_enqueue_timestamp_recording_exp_params_t;
10657+
1060310658///////////////////////////////////////////////////////////////////////////////
1060410659/// @brief Function parameters for urBindlessImagesUnsampledImageHandleDestroyExp
1060510660/// @details Each entry is a pointer to the parameter passed to the function;
0 commit comments