Skip to content

Commit

Permalink
Don't look for backend events for all events
Browse files Browse the repository at this point in the history
A host task without native events should not have getNativeVector called
  • Loading branch information
hdelan committed Feb 23, 2024
1 parent d50f23b commit 7edf14f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sycl/source/interop_handle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,11 @@ std::vector<pi_native_handle> interop_handle::getNativeEvents() const {
// entry points. We will maybe need a new host task entry point.
std::vector<pi_native_handle> RetEvents;
for (auto &DepEvent : MEvent->getWaitList()) {
auto NativeEvents = DepEvent->getNativeVector();
RetEvents.insert(RetEvents.end(), NativeEvents.begin(), NativeEvents.end());
if (DepEvent->backendSet()) {
auto NativeEvents = DepEvent->getNativeVector();
RetEvents.insert(RetEvents.end(), NativeEvents.begin(),
NativeEvents.end());
}
}
return RetEvents;
}
Expand Down

0 comments on commit 7edf14f

Please sign in to comment.