Skip to content

Commit 9e4c7e3

Browse files
[L0] Test with llvm/sycl e2e
Signed-off-by: Winston Zhang <winston.zhang@intel.com>
1 parent 6eb9eed commit 9e4c7e3

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

source/adapters/level_zero/context.hpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,10 @@ struct ur_context_handle_t_ : _ur_object {
147147
// head.
148148
//
149149
// Cache of event pools to which host-visible events are added to.
150-
std::vector<std::list<ze_event_pool_handle_t>> ZeEventPoolCache{12};
150+
std::vector<std::list<ze_event_pool_handle_t>> ZeEventPoolCache{
151+
ZeEventPoolCacheTypeCount * 2};
151152
std::vector<std::unordered_map<ze_device_handle_t, size_t>>
152-
ZeEventPoolCacheDeviceMap{12};
153+
ZeEventPoolCacheDeviceMap{ZeEventPoolCacheTypeCount * 2};
153154

154155
// This map will be used to determine if a pool is full or not
155156
// by storing number of empty slots available in the pool.
@@ -171,9 +172,9 @@ struct ur_context_handle_t_ : _ur_object {
171172

172173
// Caches for events.
173174
using EventCache = std::vector<std::list<ur_event_handle_t>>;
174-
EventCache EventCaches{6};
175+
EventCache EventCaches{EventCacheTypeCount};
175176
std::vector<std::unordered_map<ur_device_handle_t, size_t>>
176-
EventCachesDeviceMap{6};
177+
EventCachesDeviceMap{EventCacheTypeCount};
177178

178179
// Initialize the PI context.
179180
ur_result_t initialize();
@@ -223,7 +224,8 @@ struct ur_context_handle_t_ : _ur_object {
223224
HostVisibleCounterBasedRegularCacheType,
224225
HostInvisibleCounterBasedRegularCacheType,
225226
HostVisibleCounterBasedImmediateCacheType,
226-
HostInvisibleCounterBasedImmediateCacheType
227+
HostInvisibleCounterBasedImmediateCacheType,
228+
ZeEventPoolCacheTypeCount
227229
};
228230

229231
enum EventCacheType {
@@ -232,7 +234,8 @@ struct ur_context_handle_t_ : _ur_object {
232234
HostInvisibleProfilingCacheType,
233235
HostInvisibleRegularCacheType,
234236
CounterBasedImmediateCacheType,
235-
CounterBasedRegularCacheType
237+
CounterBasedRegularCacheType,
238+
EventCacheTypeCount
236239
};
237240

238241
std::list<ze_event_pool_handle_t> *

0 commit comments

Comments
 (0)