diff --git a/sycl/source/detail/scheduler/commands.cpp b/sycl/source/detail/scheduler/commands.cpp index 2e75f70d56cf9..2e0e28a3538f7 100644 --- a/sycl/source/detail/scheduler/commands.cpp +++ b/sycl/source/detail/scheduler/commands.cpp @@ -496,9 +496,14 @@ void Command::processDepEvent(EventImplPtr DepEvent, const DepDesc &Dep) { } // Do not add redundant event dependencies for in-order queues. - if (Dep.MDepCommand && Dep.MDepCommand->getWorkerQueue() == WorkerQueue && - WorkerQueue->has_property()) - return; + // TODO temporarily disabled with Level Zero since the enqueued operations + // that are implemented directly in the plugin (e.g. map/unmap) do not satisfy + // in-order queue requirements. + if (WorkerQueue->is_host() || + WorkerQueue->getPlugin().getBackend() != backend::level_zero) + if (Dep.MDepCommand && Dep.MDepCommand->getWorkerQueue() == WorkerQueue && + WorkerQueue->has_property()) + return; ContextImplPtr DepEventContext = DepEvent->getContextImpl(); // If contexts don't match we'll connect them using host task diff --git a/sycl/unittests/scheduler/InOrderQueueDeps.cpp b/sycl/unittests/scheduler/InOrderQueueDeps.cpp index cec7c1772852c..009fd8cf42c27 100644 --- a/sycl/unittests/scheduler/InOrderQueueDeps.cpp +++ b/sycl/unittests/scheduler/InOrderQueueDeps.cpp @@ -83,6 +83,13 @@ TEST_F(SchedulerTest, InOrderQueueDeps) { std::cout << "Not run due to host-only environment\n"; return; } + if (detail::getSyclObjImpl(Plt)->getPlugin().getBackend() == + backend::level_zero) { + std::cout << "Removal of redundant dependencies in in-order queues is " + "disabled for Level Zero until it is supported by the plugin" + << std::endl; + return; + } unittest::PiMock Mock{Plt}; Mock.redefine(redefinedMemBufferCreate);