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
[SYCL] Record submit time for shortcut operations (#18455)
We record submission time for commands submitted via handler, but this
was missing for shortcut commands.
Also this PR changes the values returned by `command_submit`,
`command_start`, `command_end` for non-host events without UR event
handle - such events may appear if command is nop, for example, USM
operations for 0 bytes.
Such scenario is not explicitly specified in SYCL spec. Before changes,
we used to return 0 for all three quieries. But for consistency,I
believe it makes sense to return the same recorded submit time for all
three: `command_submit = command_start = command_end`. It seems more
convenient from user's perspective, for example if user submits sequence
set of commands and there is some nop command in the middle of sequence:
`command1`
`command2 (nop)`
`command3`
and user calculates wants to calculate differences between submission
time (or start time) of `command2` and `command1`, then he will get
negative value: `0 - submit_time_of_command2` (if we return `0`).
And there can be more nop operations (if SYCL runtime optimizes out
something), so if we return `0`, user always has to check if the
returned timestamp is 0 or not before using it in any calculations. So
returning non-zero submit time seems better.
0 commit comments