File tree 2 files changed +2
-38
lines changed
source/adapters/level_zero
2 files changed +2
-38
lines changed Original file line number Diff line number Diff line change @@ -561,9 +561,6 @@ ur_context_handle_t_::getEventFromContextCache(ur_event_flags_t Flags,
561
561
ur_device_handle_t Device) {
562
562
std::scoped_lock<ur_mutex> Lock (EventCacheMutex);
563
563
auto Cache = getEventCache (Flags, Device);
564
- if (Flags & COUNTER_BASED) {
565
- Cache = getCounterBasedEventCache (Flags, Device);
566
- }
567
564
if (Cache->empty ())
568
565
return nullptr ;
569
566
@@ -593,13 +590,8 @@ void ur_context_handle_t_::addEventToContextCache(ur_event_handle_t Event) {
593
590
if (Event->isProfilingEnabled ())
594
591
Flags |= ENABLE_PROFILER;
595
592
596
- if (Event->CounterBasedEventsEnabled ) {
597
- auto Cache = getCounterBasedEventCache (Flags, Device);
598
- Cache->emplace_back (Event);
599
- } else {
600
- auto Cache = getEventCache (Flags, Device);
601
- Cache->emplace_back (Event);
602
- }
593
+ auto Cache = getEventCache (Flags, Device);
594
+ Cache->emplace_back (Event);
603
595
}
604
596
605
597
ur_result_t
Original file line number Diff line number Diff line change @@ -325,34 +325,6 @@ struct ur_context_handle_t_ : _ur_object {
325
325
}
326
326
}
327
327
};
328
- auto getCounterBasedEventCache (ur_event_flags_t Flags,
329
- ur_device_handle_t Device) {
330
- if (Flags & USING_IMM_CMDLIST) {
331
- if (Device) {
332
- auto EventCachesMap =
333
- (Flags & ENABLE_PROFILER)
334
- ? &EventCachesDeviceMap[CounterBasedImmediateProfilingCacheType]
335
- : &EventCachesDeviceMap[CounterBasedImmediateCacheType];
336
- return &EventCaches[(*EventCachesMap)[Device]];
337
- } else {
338
- return (Flags & ENABLE_PROFILER)
339
- ? &EventCaches[CounterBasedImmediateProfilingCacheType]
340
- : &EventCaches[CounterBasedImmediateCacheType];
341
- }
342
- } else {
343
- if (Device) {
344
- auto EventCachesMap =
345
- (Flags & ENABLE_PROFILER)
346
- ? &EventCachesDeviceMap[CounterBasedRegularProfilingCacheType]
347
- : &EventCachesDeviceMap[CounterBasedRegularCacheType];
348
- return &EventCaches[(*EventCachesMap)[Device]];
349
- } else {
350
- return (Flags & ENABLE_PROFILER)
351
- ? &EventCaches[CounterBasedRegularProfilingCacheType]
352
- : &EventCaches[CounterBasedRegularCacheType];
353
- }
354
- }
355
- }
356
328
};
357
329
358
330
// Helper function to release the context, a caller must lock the platform-level
You can’t perform that action at this time.
0 commit comments