From 16a56b2dddbfaf2d4b81d62be5e3139f12783ac8 Mon Sep 17 00:00:00 2001 From: Mehdi Goli Date: Thu, 27 Jun 2019 12:25:09 +0100 Subject: [SYCL] This PR adds the minimum modifications to Eigen core required to run Eigen unsupported modules on devices supporting SYCL. * Adding SYCL memory model * Enabling/Disabling SYCL backend in Core * Supporting Vectorization --- Eigen/Core | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'Eigen/Core') diff --git a/Eigen/Core b/Eigen/Core index 759b1bb80..af741a241 100644 --- a/Eigen/Core +++ b/Eigen/Core @@ -101,13 +101,23 @@ #include #endif -#if defined(__SYCL_DEVICE_ONLY__) +#if defined(EIGEN_USE_SYCL) #undef min #undef max #undef isnan #undef isinf #undef isfinite #include + #include + #include + #include + #include + #ifndef EIGEN_SYCL_LOCAL_THREAD_DIM0 + #define EIGEN_SYCL_LOCAL_THREAD_DIM0 16 + #endif + #ifndef EIGEN_SYCL_LOCAL_THREAD_DIM1 + #define EIGEN_SYCL_LOCAL_THREAD_DIM1 16 + #endif #endif @@ -207,12 +217,15 @@ using std::ptrdiff_t; #include "src/Core/arch/GPU/MathFunctions.h" #endif -#if defined EIGEN_VECTORIZE_SYCL +#if defined(EIGEN_USE_SYCL) + #include "src/Core/arch/SYCL/SyclMemoryModel.h" #include "src/Core/arch/SYCL/InteropHeaders.h" +#if !defined(EIGEN_DONT_VECTORIZE_SYCL) #include "src/Core/arch/SYCL/PacketMath.h" #include "src/Core/arch/SYCL/MathFunctions.h" #include "src/Core/arch/SYCL/TypeCasting.h" #endif +#endif #include "src/Core/arch/Default/Settings.h" #include "src/Core/functors/TernaryFunctors.h" -- cgit v1.2.3