File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change
1
+ // REQUIRES: level_zero
2
+ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
3
+ // RUN: env ZE_DEBUG=1 %GPU_RUN_PLACEHOLDER %t.out h 2> %t1.out; cat %t1.out %GPU_CHECK_PLACEHOLDER
4
+
5
+ #include < sycl/sycl.hpp>
6
+
7
+ int main () {
8
+ sycl::queue q;
9
+ auto *p1 = sycl::malloc_shared<float >(
10
+ 42 , q, {sycl::ext::oneapi::property::usm::device_read_only ()});
11
+ auto *p2 = sycl::malloc_shared<float >(42 , q);
12
+
13
+ // CHECK: zeMemAllocShared
14
+ // CHECK: {{zeCommandListAppendMemAdvise.*ZE_MEMORY_ADVICE_SET_READ_MOSTLY}}
15
+ // CHECK: {{zeCommandListAppendMemAdvise.*ZE_MEMORY_ADVICE_SET_PREFERRED_LOCATION*}}
16
+ // CHECK: zeMemAllocShared
17
+ // CHECK-NOT: MemAdvise
18
+
19
+ free (p2, q);
20
+ free (p1, q);
21
+ return 0 ;
22
+ }
You can’t perform that action at this time.
0 commit comments