Skip to content

Commit e25ada9

Browse files
authored
Merge pull request #1545 from lbushi25/lbushi/flushQueue
Implement Queue Flush operation
2 parents b14af4b + d367bd7 commit e25ada9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

source/adapters/level_zero/queue.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -902,10 +902,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urQueueFinish(
902902
UR_APIEXPORT ur_result_t UR_APICALL urQueueFlush(
903903
ur_queue_handle_t Queue ///< [in] handle of the queue to be flushed.
904904
) {
905-
// Flushing cross-queue dependencies is covered by
906-
// createAndRetainUrZeEventList, so this can be left as a no-op.
907-
std::ignore = Queue;
908-
return UR_RESULT_SUCCESS;
905+
std::scoped_lock<ur_shared_mutex> Lock(Queue->Mutex);
906+
return Queue->executeAllOpenCommandLists();
909907
}
910908

911909
// Configuration of the command-list batching.

0 commit comments

Comments
 (0)