Skip to content
Closed
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
4 changes: 3 additions & 1 deletion source/adapters/cuda/event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,9 @@ UR_APIEXPORT ur_result_t UR_APICALL urEventSetCallback(ur_event_handle_t,
UR_APIEXPORT ur_result_t UR_APICALL
urEventWait(uint32_t numEvents, const ur_event_handle_t *phEventWaitList) {
try {
ScopedContext Active(phEventWaitList[0]->getQueue()->getDevice());
// Interop events don't have an associated queue, so get device through
// context
ScopedContext Active(phEventWaitList[0]->getContext()->getDevices()[0]);

auto WaitFunc = [](ur_event_handle_t Event) -> ur_result_t {
UR_ASSERT(Event, UR_RESULT_ERROR_INVALID_EVENT);
Expand Down