From 00f32752f7d0b193c6788691c3cf0b76457a044d Mon Sep 17 00:00:00 2001 From: Mehdi Goli Date: Thu, 28 Nov 2019 10:08:54 +0000 Subject: [SYCL] Rebasing the SYCL support branch on top of the Einge upstream master branch. * Unifying all loadLocalTile from lhs and rhs to an extract_block function. * Adding get_tensor operation which was missing in TensorContractionMapper. * Adding the -D method missing from cmake for Disable_Skinny Contraction operation. * Wrapping all the indices in TensorScanSycl into Scan parameter struct. * Fixing typo in Device SYCL * Unifying load to private register for tall/skinny no shared * Unifying load to vector tile for tensor-vector/vector-tensor operation * Removing all the LHS/RHS class for extracting data from global * Removing Outputfunction from TensorContractionSkinnyNoshared. * Combining the local memory version of tall/skinny and normal tensor contraction into one kernel. * Combining the no-local memory version of tall/skinny and normal tensor contraction into one kernel. * Combining General Tensor-Vector and VectorTensor contraction into one kernel. * Making double buffering optional for Tensor contraction when local memory is version is used. * Modifying benchmark to accept custom Reduction Sizes * Disabling AVX optimization for SYCL backend on the host to allow SSE optimization to the host * Adding Test for SYCL * Modifying SYCL CMake --- .../CXX11/src/Tensor/TensorSyclExtractFunctors.h | 467 --------------------- 1 file changed, 467 deletions(-) delete mode 100644 unsupported/Eigen/CXX11/src/Tensor/TensorSyclExtractFunctors.h (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorSyclExtractFunctors.h') diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorSyclExtractFunctors.h b/unsupported/Eigen/CXX11/src/Tensor/TensorSyclExtractFunctors.h deleted file mode 100644 index 09407e53e..000000000 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorSyclExtractFunctors.h +++ /dev/null @@ -1,467 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Mehdi Goli Codeplay Software Ltd. -// Ralph Potter Codeplay Software Ltd. -// Luke Iwanski Codeplay Software Ltd. -// Contact: -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -/***************************************************************** - * TensorSyclextractFunctors.h - * - * \brief: - * Used to extract all the functors allocated to each node of the expression -*tree. - * -*****************************************************************/ - -#ifndef UNSUPPORTED_EIGEN_CXX11_SRC_TENSOR_TENSORSYCL_EXTRACT_FUNCTORS_HPP -#define UNSUPPORTED_EIGEN_CXX11_SRC_TENSOR_TENSORSYCL_EXTRACT_FUNCTORS_HPP - -namespace Eigen { -namespace TensorSycl { -namespace internal { -/// struct FunctorExtractor: This struct is used to extract the functors -/// constructed on -/// the host-side, to pack them and reuse them in reconstruction of the -/// expression on the device. -/// We have to do that as in Eigen the functors are not stateless so we cannot -/// re-instantiate them on the device. -/// We have to pass instantiated functors to the device. -// This struct is used for leafNode (TensorMap) and nodes behaving like leafNode (TensorForcedEval). -#define DEFALTACTION(Evaluator)\ -typedef typename Evaluator::Dimensions Dimensions;\ -const Dimensions m_dimensions;\ -EIGEN_STRONG_INLINE const Dimensions& dimensions() const { return m_dimensions; }\ -FunctorExtractor(const Evaluator& expr): m_dimensions(expr.dimensions()) {} - -template struct FunctorExtractor{ - DEFALTACTION(Evaluator) -}; - - -/// specialisation of the \ref FunctorExtractor struct when the node type does not require anything -///TensorConversionOp -#define SYCLEXTRFUNCCONVERSION(ExprNode, CVQual)\ -template \ -struct FunctorExtractor, Dev> > {\ - FunctorExtractor > subExpr;\ - FunctorExtractor(const TensorEvaluator, Dev>& expr)\ - : subExpr(expr.impl()) {}\ -}; - -SYCLEXTRFUNCCONVERSION(TensorConversionOp, const) -SYCLEXTRFUNCCONVERSION(TensorConversionOp, ) -#undef SYCLEXTRFUNCCONVERSION - -#define SYCLEXTRTENSORMAPFIXEDSIZE(CVQual)\ -template class MakePointer_, typename Dev>\ -struct FunctorExtractor< TensorEvaluator , Options_, MakePointer_> , Dev> >{\ -FunctorExtractor(const TensorEvaluator , Options_, MakePointer_> , Dev>& ){}\ -}; - -SYCLEXTRTENSORMAPFIXEDSIZE(const) -SYCLEXTRTENSORMAPFIXEDSIZE() -#undef SYCLEXTRTENSORMAPFIXEDSIZE - -/// specialisation of the \ref FunctorExtractor struct when the node type is -/// TensorCwiseNullaryOp, TensorCwiseUnaryOp, and TensorBroadcastingOp -#define SYCLEXTRFUNCUNARY(CVQual)\ -template