Skip to content

[SYCL] Apply Level Zero batching workaround more selectively #4304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 12, 2021
Merged
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
6 changes: 4 additions & 2 deletions sycl/source/detail/scheduler/commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,8 @@ bool UnMapMemObject::producesPiEvent() const {
// an event waitlist and Level Zero plugin attempts to batch these commands,
// so the execution of kernel B starts only on step 4. This workaround
// restores the old behavior in this case until this is resolved.
return MQueue->getPlugin().getBackend() != backend::level_zero;
return MQueue->getPlugin().getBackend() != backend::level_zero ||
MEvent->getHandleRef() != nullptr;
}

cl_int UnMapMemObject::enqueueImp() {
Expand Down Expand Up @@ -1202,7 +1203,8 @@ bool MemCpyCommand::producesPiEvent() const {
// so the execution of kernel B starts only on step 4. This workaround
// restores the old behavior in this case until this is resolved.
return MQueue->is_host() ||
MQueue->getPlugin().getBackend() != backend::level_zero;
MQueue->getPlugin().getBackend() != backend::level_zero ||
MEvent->getHandleRef() != nullptr;
}

cl_int MemCpyCommand::enqueueImp() {
Expand Down