Commit 731b967
authored
[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.1 parent 68bf5a0 commit 731b967
File tree
4 files changed
+59
-10
lines changed- sycl
- source/detail
- test-e2e
- Basic
- Regression
4 files changed
+59
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
351 | | - | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
352 | 355 | | |
353 | 356 | | |
354 | 357 | | |
| |||
367 | 370 | | |
368 | 371 | | |
369 | 372 | | |
370 | | - | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
371 | 377 | | |
372 | 378 | | |
373 | 379 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
| 489 | + | |
489 | 490 | | |
490 | 491 | | |
491 | 492 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| 18 | + | |
16 | 19 | | |
17 | | - | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
19 | | - | |
| 23 | + | |
20 | 24 | | |
21 | 25 | | |
22 | | - | |
| 26 | + | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
| |||
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
33 | 43 | | |
34 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
35 | 72 | | |
| 73 | + | |
36 | 74 | | |
37 | 75 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
27 | 31 | | |
0 commit comments