Default-constructed event uses wrong backend.
Describe the bug Default-constructed event doesn't follow SYCL 2020 specification. Here is default constructor description from the table 33 (with my highlighting of relevant part):
"Constructs an event that is immediately ready. The event has no dependencies and no associated commands. Waiting on this event will return immediately and querying its status will return info::event_command_status::complete.
The event is constructed as though it was created from a default-constructed queue. Therefore, its backend is the same as the backend from the default device."
There is a corresponding check in SYCL-CTS: https://github.com/KhronosGroup/SYCL-CTS/blob/SYCL-2020/tests/event/event.cpp#L59-L62. This check fails when I run the test on the system with just two active devices: NVIDIA GPU and host.
SYCL-CTS/tests/event/event.cpp:50: FAILED:
CHECK( event.get_backend() == default_queue.get_backend() )
with expansion:
host == ext_oneapi_cuda
To Reproduce
git clone --recurse-submodules https://github.com/KhronosGroup/SYCL-CTS.git
cd SYCL-CTS
cmake -S . -B build -DSYCL_IMPLEMENTATION=DPCPP -DSYCL_CTS_EXCLUDE_TEST_CATEGORIES=ci/dpcpp.filter -DSYCL_CTS_ENABLE_DOUBLE_TESTS=OFF -DSYCL_CTS_ENABLE_HALF_TESTS=OFF -DSYCL_CTS_ENABLE_DEPRECATED_FEATURES_TESTS=OFF -DSYCL_CTS_ENABLE_OPENCL_INTEROP_TESTS=OFF -DDPCPP_INSTALL_DIR=<compiler-install-dir> -DDPCPP_TARGET_TRIPLES=nvptx64-nvidia-cuda
cmake --build ./build -t test_event
export SYCL_DEVICE_FILTER=ext_oneapi_cuda:gpu,host
./build/bin/test_event
Environment (please complete the following information):
- OS: Linux
- Target device and vendor: GeForce RTX 2060 0.0 [CUDA 11.0]
- DPC++ version: clang version 15.0.0 (https://github.com/intel/llvm.git ab0502149aa3eb107a1b7cce6ca496c9bc7341a1) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /iusers/aabader/llvm/build/bin Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9 Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9 Candidate multilib: .;@m64 Candidate multilib: 32;@m32 Candidate multilib: x32;@mx32 Selected multilib: .;@m64 Found CUDA installation: /usr/local/cuda, version 11.0