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

[SYCL][CUDA] Check make_device doesn't create duplicate sycl::device. #1419

Open
wants to merge 2 commits into
base: intel
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions SYCL/Plugin/interop-cuda-experimental.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,13 @@ int main() {
CUDA_CHECK(cuDeviceGet(&cu_dev, 0));
auto sycl_dev = sycl::make_device<sycl::backend::ext_oneapi_cuda>(cu_dev);
auto native_dev = sycl::get_native<sycl::backend::ext_oneapi_cuda>(sycl_dev);
auto sycl_dev2 =
sycl::make_device<sycl::backend::ext_oneapi_cuda>(native_dev);

check_type<sycl::device>(sycl_dev);
check_type<CUdevice>(native_dev);
assert(native_dev == cu_dev);
assert(sycl_dev == sycl_dev2);

// Create sycl queue with new device and submit some work
{
Expand Down