![]() |
|
GeneralVectorTensor is a template class that provides Tensor -vector contraction operation, which is a special case of Tensor Tensor contraction. More...
#include <TensorContractionSycl.h>
Public Types | |
| typedef Eigen::TensorSycl::internal::Vectorise< OutScalar, Eigen::SyclDevice, Vectorizable >::PacketReturnType | PacketReturnType |
| typedef cl::sycl::accessor< OutScalar, 1, cl::sycl::access::mode::read_write, cl::sycl::access::target::local > | Scratch |
| typedef BlockProperties< is_lhs_vec ? false :true, is_lhs_vec ? false :true, Vectorizable, PacketReturnType > | VecBlockProperties |
Public Member Functions | |
| EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE | GeneralVectorTensor (Scratch scratch_, const VectorMapper vec_, const TensorMapper mat_, OutAccessor out_res_, const StorageIndex nonContractGroupSize_, const StorageIndex nonContractDim_, const StorageIndex contractDim_) |
| EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | operator() (cl::sycl::nd_item< 1 > itemID) const |
Static Public Member Functions | |
| template<bool is_internal_block, typename OutPtr > | |
| static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | compute_panel (const cl::sycl::nd_item< 1 > &itemID, const VectorMapper &vec, const TensorMapper &mat, OutScalar *local_output, OutPtr out_ptr, const StorageIndex nonContractGroupOffset, const StorageIndex linearLocalThreadId, StorageIndex contractDim, StorageIndex nonContractDim, StorageIndex contractId, StorageIndex nonContractId, StorageIndex globalContractDimOffset, StorageIndex globalNonContractDimOffset, StorageIndex outScratchIndex) |
| template<typename InputBlockProperties , bool is_internal_block, int CFactor, int GroupSize, typename Input , typename Local > | |
| static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | extract_block (const Input &inpt, Local *local_ptr, const StorageIndex &linearLocalThreadId, const StorageIndex &cOffset, const StorageIndex &C) |
Public Attributes | |
| Scratch | scratch |
| const VectorMapper | vec |
| const TensorMapper | mat |
| OutAccessor | out_res |
| const StorageIndex | nonContractGroupSize |
| const StorageIndex | nonContractDim |
| const StorageIndex | contractDim |
Static Public Attributes | |
| static EIGEN_CONSTEXPR int | PacketSize |
| static EIGEN_CONSTEXPR StorageIndex | OutScratchOffset |
GeneralVectorTensor is a template class that provides Tensor -vector contraction operation, which is a special case of Tensor Tensor contraction.
| OutScalar | determines the output scalar type |
| OutAccessor | determines the sycl accessor type for out put (please see the sycl-1.2.1 specification (https://www.khronos.org/registry/SYCL/specs/sycl-1.2.1.pdf) for accessor definition) |
| VectorMapper | determines the tensor contraction mapper for the vector input (can be lhs or rhs) |
| TensorMapper | determines the tensor contraction mapper for the tensor input (can be lhs or rhs) |
| StorageIndex | determines the StorageIndex Type |
| Properties | determines the Contraction Panel properties |
| KFactor | determines the number of elements in K dimension in a Tile |
| Vectorizable | determines whether or not the vectorization is enabled for the Eigen expression. |
| is_lhs_vec | determines whether lhs is a vector or rhs is a vector |
| IsFinal | determine if this is the final kernel. If so, the result will be written in a final output. Otherwise, the result of contraction will be written iin a temporary buffer. |
| scratch | determines the local memory containing the vector block for each work-group |
| vec | determines the vector input (tensor mapper) |
| mat | determines the tensor input (tensor mapper) |
| out_res | determines the output vector containing the contraction result |
| nonContractGroupSize | a logical number determining the number of work-group for non-contracting dimension |
| nonContractDim | determines the size of non contracting dimension for the flattened tensor |
| contractDim | determines the size of non contracting dimension for the flattened tensor |
| typedef Eigen::TensorSycl::internal::Vectorise<OutScalar, Eigen::SyclDevice, Vectorizable>::PacketReturnType Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::PacketReturnType |
| typedef cl::sycl::accessor<OutScalar, 1, cl::sycl::access::mode::read_write, cl::sycl::access::target::local> Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::Scratch |
| typedef BlockProperties<is_lhs_vec ? false : true, is_lhs_vec ? false : true, Vectorizable, PacketReturnType> Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::VecBlockProperties |
|
inline |
|
inlinestatic |
References Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::contractDim, EIGEN_UNROLL_LOOP, Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::extract_block(), i, j, Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::mat, Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::nonContractDim, Eigen::internal::pmadd(), res, and Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::vec.
|
inlinestatic |
References EIGEN_UNROLL_LOOP, i, Eigen::TensorSycl::internal::read(), and calibrate::val.
|
inline |
References Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::contractDim, EIGEN_SYCL_LOCAL_MEM_UNSET_OR_ON, Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::nonContractDim, Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::nonContractGroupSize, Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::out_res, Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::OutScratchOffset, Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::scratch, and Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::vec.
| const StorageIndex Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::contractDim |
Referenced by Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::compute_panel(), and Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::operator()().
| const TensorMapper Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::mat |
| const StorageIndex Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::nonContractDim |
Referenced by Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::compute_panel(), and Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::operator()().
| const StorageIndex Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::nonContractGroupSize |
| OutAccessor Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::out_res |
|
static |
|
static |
| Scratch Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::scratch |
| const VectorMapper Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::vec |
Referenced by Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::compute_panel(), and Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::operator()().