Skip to content

Commit a59ab69

Browse files
authored
[SYCL] Add tests for SYCL_RT_WARNING_LEVEL (intel/llvm-test-suite#753)
1 parent 0055992 commit a59ab69

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

SYCL/Basic/build_log.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// REQUIRES: opencl || level_zero, gpu
2+
// UNSUPPORTED: gpu-intel-dg1
3+
//
4+
// RUN: %clangxx -fsycl -fsycl-targets=spir64_gen -Xsycl-target-backend=spir64_gen "-device dg1" %s -o %t.out
5+
// RUN: %GPU_RUN_PLACEHOLDER env SYCL_RT_WARNING_LEVEL=2 %t.out 2>&1 %GPU_CHECK_PLACEHOLDER
6+
7+
#include <sycl/sycl.hpp>
8+
9+
int main() {
10+
sycl::queue Q{sycl::default_selector()};
11+
12+
auto *I = sycl::malloc_device<int>(1, Q);
13+
Q.single_task([=]() { I[0] = 42; });
14+
15+
sycl::free(I, Q);
16+
17+
return 0;
18+
}
19+
20+
// CHECK: The program was built for {{.*}} devices

0 commit comments

Comments
 (0)