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

Commit 5db23ae

Browse files
authored
[SYCL] Move CUDA program interop test from intel/llvm (#56)
1 parent d0423ad commit 5db23ae

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
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: %GPU_RUN_PLACEHOLDER %t.out
3+
// REQUIRES: cuda
4+
5+
#include <CL/sycl.hpp>
6+
#include <CL/sycl/backend/cuda.hpp>
7+
8+
int main() {
9+
sycl::queue Queue{sycl::default_selector{}};
10+
Queue.submit(
11+
[](sycl::handler &CGH) { CGH.single_task<class TestKernel>([] {}); });
12+
13+
sycl::program Prog{Queue.get_context()};
14+
Prog.build_with_kernel_type<class TestKernel>();
15+
16+
auto NativeProgram = Prog.get_native<sycl::backend::cuda>();
17+
18+
assert(NativeProgram != 0);
19+
20+
// TODO check program interop constructor, once it is available.
21+
22+
return 0;
23+
}

0 commit comments

Comments
 (0)