Skip to content

Commit

Permalink
Adjust tests_config according to hetero_backend_config
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitriy Sobolev <dmitriy.sobolev@intel.com>
  • Loading branch information
dmitriy-sobolev committed Oct 18, 2024
1 parent f59ae82 commit 7aeff34
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions test/support/test_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,25 +91,13 @@
// If DPCPP is requested, enable its testing
#if ONEDPL_USE_DPCPP_BACKEND
# define TEST_DPCPP_BACKEND_PRESENT 1
#endif

// If DPCPP backend is not explicitly requested, repeat oneDPL behavior
// which enables DPCPP backend when SYCL is definitely available
#if (__has_include(<sycl/sycl.hpp>) || __has_include(<CL/sycl.hpp>))
# define TEST_SYCL_HEADER_PRESENT 1
#endif
#if defined(CL_SYCL_LANGUAGE_VERSION) || defined(SYCL_LANGUAGE_VERSION)
# define TEST_SYCL_LANGUAGE_VERSION_PRESENT 1
#endif
#if TEST_SYCL_HEADER_PRESENT && TEST_SYCL_LANGUAGE_VERSION_PRESENT
# define TEST_SYCL_AVAILABLE 1
#endif
#if !defined(ONEDPL_USE_DPCPP_BACKEND) && TEST_SYCL_AVAILABLE
# define TEST_DPCPP_BACKEND_PRESENT 1
#endif

#if !defined(TEST_DPCPP_BACKEND_PRESENT)
#elif !defined(ONEDPL_USE_DPCPP_BACKEND)
# define TEST_DPCPP_BACKEND_PRESENT 0
#else
// Hack: delayed expansion based on _ONEDPL_HETERO_BACKEND, defined in oneDPL
// TODO: avoid the hack by moving TEST_DPCPP_BACKEND_PRESENT into separate header and including after oneDPL headers
// this will require to update all tests to include the new header
# define TEST_DPCPP_BACKEND_PRESENT (_ONEDPL_HETERO_BACKEND)
#endif

#ifdef __SYCL_UNNAMED_LAMBDA__
Expand Down

0 comments on commit 7aeff34

Please sign in to comment.