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

[SYCL] Move CUDA program interop test from intel/llvm #56

Merged
merged 1 commit into from
Nov 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions SYCL/Regression/cuda_program_interop.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out
// REQUIRES: cuda

#include <CL/sycl.hpp>
#include <CL/sycl/backend/cuda.hpp>

int main() {
sycl::queue Queue{sycl::default_selector{}};
Queue.submit(
[](sycl::handler &CGH) { CGH.single_task<class TestKernel>([] {}); });

sycl::program Prog{Queue.get_context()};
Prog.build_with_kernel_type<class TestKernel>();

auto NativeProgram = Prog.get_native<sycl::backend::cuda>();

assert(NativeProgram != 0);

// TODO check program interop constructor, once it is available.

return 0;
}