File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
sycl/test-e2e/AddressSanitizer/common Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 11// REQUIRES: linux, cpu || (gpu && level_zero)
22// RUN: %{build} %device_asan_flags -O2 -g -o %t
33// 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
56#include < sycl/usm.hpp>
67
78// / This test is used to check enabling/disabling memory overhead statistics
@@ -12,20 +13,26 @@ constexpr std::size_t group_size = 1;
1213
1314int main () {
1415 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);
1622
1723 Q.submit ([&](sycl::handler &cgh) {
1824 auto acc = sycl::local_accessor<int >(group_size, cgh);
1925 cgh.parallel_for <class MyKernel >(
2026 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 ()];
2228 });
2329 });
2430 Q.wait ();
2531 // CHECK-STATS: Stats
2632 // CHECK-NOT: Stats
2733
28- sycl::free (array, Q);
34+ sycl::free (array1, Q);
35+
2936 std::cout << " PASS" << std::endl;
3037 return 0 ;
3138}
You can’t perform that action at this time.
0 commit comments