Skip to content

Commit b36c0ff

Browse files
committed
Relax "command_start" timestamp
Do not require "command_start" to be the same as "command_end".
1 parent e531214 commit b36c0ff

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

sycl/doc/extensions/proposed/sycl_ext_oneapi_record_event.asciidoc

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,19 +144,28 @@ The event's `info::event_profiling::command_submit` timestamp reflects the
144144
time at which `record_event` is called.
145145
The event's `info::event_profiling::command_end` timestamp reflects the time
146146
at which the event enters the "complete" state.
147-
The event's `info::event_profiling::command_start` timestamps is the same as
148-
the `info::event_profiling::command_end` timestamp.
147+
148+
It is unspecified whether the event ever has the
149+
`info::event_command_status::running` status, and the meaning of the
150+
`info::event_profiling::command_start` timestamp is also unspecified.
151+
Implementations are encouraged to transition the event directly from the
152+
"submitted" status to the "complete" status and are encouraged to set the
153+
"command_start" timestamp to the same value as the "command_end" timestamp.
149154

150155
_Throws:_ A synchronous `exception` with the `errc::invalid` error code if the
151156
queue was not constructed with the `property::queue::enable_profiling` property
152157
and if the queue's device does not have the aspect
153158
`ext_oneapi_queue_event_recording`.
154159

155-
[_Note:_ In order to understand why the "start" and "end" timestamps are the
156-
same, think of the barrier as an empty kernel with an implicit set of
157-
dependencies on all previous commands in the same queue.
160+
[_Note:_ In order to understand why the "command_start" and "command_end"
161+
timestamps are encouraged to be the same, think of the barrier as an empty
162+
kernel with an implicit set of dependencies on all previous commands in the
163+
same queue.
158164
This theoretical kernel starts executing when the dependencies are resolved.
159165
Since the kernel is empty, the end time is the same as the start time.
166+
The "command_start" and "command_end" timestamps are not required to be the
167+
same, though, in order to accommodate an implementation where the barrier is
168+
implemented by submitting an actual kernel, which has non-zero execution time.
160169
_{endnote}_]
161170
|====
162171

0 commit comments

Comments
 (0)