Skip to content

Commit a845355

Browse files
committed
check if not discarded
Signed-off-by: smaslov <sergey.v.maslov@intel.com>
1 parent 9110191 commit a845355

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sycl/plugins/level_zero/pi_level_zero.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5758,7 +5758,7 @@ pi_result piEnqueueEventsWaitWithBarrier(pi_queue Queue,
57585758
// For in-order queue and empty wait-list just use the last command
57595759
// event as the barrier event.
57605760
if (Queue->isInOrderQueue() && !EventWaitList.Length &&
5761-
Queue->LastCommandEvent) {
5761+
Queue->LastCommandEvent && !Queue->LastCommandEvent->IsDiscarded) {
57625762
PI_CALL(piEventRetain(Queue->LastCommandEvent));
57635763
Event = Queue->LastCommandEvent;
57645764
return PI_SUCCESS;

0 commit comments

Comments
 (0)