.. _experimental-low-power-events: ================================================================================ Low Power Events ================================================================================ .. warning:: Experimental features: * May be replaced, updated, or removed at any time. * Do not require maintaining API/ABI stability of their own additions over time. * Do not require conformance testing of their own additions. Motivation -------------------------------------------------------------------------------- By default, level-zero uses busy polling for waiting on event completion when performing host-based synchronization through APIs such as `:ref:`urQueueFinish`\`. This provides the lowest possible latency for the calling thread, but it may lead to increased CPU utilization. This extension introduces a new hint flag for `:ref:`urQueueCreate`\`, allowing users to indicate to the runtime that they are willing to sacrifice event completion latency in order to reduce CPU utilization. This may be implemented using interrupt-driven event completion, where the calling thread yields until woken up by the driver. For applications that want to selectively choose which events should utilize the low-power mode, this extension also adds a new `:ref:`urEnqueueEventsWaitWithBarrierExt`\` function. This enqueue method can be used with an analogous property flag that may cause its output event to be low-power. This barrier is meant to be used on a regular event just before calling synchronization APIs (such as `:ref:`urQueueFinish`\`) to introduce a low-power event. API -------------------------------------------------------------------------------- Enums ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * :ref:`ur-device-info-t` * :ref:`UR_DEVICE_INFO_LOW_POWER_EVENTS_EXP ` * :ref:`ur-queue-flags-t` * :ref:`UR_QUEUE_FLAG_LOW_POWER_EVENTS_EXP ` * :ref:`ur-exp-enqueue-ext-flags-t` * :ref:`UR_EXP_ENQUEUE_EXT_FLAG_LOW_POWER_EVENTS ` * :ref:`ur-structure-type-t` * {X}_STRUCTURE_TYPE_EXP_ENQUEUE_EXT_PROPERTIES Types ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :ref:`ur-exp-enqueue-ext-properties-t` Functions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * :ref:`urEnqueueEventsWaitWithBarrierExt` Changelog -------------------------------------------------------------------------------- +-----------+---------------------------+ | Revision | Changes | +===========+===========================+ | 1.0 | Initial Draft | +-----------+---------------------------+ Support -------------------------------------------------------------------------------- Adapters which support this experimental feature *must* return true for the new ``:ref:`UR_DEVICE_INFO_LOW_POWER_EVENTS_EXP `\`` device info query. Contributors -------------------------------------------------------------------------------- * Piotr Balcer `piotr.balcer@intel.com `_