Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYCL][E2E] Re-enable interop_all_backends.cpp test #15767

Merged
merged 11 commits into from
Oct 25, 2024
12 changes: 7 additions & 5 deletions sycl/test-e2e/Basic/interop/interop_all_backends.cpp
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
// REQUIRES: CUDA || HIP
// 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
// RUN: %if any-device-is-opencl %{ %{build} -o %t-opencl.out %}
// RUN: %if any-device-is-level_zero %{ %{build} -DBUILD_FOR_L0 -o %t-l0.out %}
// RUN: %if any-device-is-cuda %{ %{build} -DBUILD_FOR_CUDA -o %t-cuda.out %}
// RUN: %if any-device-is-hip %{ %{build} -DBUILD_FOR_HIP -o %t-hip.out %}

#include <sycl/backend.hpp>
#include <sycl/detail/core.hpp>
#include <sycl/properties/all_properties.hpp>
#include <sycl/usm.hpp>
using namespace sycl;

#ifdef SYCL_EXT_ONEAPI_BACKEND_CUDA_EXPERIMENTAL
#ifdef BUILD_FOR_CUDA
#include <sycl/ext/oneapi/experimental/backend/cuda.hpp>
constexpr auto BACKEND = backend::ext_oneapi_cuda;
using nativeDevice = CUdevice;
using nativeQueue = CUstream;
using nativeEvent = CUevent;
#elif defined(SYCL_EXT_ONEAPI_BACKEND_HIP)
#elif defined(BUILD_FOR_HIP)
#include <sycl/ext/oneapi/backend/hip.hpp>
constexpr auto BACKEND = backend::ext_oneapi_hip;
using nativeDevice = hipDevice_t;
using nativeQueue = hipStream_t;
using nativeEvent = hipEvent_t;
#elif defined(SYCL_EXT_ONEAPI_BACKEND_L0)
#elif defined(BUILD_FOR_L0)
constexpr auto BACKEND = backend::ext_oneapi_level_zero;
using nativeDevice = ze_device_handle_t;
using nativeQueue = ze_command_queue_handle_t;
Expand Down
Loading