GeneralVectorTensor is a template class that provides Tensor -vector contraction operation, which is a special case of Tensor Tensor contraction.
More...
#include <TensorContractionSycl.h>
|
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) |
|
template<typename OutScalar, typename OutAccessor, typename VectorMapper, typename TensorMapper, typename StorageIndex, typename Properties, StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
struct Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >
GeneralVectorTensor is a template class that provides Tensor -vector contraction operation, which is a special case of Tensor Tensor contraction.
- Template Parameters
-
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. |
- Parameters
-
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 |
Definition at line 1019 of file TensorContractionSycl.h.
◆ PacketReturnType
template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
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 |
◆ Scratch
template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
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 |
◆ VecBlockProperties
template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
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 |
◆ GeneralVectorTensor()
template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::GeneralVectorTensor |
( |
Scratch |
scratch_, |
|
|
const VectorMapper |
vec_, |
|
|
const TensorMapper |
mat_, |
|
|
OutAccessor |
out_res_, |
|
|
const StorageIndex |
nonContractGroupSize_, |
|
|
const StorageIndex |
nonContractDim_, |
|
|
const StorageIndex |
contractDim_ |
|
) |
| |
|
inline |
◆ compute_panel()
template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
template<bool is_internal_block, typename OutPtr >
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::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 |
|
) |
| |
|
inlinestatic |
◆ extract_block()
template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
template<typename InputBlockProperties , bool is_internal_block, int CFactor, int GroupSize, typename Input , typename Local >
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::TensorSycl::internal::GeneralVectorTensor< OutScalar, OutAccessor, VectorMapper, TensorMapper, StorageIndex, Properties, KFactor, Vectorizable, is_lhs_vec, IsFinal >::extract_block |
( |
const Input & |
inpt, |
|
|
Local * |
local_ptr, |
|
|
const StorageIndex & |
linearLocalThreadId, |
|
|
const StorageIndex & |
cOffset, |
|
|
const StorageIndex & |
C |
|
) |
| |
|
inlinestatic |
◆ operator()()
template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
◆ contractDim
template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
◆ mat
template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
◆ nonContractDim
template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
◆ nonContractGroupSize
template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
◆ out_res
template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
◆ OutScratchOffset
template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
Initial value:=
KFactor * Properties::LocalThreadSizeC * Properties::LocalThreadSizeNC
Definition at line 1026 of file TensorContractionSycl.h.
◆ PacketSize
template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
Initial value:=
Eigen::TensorSycl::internal::Vectorise<OutScalar, Eigen::SyclDevice, Vectorizable>::PacketSize
Definition at line 1022 of file TensorContractionSycl.h.
◆ scratch
template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
◆ vec
template<typename OutScalar , typename OutAccessor , typename VectorMapper , typename TensorMapper , typename StorageIndex , typename Properties , StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>
The documentation for this struct was generated from the following file: