You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: level_zero/doc/experimental_extensions/COUNTER_BASED_EVENTS.md
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ SPDX-License-Identifier: MIT
11
11
*[Overview](#Overview)
12
12
*[Creation](#Creation)
13
13
*[External storage](#External-storage)
14
+
*[Aggregated event](#Aggregated-event)
14
15
*[Obtaining counter memory and value](#Obtaining-counter-memory-and-value)
15
16
*[IPC sharing](#IPC-sharing)
16
17
*[Regular command list](#Regular-command-list)
@@ -98,6 +99,19 @@ User may optionally specify externally managed counter allocation and value. Thi
98
99
- User is responsible for updating both memory locations to >= `completionValue` to signal Event completion
99
100
- Signaling such event, replaces the state (as described previously)
100
101
102
+
# Aggregated event
103
+
Aggregated event is a special use case for CB Events. It can be signaled from multiple append calls, but waiting requires only one memory compare operation.
104
+
It can be created by passing `zex_counter_based_event_external_storage_properties_t` as extension of `zex_counter_based_event_desc_t`.
105
+
106
+
**Requirements:**
107
+
- This extension cannot be used with "external storage" extension
108
+
- User must ensure device allocation (`deviceAddress`) residency. It must be accessible by GPU
109
+
- Driver will use `deviceAddress` for host synchronization as USM allocation. It must be accessible by CPU
110
+
- Signaling such event, will not replace its state (as described previously). It can be passed to multiple append calls and each append will increment the storage by `incrementValue` (atomically) on GPU
111
+
- Using aggregated event as dependency, requires only one memory compare operation against final value: `completionValue` >= `*deviceAddress`
112
+
- Device storage is under Users control. It may be reset manually if needed
113
+
- Profiling is not possible if producers originate on different GPUs (different timestamp domains)
114
+
101
115
# Obtaining counter memory and value
102
116
User may obtain counter memory location and value. For example, waiting for completion outside the L0 Driver.
103
117
If Event state is replaced by new append call or `zeCommandQueueExecuteCommandLists` that signals such Event, below API must be called again to obtain new data.
ze_structure_type_tstype; ///< [in] type of this structure
217
+
constvoid*pNext; ///< [in][optional] must be null or a pointer to an extension-specific
218
+
uint64_t*deviceAddress; ///< [in] device address that would be updated with atomic_add upon signaling of this event, must be device USM memory
219
+
uint64_tincrementValue; ///< [in] value which would by atomically added upon each completion
220
+
uint64_tcompletionValue; ///< [in] final completion value, when value under deviceAddress is equal or greater then this value then event is considered as completed
0 commit comments