File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -263,15 +263,14 @@ void queue_impl::wait(const detail::code_location &CodeLoc) {
263
263
WeakEvents.swap (MEventsWeak);
264
264
SharedEvents.swap (MEventsShared);
265
265
}
266
- const detail::plugin &Plugin = getPlugin ();
267
266
// If the queue is either a host one or does not support OOO (and we use
268
267
// multiple in-order queues as a result of that), wait for each event
269
268
// directly. Otherwise, only wait for unenqueued or host task events, starting
270
269
// from the latest submitted task in order to minimize total amount of calls,
271
270
// then handle the rest with piQueueFinish.
272
271
// TODO the new workflow has worse performance with Level Zero, keep the old
273
272
// behavior until this is addressed
274
- if (Plugin .getBackend () == backend::level_zero) {
273
+ if (! is_host () && getPlugin () .getBackend () == backend::level_zero) {
275
274
for (std::weak_ptr<event_impl> &EventImplWeakPtr : WeakEvents)
276
275
if (std::shared_ptr<event_impl> EventImplSharedPtr =
277
276
EventImplWeakPtr.lock ())
@@ -293,6 +292,7 @@ void queue_impl::wait(const detail::code_location &CodeLoc) {
293
292
}
294
293
}
295
294
if (SupportsPiFinish) {
295
+ const detail::plugin &Plugin = getPlugin ();
296
296
Plugin.call <detail::PiApiKind::piQueueFinish>(getHandleRef ());
297
297
for (std::weak_ptr<event_impl> &EventImplWeakPtr : WeakEvents)
298
298
if (std::shared_ptr<event_impl> EventImplSharedPtr =
You can’t perform that action at this time.
0 commit comments