Eigen moved the scanLauncehr function inside the internal namespace.

This commit applies the following changes:
    - Moving the `scamLauncher` specialization inside internal namespace to fix compiler crash on TensorScan for SYCL backend.
    - Replacing  `SYCL/sycl.hpp` to `CL/sycl.hpp` in order to follow SYCL 1.2.1 standard.
    - minor fixes: commenting out an unused variable to avoid compiler warnings.
This commit is contained in:
mehdi-goli 2020-05-11 16:10:33 +01:00
parent c1d944dd91
commit d3e81db6c5
4 changed files with 7 additions and 6 deletions

View File

@ -108,7 +108,7 @@
#undef isnan #undef isnan
#undef isinf #undef isinf
#undef isfinite #undef isfinite
#include <SYCL/sycl.hpp> #include <CL/sycl.hpp>
#include <map> #include <map>
#include <memory> #include <memory>
#include <utility> #include <utility>

View File

@ -1,6 +1,6 @@
#ifdef EIGEN_USE_SYCL #ifdef EIGEN_USE_SYCL
#include <SYCL/sycl.hpp> #include <CL/sycl.hpp>
#include <iostream> #include <iostream>
#include "tensor_benchmarks.h" #include "tensor_benchmarks.h"

View File

@ -564,7 +564,7 @@ struct TensorEvaluator<const TensorSlicingOp<StartIndices, Sizes, ArgType>, Devi
#ifdef EIGEN_USE_THREADS #ifdef EIGEN_USE_THREADS
template <typename EvalSubExprsCallback> template <typename EvalSubExprsCallback>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalSubExprsIfNeededAsync( EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalSubExprsIfNeededAsync(
EvaluatorPointerType data, EvalSubExprsCallback done) { EvaluatorPointerType /*data*/, EvalSubExprsCallback done) {
m_impl.evalSubExprsIfNeededAsync(nullptr, [done](bool) { done(true); }); m_impl.evalSubExprsIfNeededAsync(nullptr, [done](bool) { done(true); });
} }
#endif // EIGEN_USE_THREADS #endif // EIGEN_USE_THREADS

View File

@ -464,9 +464,9 @@ struct ScanLauncher_impl {
} // namespace internal } // namespace internal
} // namespace TensorSycl } // namespace TensorSycl
namespace internal {
template <typename Self, typename Reducer> template <typename Self, typename Reducer, bool vectorize>
struct ScanLauncher<Self, Reducer, Eigen::SyclDevice> { struct ScanLauncher<Self, Reducer, Eigen::SyclDevice, vectorize> {
typedef typename Self::Index Index; typedef typename Self::Index Index;
typedef typename Self::CoeffReturnType CoeffReturnType; typedef typename Self::CoeffReturnType CoeffReturnType;
typedef typename Self::Storage Storage; typedef typename Self::Storage Storage;
@ -507,6 +507,7 @@ struct ScanLauncher<Self, Reducer, Eigen::SyclDevice> {
inclusive, dev); inclusive, dev);
} }
}; };
} // namespace internal
} // namespace Eigen } // namespace Eigen
#endif // UNSUPPORTED_EIGEN_CXX11_SRC_TENSOR_TENSOR_SYCL_SYCL_HPP #endif // UNSUPPORTED_EIGEN_CXX11_SRC_TENSOR_TENSOR_SYCL_SYCL_HPP