Skip to content

Commit 9990d44

Browse files
authored
Merge pull request #1555 from pbalcer/fix-enqueue-wait-barrier
stop batching multiple CmdList execution when waiting for barriers
2 parents fb342f0 + 112089f commit 9990d44

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

source/adapters/level_zero/event.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,12 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueEventsWaitWithBarrier(
367367
IsInternal));
368368
}
369369

370+
// When executing command lists, allowing batching simply means storing
371+
// the CmdLists as the current open batch. That's not what we want here.
372+
// Moreover, the current implementation does not allow calling
373+
// executeCommandList after an earlier getAvailableCommandList returned some
374+
// other CmdList.
375+
OkToBatch = false;
370376
// Execute each command list so the barriers can be encountered.
371377
for (ur_command_list_ptr_t &CmdList : CmdLists)
372378
UR_CALL(Queue->executeCommandList(CmdList, false, OkToBatch));

0 commit comments

Comments
 (0)