Skip to content

Commit af443bb

Browse files
committed
fix the event provider call
1 parent 38da239 commit af443bb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

unified-runtime/source/adapters/level_zero/v2/event_provider_counter.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ std::unique_ptr<event_provider> createProvider(ur_platform_handle_t platform,
107107
return std::make_unique<provider_counter>(platform, context, queueType,
108108
device, flags);
109109
} catch (...) {
110-
// If counter-based events are not supported, fall back to normal events
111-
// Remove the counter flag as the normal provider doesn't support it
112-
event_flags_t normalFlags = flags & ~EVENT_FLAGS_COUNTER;
113-
return std::make_unique<provider_normal>(context, queueType, normalFlags);
110+
// If the new counter-based API (zexCounterBasedEventCreate2) is not
111+
// available, fall back to normal provider which support counter-based
112+
// events using the old API
113+
return std::make_unique<provider_normal>(context, queueType, flags);
114114
}
115115
}
116116

0 commit comments

Comments
 (0)