Open
Description
Describe the bug
If a device is created via the interop API it will always create a new device_impl even when there already y exist a device_impl with the same backend handle. this issue is not limited to opencl or any device in particular.
To Reproduce
create a file named test.cpp containing
#include <sycl/sycl.hpp>
int main() {
sycl::device sdev(sycl::default_selector{});
auto ocl_dev = sycl::get_native<sycl::backend::opencl>(sdev);
sycl::device dev(sycl::make_device<sycl::backend::opencl>(ocl_dev));
assert(sdev == dev);
}
clang++ -fsycl -o a.out test_interop_opencl.cpp
clang++ being the sycl capable compiler
./a.out
this will hit the assert even thought (in my case the opencl implementation returned the same device handle)
Environment (please complete the following information):
- OS: Any
- Target device and vendor: Any
- DPC++ version: e25f199