Skip to content

Commit 4d031a4

Browse files
[SYCL] Prevent unnecessary command batching in L0 plug-in (#5327)
This patch nullifies Queue->LastCommandEvent in Level Zero's piQueueFinish as it was in _pi_event::cleanup to prevent extra batching and performance drop.
1 parent fbab374 commit 4d031a4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sycl/plugins/level_zero/pi_level_zero.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3091,6 +3091,9 @@ pi_result piQueueFinish(pi_queue Queue) {
30913091
ZE_CALL(zeHostSynchronize, (Queue->ZeCopyCommandQueues[i]));
30923092
}
30933093

3094+
// Prevent unneeded already finished events to show up in the wait list.
3095+
Queue->LastCommandEvent = nullptr;
3096+
30943097
return PI_SUCCESS;
30953098
}
30963099

0 commit comments

Comments
 (0)