|
1 | | -// REQUIRES: CUDA || HIP |
2 | | -// RUN: %{build} %if hip %{ -DSYCL_EXT_ONEAPI_BACKEND_HIP %} %else %{ %if cuda %{ -DSYCL_EXT_ONEAPI_BACKEND_CUDA_EXPERIMENTAL %} %else %{ %if level_zero %{ -DSYCL_EXT_ONEAPI_BACKEND_L0 %} %} %} -o %t.out |
| 1 | +// XFAIL: any-device-is-opencl, any-device-is-cuda, (windows && any-device-is-level_zero) |
| 2 | +// XFAIL-TRACKER: https://github.com/intel/llvm/issues/15819 |
| 3 | +// RUN: %if any-device-is-opencl %{ %{build} -o %t-opencl.out %} |
| 4 | +// RUN: %if any-device-is-level_zero %{ %{build} -DBUILD_FOR_L0 -o %t-l0.out %} |
| 5 | +// RUN: %if any-device-is-cuda %{ %{build} -DBUILD_FOR_CUDA -o %t-cuda.out %} |
| 6 | +// RUN: %if any-device-is-hip %{ %{build} -DBUILD_FOR_HIP -o %t-hip.out %} |
3 | 7 |
|
4 | 8 | #include <sycl/backend.hpp> |
5 | 9 | #include <sycl/detail/core.hpp> |
6 | 10 | #include <sycl/properties/all_properties.hpp> |
7 | 11 | #include <sycl/usm.hpp> |
8 | 12 | using namespace sycl; |
9 | 13 |
|
10 | | -#ifdef SYCL_EXT_ONEAPI_BACKEND_CUDA_EXPERIMENTAL |
| 14 | +#ifdef BUILD_FOR_CUDA |
11 | 15 | #include <sycl/ext/oneapi/experimental/backend/cuda.hpp> |
12 | 16 | constexpr auto BACKEND = backend::ext_oneapi_cuda; |
13 | 17 | using nativeDevice = CUdevice; |
14 | 18 | using nativeQueue = CUstream; |
15 | 19 | using nativeEvent = CUevent; |
16 | | -#elif defined(SYCL_EXT_ONEAPI_BACKEND_HIP) |
| 20 | +#elif defined(BUILD_FOR_HIP) |
17 | 21 | #include <sycl/ext/oneapi/backend/hip.hpp> |
18 | 22 | constexpr auto BACKEND = backend::ext_oneapi_hip; |
19 | 23 | using nativeDevice = hipDevice_t; |
20 | 24 | using nativeQueue = hipStream_t; |
21 | 25 | using nativeEvent = hipEvent_t; |
22 | | -#elif defined(SYCL_EXT_ONEAPI_BACKEND_L0) |
| 26 | +#elif defined(BUILD_FOR_L0) |
23 | 27 | constexpr auto BACKEND = backend::ext_oneapi_level_zero; |
24 | 28 | using nativeDevice = ze_device_handle_t; |
25 | 29 | using nativeQueue = ze_command_queue_handle_t; |
|
0 commit comments