Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions sycl/source/detail/scheduler/commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<property::queue::in_order>())
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<property::queue::in_order>())
return;

ContextImplPtr DepEventContext = DepEvent->getContextImpl();
// If contexts don't match we'll connect them using host task
Expand Down
7 changes: 7 additions & 0 deletions sycl/unittests/scheduler/InOrderQueueDeps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<detail::PiApiKind::piMemBufferCreate>(redefinedMemBufferCreate);
Expand Down