@@ -230,6 +230,7 @@ typedef enum ur_function_t {
230230 UR_FUNCTION_COMMAND_BUFFER_UPDATE_SIGNAL_EVENT_EXP = 243, ///< Enumerator for ::urCommandBufferUpdateSignalEventExp
231231 UR_FUNCTION_COMMAND_BUFFER_UPDATE_WAIT_EVENTS_EXP = 244, ///< Enumerator for ::urCommandBufferUpdateWaitEventsExp
232232 UR_FUNCTION_BINDLESS_IMAGES_MAP_EXTERNAL_LINEAR_MEMORY_EXP = 245, ///< Enumerator for ::urBindlessImagesMapExternalLinearMemoryExp
233+ UR_FUNCTION_ENQUEUE_EVENTS_WAIT_WITH_BARRIER_EXT = 246, ///< Enumerator for ::urEnqueueEventsWaitWithBarrierExt
233234 /// @cond
234235 UR_FUNCTION_FORCE_UINT32 = 0x7fffffff
235236 /// @endcond
@@ -288,6 +289,7 @@ typedef enum ur_structure_type_t {
288289 UR_STRUCTURE_TYPE_EXP_SAMPLER_CUBEMAP_PROPERTIES = 0x2006, ///< ::ur_exp_sampler_cubemap_properties_t
289290 UR_STRUCTURE_TYPE_EXP_IMAGE_COPY_REGION = 0x2007, ///< ::ur_exp_image_copy_region_t
290291 UR_STRUCTURE_TYPE_EXP_ENQUEUE_NATIVE_COMMAND_PROPERTIES = 0x3000, ///< ::ur_exp_enqueue_native_command_properties_t
292+ UR_STRUCTURE_TYPE_EXP_ENQUEUE_EXT_PROPERTIES = 0x4000, ///< ::ur_exp_enqueue_ext_properties_t
291293 /// @cond
292294 UR_STRUCTURE_TYPE_FORCE_UINT32 = 0x7fffffff
293295 /// @endcond
@@ -1702,6 +1704,7 @@ typedef enum ur_device_info_t {
17021704 ///< backed 2D sampled image data.
17031705 UR_DEVICE_INFO_ENQUEUE_NATIVE_COMMAND_SUPPORT_EXP = 0x2020, ///< [::ur_bool_t] returns true if the device supports enqueueing of native
17041706 ///< work
1707+ UR_DEVICE_INFO_LOW_POWER_EVENTS_EXP = 0x2021, ///< [::ur_bool_t] returns true if the device supports low-power events.
17051708 /// @cond
17061709 UR_DEVICE_INFO_FORCE_UINT32 = 0x7fffffff
17071710 /// @endcond
@@ -1727,7 +1730,7 @@ typedef enum ur_device_info_t {
17271730/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
17281731/// + `NULL == hDevice`
17291732/// - ::UR_RESULT_ERROR_INVALID_ENUMERATION
1730- /// + `::UR_DEVICE_INFO_ENQUEUE_NATIVE_COMMAND_SUPPORT_EXP < propName`
1733+ /// + `::UR_DEVICE_INFO_LOW_POWER_EVENTS_EXP < propName`
17311734/// - ::UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION
17321735/// + If `propName` is not supported by the adapter.
17331736/// - ::UR_RESULT_ERROR_INVALID_SIZE
@@ -5447,13 +5450,17 @@ typedef enum ur_queue_flag_t {
54475450 ///< ignore this flag.
54485451 UR_QUEUE_FLAG_SYNC_WITH_DEFAULT_STREAM = UR_BIT(10), ///< Synchronize with the default stream. Only meaningful for CUDA. Other
54495452 ///< platforms may ignore this flag.
5453+ UR_QUEUE_FLAG_LOW_POWER_EVENTS_EXP = UR_BIT(11), ///< Hint: use low-power events. Only meaningful for Level Zero, where the
5454+ ///< implementation may use interrupt-driven events. May reduce CPU
5455+ ///< utilization at the cost of increased event completion latency. Other
5456+ ///< platforms may ignore this flag.
54505457 /// @cond
54515458 UR_QUEUE_FLAG_FORCE_UINT32 = 0x7fffffff
54525459 /// @endcond
54535460
54545461} ur_queue_flag_t;
54555462/// @brief Bit Mask for validating ur_queue_flags_t
5456- #define UR_QUEUE_FLAGS_MASK 0xfffff800
5463+ #define UR_QUEUE_FLAGS_MASK 0xfffff000
54575464
54585465///////////////////////////////////////////////////////////////////////////////
54595466/// @brief Query information about a command queue
@@ -9974,6 +9981,89 @@ urUsmP2PPeerAccessGetInfoExp(
99749981 size_t *pPropSizeRet ///< [out][optional] pointer to the actual size in bytes of the queried propName.
99759982);
99769983
9984+ #if !defined(__GNUC__)
9985+ #pragma endregion
9986+ #endif
9987+ // Intel 'oneAPI' Unified Runtime Experimental API for low-power events API
9988+ #if !defined(__GNUC__)
9989+ #pragma region low_power_events_(experimental)
9990+ #endif
9991+ ///////////////////////////////////////////////////////////////////////////////
9992+ /// @brief Extended enqueue properties
9993+ typedef uint32_t ur_exp_enqueue_ext_flags_t;
9994+ typedef enum ur_exp_enqueue_ext_flag_t {
9995+ UR_EXP_ENQUEUE_EXT_FLAG_LOW_POWER_EVENTS = UR_BIT(11), ///< Hint: use low-power events. Only meaningful for Level Zero, where the
9996+ ///< implementation may use interrupt-driven events. May reduce CPU
9997+ ///< utilization at the cost of increased event completion latency. Other
9998+ ///< platforms may ignore this flag.
9999+ /// @cond
10000+ UR_EXP_ENQUEUE_EXT_FLAG_FORCE_UINT32 = 0x7fffffff
10001+ /// @endcond
10002+
10003+ } ur_exp_enqueue_ext_flag_t;
10004+ /// @brief Bit Mask for validating ur_exp_enqueue_ext_flags_t
10005+ #define UR_EXP_ENQUEUE_EXT_FLAGS_MASK 0xfffff7ff
10006+
10007+ ///////////////////////////////////////////////////////////////////////////////
10008+ /// @brief Extended enqueue properties
10009+ typedef struct ur_exp_enqueue_ext_properties_t {
10010+ ur_structure_type_t stype; ///< [in] type of this structure, must be
10011+ ///< ::UR_STRUCTURE_TYPE_EXP_ENQUEUE_EXT_PROPERTIES
10012+ void *pNext; ///< [in,out][optional] pointer to extension-specific structure
10013+ ur_exp_enqueue_ext_flags_t flags; ///< [in] extended enqueue flags
10014+
10015+ } ur_exp_enqueue_ext_properties_t;
10016+
10017+ ///////////////////////////////////////////////////////////////////////////////
10018+ /// @brief Enqueue a barrier command which waits a list of events to complete
10019+ /// before it completes, with optional extended properties
10020+ ///
10021+ /// @details
10022+ /// - If the event list is empty, it waits for all previously enqueued
10023+ /// commands to complete.
10024+ /// - It blocks command execution - any following commands enqueued after it
10025+ /// do not execute until it completes.
10026+ /// - It returns an event which can be waited on.
10027+ ///
10028+ /// @remarks
10029+ /// _Analogues_
10030+ /// - **clEnqueueBarrierWithWaitList**
10031+ ///
10032+ /// @returns
10033+ /// - ::UR_RESULT_SUCCESS
10034+ /// - ::UR_RESULT_ERROR_UNINITIALIZED
10035+ /// - ::UR_RESULT_ERROR_DEVICE_LOST
10036+ /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
10037+ /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
10038+ /// + `NULL == hQueue`
10039+ /// - ::UR_RESULT_ERROR_INVALID_ENUMERATION
10040+ /// + `NULL != pProperties && ::UR_EXP_ENQUEUE_EXT_FLAGS_MASK & pProperties->flags`
10041+ /// - ::UR_RESULT_ERROR_INVALID_QUEUE
10042+ /// - ::UR_RESULT_ERROR_INVALID_EVENT
10043+ /// - ::UR_RESULT_ERROR_INVALID_EVENT_WAIT_LIST
10044+ /// + `phEventWaitList == NULL && numEventsInWaitList > 0`
10045+ /// + `phEventWaitList != NULL && numEventsInWaitList == 0`
10046+ /// + If event objects in phEventWaitList are not valid events.
10047+ /// - ::UR_RESULT_ERROR_IN_EVENT_LIST_EXEC_STATUS
10048+ /// + An event in `phEventWaitList` has ::UR_EVENT_STATUS_ERROR.
10049+ /// - ::UR_RESULT_ERROR_INVALID_VALUE
10050+ /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
10051+ /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES
10052+ UR_APIEXPORT ur_result_t UR_APICALL
10053+ urEnqueueEventsWaitWithBarrierExt(
10054+ ur_queue_handle_t hQueue, ///< [in] handle of the queue object
10055+ const ur_exp_enqueue_ext_properties_t *pProperties, ///< [in][optional] pointer to the extended enqueue properties
10056+ uint32_t numEventsInWaitList, ///< [in] size of the event wait list
10057+ const ur_event_handle_t *phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of
10058+ ///< events that must be complete before this command can be executed.
10059+ ///< If nullptr, the numEventsInWaitList must be 0, indicating that all
10060+ ///< previously enqueued commands
10061+ ///< must be complete.
10062+ ur_event_handle_t *phEvent ///< [out][optional] return an event object that identifies this particular
10063+ ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent
10064+ ///< must not refer to an element of the phEventWaitList array.
10065+ );
10066+
997710067#if !defined(__GNUC__)
997810068#pragma endregion
997910069#endif
@@ -11450,6 +11540,18 @@ typedef struct ur_enqueue_kernel_launch_custom_exp_params_t {
1145011540 ur_event_handle_t **pphEvent;
1145111541} ur_enqueue_kernel_launch_custom_exp_params_t;
1145211542
11543+ ///////////////////////////////////////////////////////////////////////////////
11544+ /// @brief Function parameters for urEnqueueEventsWaitWithBarrierExt
11545+ /// @details Each entry is a pointer to the parameter passed to the function;
11546+ /// allowing the callback the ability to modify the parameter's value
11547+ typedef struct ur_enqueue_events_wait_with_barrier_ext_params_t {
11548+ ur_queue_handle_t *phQueue;
11549+ const ur_exp_enqueue_ext_properties_t **ppProperties;
11550+ uint32_t *pnumEventsInWaitList;
11551+ const ur_event_handle_t **pphEventWaitList;
11552+ ur_event_handle_t **pphEvent;
11553+ } ur_enqueue_events_wait_with_barrier_ext_params_t;
11554+
1145311555///////////////////////////////////////////////////////////////////////////////
1145411556/// @brief Function parameters for urEnqueueCooperativeKernelLaunchExp
1145511557/// @details Each entry is a pointer to the parameter passed to the function;
0 commit comments