File tree 1 file changed +11
-4
lines changed
sycl/test-e2e/AddressSanitizer/common
1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 1
1
// REQUIRES: linux, cpu || (gpu && level_zero)
2
2
// RUN: %{build} %device_asan_flags -O2 -g -o %t
3
3
// RUN: %{run} %t 2>&1 | FileCheck %s
4
- // RUN: env UR_LAYER_ASAN_OPTIONS=print_stats:1 %{run} %t 2>&1 | FileCheck --check-prefixes CHECK-STATS %s
4
+ // RUN: env UR_LAYER_ASAN_OPTIONS="print_stats:1;quarantine_size_mb:1" %{run} %t 2>&1 | FileCheck --check-prefixes CHECK-STATS %s
5
+ // RUN: env UR_LAYER_ASAN_OPTIONS="print_stats:1;quarantine_size_mb:0" %{run} %t 2>&1 | FileCheck --check-prefixes CHECK-STATS %s
5
6
#include < sycl/usm.hpp>
6
7
7
8
// / This test is used to check enabling/disabling memory overhead statistics
@@ -12,20 +13,26 @@ constexpr std::size_t group_size = 1;
12
13
13
14
int main () {
14
15
sycl::queue Q;
15
- int *array = sycl::malloc_device<int >(1024 * 1024 , Q);
16
+ int *array1 = sycl::malloc_device<int >(10 * 1024 * 1024 , Q);
17
+ int *array2 = sycl::malloc_device<int >(10 * 1024 * 1024 , Q);
18
+ int *array3 = sycl::malloc_device<int >(10 * 1024 * 1024 , Q);
19
+
20
+ sycl::free (array2, Q);
21
+ sycl::free (array3, Q);
16
22
17
23
Q.submit ([&](sycl::handler &cgh) {
18
24
auto acc = sycl::local_accessor<int >(group_size, cgh);
19
25
cgh.parallel_for <class MyKernel >(
20
26
sycl::nd_range<1 >(N, group_size), [=](sycl::nd_item<1 > item) {
21
- array [item.get_global_id ()] = acc[item.get_local_id ()];
27
+ array1 [item.get_global_id ()] = acc[item.get_local_id ()];
22
28
});
23
29
});
24
30
Q.wait ();
25
31
// CHECK-STATS: Stats
26
32
// CHECK-NOT: Stats
27
33
28
- sycl::free (array, Q);
34
+ sycl::free (array1, Q);
35
+
29
36
std::cout << " PASS" << std::endl;
30
37
return 0 ;
31
38
}
You can’t perform that action at this time.
0 commit comments