Skip to content

Commit 4284ad7

Browse files
Merge pull request #1966 from raiyanla/fix-profiling-values-in-order
[L0] Fix incorrect profiling values for in-order queue barriers
2 parents 3a0f984 + 103f5fb commit 4284ad7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

source/adapters/level_zero/event.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,9 @@ ur_queue_handle_legacy_t_::enqueueEventsWaitWithBarrier( ///< [in] handle of the
228228

229229
// For in-order queue and wait-list which is empty or has events from
230230
// the same queue just use the last command event as the barrier event.
231-
if (Queue->isInOrderQueue() &&
231+
// This optimization is disabled when profiling is enabled to ensure
232+
// accurate profiling values & the overhead that profiling incurs.
233+
if (Queue->isInOrderQueue() && !Queue->isProfilingEnabled() &&
232234
WaitListEmptyOrAllEventsFromSameQueue(Queue, NumEventsInWaitList,
233235
EventWaitList) &&
234236
Queue->LastCommandEvent && !Queue->LastCommandEvent->IsDiscarded) {

0 commit comments

Comments
 (0)