Skip to content

Commit 6d04aa6

Browse files
authored
[SYCL] [L0] Fix for L0 Event object leakage. (#6454)
Signed-off-by: Rajiv Deodhar <rajiv.deodhar@intel.com>
1 parent e76ad72 commit 6d04aa6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sycl/plugins/level_zero/pi_level_zero.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3528,7 +3528,9 @@ pi_result piQueueRelease(pi_queue Queue) {
35283528
// For immediate commandlists we don't need to do an L0 reset of the
35293529
// commandlist but do need to do event cleanup which is also in the
35303530
// resetCommandList function.
3531-
if (it->second.ZeFence != nullptr && it->second.ZeFenceInUse) {
3531+
// If the fence is a nullptr we are using immediate commandlists,
3532+
// otherwise regular commandlists which use a fence.
3533+
if (it->second.ZeFence == nullptr || it->second.ZeFenceInUse) {
35323534
Queue->resetCommandList(it, true, EventListToCleanup);
35333535
}
35343536
// TODO: remove "if" when the problem is fixed in the level zero

0 commit comments

Comments
 (0)