@@ -230,6 +230,7 @@ typedef enum ur_function_t {
230
230
UR_FUNCTION_COMMAND_BUFFER_UPDATE_SIGNAL_EVENT_EXP = 243, ///< Enumerator for ::urCommandBufferUpdateSignalEventExp
231
231
UR_FUNCTION_COMMAND_BUFFER_UPDATE_WAIT_EVENTS_EXP = 244, ///< Enumerator for ::urCommandBufferUpdateWaitEventsExp
232
232
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
233
234
/// @cond
234
235
UR_FUNCTION_FORCE_UINT32 = 0x7fffffff
235
236
/// @endcond
@@ -288,6 +289,7 @@ typedef enum ur_structure_type_t {
288
289
UR_STRUCTURE_TYPE_EXP_SAMPLER_CUBEMAP_PROPERTIES = 0x2006, ///< ::ur_exp_sampler_cubemap_properties_t
289
290
UR_STRUCTURE_TYPE_EXP_IMAGE_COPY_REGION = 0x2007, ///< ::ur_exp_image_copy_region_t
290
291
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
291
293
/// @cond
292
294
UR_STRUCTURE_TYPE_FORCE_UINT32 = 0x7fffffff
293
295
/// @endcond
@@ -1702,6 +1704,7 @@ typedef enum ur_device_info_t {
1702
1704
///< backed 2D sampled image data.
1703
1705
UR_DEVICE_INFO_ENQUEUE_NATIVE_COMMAND_SUPPORT_EXP = 0x2020, ///< [::ur_bool_t] returns true if the device supports enqueueing of native
1704
1706
///< work
1707
+ UR_DEVICE_INFO_LOW_POWER_EVENTS_EXP = 0x2021, ///< [::ur_bool_t] returns true if the device supports low-power events.
1705
1708
/// @cond
1706
1709
UR_DEVICE_INFO_FORCE_UINT32 = 0x7fffffff
1707
1710
/// @endcond
@@ -1727,7 +1730,7 @@ typedef enum ur_device_info_t {
1727
1730
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
1728
1731
/// + `NULL == hDevice`
1729
1732
/// - ::UR_RESULT_ERROR_INVALID_ENUMERATION
1730
- /// + `::UR_DEVICE_INFO_ENQUEUE_NATIVE_COMMAND_SUPPORT_EXP < propName`
1733
+ /// + `::UR_DEVICE_INFO_LOW_POWER_EVENTS_EXP < propName`
1731
1734
/// - ::UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION
1732
1735
/// + If `propName` is not supported by the adapter.
1733
1736
/// - ::UR_RESULT_ERROR_INVALID_SIZE
@@ -5447,13 +5450,17 @@ typedef enum ur_queue_flag_t {
5447
5450
///< ignore this flag.
5448
5451
UR_QUEUE_FLAG_SYNC_WITH_DEFAULT_STREAM = UR_BIT(10), ///< Synchronize with the default stream. Only meaningful for CUDA. Other
5449
5452
///< 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.
5450
5457
/// @cond
5451
5458
UR_QUEUE_FLAG_FORCE_UINT32 = 0x7fffffff
5452
5459
/// @endcond
5453
5460
5454
5461
} ur_queue_flag_t;
5455
5462
/// @brief Bit Mask for validating ur_queue_flags_t
5456
- #define UR_QUEUE_FLAGS_MASK 0xfffff800
5463
+ #define UR_QUEUE_FLAGS_MASK 0xfffff000
5457
5464
5458
5465
///////////////////////////////////////////////////////////////////////////////
5459
5466
/// @brief Query information about a command queue
@@ -9974,6 +9981,89 @@ urUsmP2PPeerAccessGetInfoExp(
9974
9981
size_t *pPropSizeRet ///< [out][optional] pointer to the actual size in bytes of the queried propName.
9975
9982
);
9976
9983
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
+
9977
10067
#if !defined(__GNUC__)
9978
10068
#pragma endregion
9979
10069
#endif
@@ -11450,6 +11540,18 @@ typedef struct ur_enqueue_kernel_launch_custom_exp_params_t {
11450
11540
ur_event_handle_t **pphEvent;
11451
11541
} ur_enqueue_kernel_launch_custom_exp_params_t;
11452
11542
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
+
11453
11555
///////////////////////////////////////////////////////////////////////////////
11454
11556
/// @brief Function parameters for urEnqueueCooperativeKernelLaunchExp
11455
11557
/// @details Each entry is a pointer to the parameter passed to the function;
0 commit comments