Skip to content
Closed
Changes from 1 commit
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: 11 additions & 0 deletions source/adapters/level_zero/queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1338,6 +1338,17 @@ ur_queue_handle_t_::executeCommandList(ur_command_list_ptr_t CommandList,
}

if (!UsingImmCmdLists) {
int numCompleted = 0;
for (auto &Event : CommandList->second.EventList) {
if (Event->ZeEvent) {
ze_result_t ZeResult =
ZE_CALL_NOCHECK(zeEventQueryStatus, (Event->ZeEvent));
if (ZeResult == ZE_RESULT_SUCCESS)
numCompleted++;
}
}
if (numCompleted == CommandList->second.EventList.size())
return UR_RESULT_SUCCESS;
// In this mode all inner-batch events have device visibility only,
// and we want the last command in the batch to signal a host-visible
// event that anybody waiting for any event in the batch will
Expand Down
Loading