Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit f0587be

Browse files
[SYCL] test for barrier submission: https://github.com/intel/llvm/pul… (#98)
Signed-off-by: Sergey V Maslov <[email protected]>
1 parent a1180cb commit f0587be

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

SYCL/Basic/submit_barrier.cpp

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
2+
// RUN: %HOST_RUN_PLACEHOLDER %t.out
3+
// RUN: %CPU_RUN_PLACEHOLDER %t.out
4+
// RUN: %GPU_RUN_PLACEHOLDER %t.out
5+
6+
// UNSUPPORTED: cuda
7+
8+
#include <CL/sycl.hpp>
9+
#include <stdlib.h>
10+
11+
int main() {
12+
13+
cl::sycl::device dev{cl::sycl::default_selector{}};
14+
cl::sycl::queue q{dev};
15+
16+
q.submit(
17+
[&](sycl::handler &cgh) { cgh.single_task<class kernel1>([]() {}); });
18+
19+
cl::sycl::event e = q.submit_barrier();
20+
e.wait_and_throw();
21+
22+
return 0;
23+
}

0 commit comments

Comments
 (0)