1
1
// REQUIRES: gpu, level_zero, level_zero_dev_kit
2
2
// L0 adapter incorrectly reports memory leaks because it doesn't take into
3
3
// account direct calls to L0 API.
4
- // UNSUPPORTED: ze_debug, level_zero_v2_adapter
4
+ // UNSUPPORTED: ze_debug
5
5
// RUN: %{build} %level_zero_options -o %t.out
6
6
// RUN: env SYCL_PI_LEVEL_ZERO_DISABLE_USM_ALLOCATOR=1 UR_L0_DEBUG=1 %{run} %t.out 2>&1 | FileCheck %s
7
7
17
17
18
18
// Keep ownership
19
19
// CHECK: zeMemFree
20
+ // CHECK: zeMemFree
20
21
21
22
// Account for zeMemFree used to query page sizes by the UMF (only affects v2 L0
22
23
// adapter)
31
32
32
33
// Transfer ownership
33
34
// CHECK: zeMemFree
34
- // CHECK: zeMemFree
35
-
36
- // No other calls to zeMemFree
37
- // CHECK-NOT: zeMemFree
35
+ // For v2 adapter, all calls (even from this test) are logged
36
+ // CHECK-OPT: zeMemFree
38
37
39
38
#include " interop-buffer-helpers.hpp"
40
39
#include < sycl/detail/core.hpp>
@@ -119,14 +118,6 @@ void test_copyback_and_free(
119
118
int main () {
120
119
#ifdef SYCL_EXT_ONEAPI_BACKEND_LEVEL_ZERO
121
120
try {
122
- // Initialize Level Zero driver is required if this test is linked
123
- // statically with Level Zero loader, the driver will not be init otherwise.
124
- ze_result_t result = zeInit (ZE_INIT_FLAG_GPU_ONLY);
125
- if (result != ZE_RESULT_SUCCESS) {
126
- std::cout << " zeInit failed\n " ;
127
- return 1 ;
128
- }
129
-
130
121
platform Plt{gpu_selector_v};
131
122
132
123
auto Devices = Plt.get_devices ();
@@ -136,6 +127,14 @@ int main() {
136
127
return 0 ;
137
128
}
138
129
130
+ // Initialize Level Zero driver is required if this test is linked
131
+ // statically with Level Zero loader, the driver will not be init otherwise.
132
+ ze_result_t result = zeInit (ZE_INIT_FLAG_GPU_ONLY);
133
+ if (result != ZE_RESULT_SUCCESS) {
134
+ std::cout << " zeInit failed\n " ;
135
+ return 1 ;
136
+ }
137
+
139
138
device Dev1 = Devices[0 ];
140
139
context Context1{Dev1};
141
140
queue Queue1{Context1, Dev1};
0 commit comments