Commit fc67f5c
committed
[SYCL] Fix handling of discarded events in preview lib
The queue implementation assumed that handler.finalize()
will return either a valid (non-discarded) event or nullptr
(that's why parseEvent is nop in preview mode).
However, that was not always true. It was possible for
scheduler to only mark an event as discarded after
handler.finalize() completed (during actual command
execution). This resulted in discarded event being
stored in LastEventPtr in the queue and calls to wait()
on that discarded event (which is not allowed) in MT
scenarios.
Fix this, by modyfing addCG() to mark the event as
discarded immediately and to return nullptr is the
event is discarded.1 parent 3b13547 commit fc67f5c
File tree
3 files changed
+21
-14
lines changed- sycl/source
- detail/scheduler
3 files changed
+21
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3132 | 3132 | | |
3133 | 3133 | | |
3134 | 3134 | | |
3135 | | - | |
3136 | | - | |
3137 | | - | |
3138 | | - | |
3139 | | - | |
3140 | | - | |
3141 | | - | |
3142 | 3135 | | |
3143 | | - | |
3144 | | - | |
| 3136 | + | |
| 3137 | + | |
3145 | 3138 | | |
3146 | 3139 | | |
3147 | | - | |
| 3140 | + | |
| 3141 | + | |
| 3142 | + | |
| 3143 | + | |
3148 | 3144 | | |
3149 | | - | |
3150 | | - | |
| 3145 | + | |
3151 | 3146 | | |
3152 | 3147 | | |
3153 | 3148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
136 | 139 | | |
137 | 140 | | |
138 | 141 | | |
139 | 142 | | |
140 | 143 | | |
141 | 144 | | |
142 | 145 | | |
143 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
144 | 152 | | |
145 | 153 | | |
146 | 154 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
895 | 895 | | |
896 | 896 | | |
897 | 897 | | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
898 | 902 | | |
899 | | - | |
| 903 | + | |
900 | 904 | | |
901 | 905 | | |
902 | 906 | | |
| |||
0 commit comments