77// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
88//
99// ===----------------------------------------------------------------------===//
10+ #include < ur_api.h>
11+ #include < ze_api.h>
12+
13+ #include " context.hpp"
14+ #include " event_provider.hpp"
1015#include " event_provider_counter.hpp"
11- #include " ../context.hpp"
16+ #include " loader/ze_loader.h"
17+
1218#include " ../device.hpp"
1319#include " ../platform.hpp"
14- #include " event_provider.hpp"
15- #include " loader/ze_loader.h"
16- #include " ur_api.h"
17- #include " ze_api.h"
1820
1921namespace v2 {
2022
@@ -27,7 +29,7 @@ provider_counter::provider_counter(ur_platform_handle_t platform,
2729 (void **)&this ->eventCreateFunc ));
2830 ZE2UR_CALL_THROWS (
2931 zelLoaderTranslateHandle,
30- (ZEL_HANDLE_CONTEXT, context->ZeContext , (void **)&translatedContext));
32+ (ZEL_HANDLE_CONTEXT, context->hContext , (void **)&translatedContext));
3133 ZE2UR_CALL_THROWS (
3234 zelLoaderTranslateHandle,
3335 (ZEL_HANDLE_DEVICE, device->ZeDevice , (void **)&translatedDevice));
@@ -52,9 +54,10 @@ event_allocation provider_counter::allocate() {
5254 freelist.pop_back ();
5355
5456 return {event_type::EVENT_COUNTER,
55- event_borrowed (event.release (), [this ](ze_event_handle_t handle) {
56- freelist.push_back (handle);
57- })};
57+ raii::cache_borrowed_event (event.release (),
58+ [this ](ze_event_handle_t handle) {
59+ freelist.push_back (handle);
60+ })};
5861}
5962
6063ur_device_handle_t provider_counter::device () { return urDevice; }
0 commit comments