Commit 7202173
authored
[SYCL] Native event for default-ctored sycl::event has to be in COMPLETE state (#7148)
Per SYCL 2020 for event():
> Constructs an event that is immediately ready. The event has no
> dependencies and no associated commands. Waiting on this event will
> return immediately and querying its status will return
> info::event_command_status::complete.
Modify piEventCreate to create an event in such a state.
There is a more general problem that isn't addressed here:
auto e = q.submit(... h.host_task(...) ..)
This event would be a host one and we assert that no get_native could be
called on it (see existing sycl::detail::getImplBackend). If we will
ever want to support such scenario we'd need to implement some tracking
of host/backed events in the SYCL RT and keep updating the latter
whenever the host one changes the state.
Alternatively, SYCL spec could be updated to prohibit such scenario or
specify that such event has no native counterpart.1 parent 93d747f commit 7202173
File tree
3 files changed
+19
-5
lines changed- sycl
- include/sycl/detail
- plugins
- level_zero
- opencl
3 files changed
+19
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
55 | 56 | | |
56 | | - | |
57 | | - | |
| 57 | + | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
1397 | 1398 | | |
1398 | 1399 | | |
1399 | 1400 | | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
1400 | 1406 | | |
1401 | 1407 | | |
1402 | 1408 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5632 | 5632 | | |
5633 | 5633 | | |
5634 | 5634 | | |
5635 | | - | |
| 5635 | + | |
| 5636 | + | |
| 5637 | + | |
| 5638 | + | |
5636 | 5639 | | |
5637 | 5640 | | |
5638 | 5641 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
973 | 973 | | |
974 | 974 | | |
975 | 975 | | |
976 | | - | |
977 | | - | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
978 | 983 | | |
979 | 984 | | |
980 | 985 | | |
| |||
0 commit comments