template<typename OutScalar, typename LhsScalar, typename RhsScalar, typename OutAccessor, typename LhsMapper, typename RhsMapper, typename StorageIndex, typename Properties, typename TripleDim, bool Vectorizable, typename input_mapper_properties, bool IsFinal, contraction_type contraction_tp>
class Eigen::TensorSycl::internal::TensorContractionKernel< OutScalar, LhsScalar, RhsScalar, OutAccessor, LhsMapper, RhsMapper, StorageIndex, Properties, TripleDim, Vectorizable, input_mapper_properties, IsFinal, contraction_tp >
TensorContractionKernel is a template class that provides Tensor -Tensor contraction operation.
- Template Parameters
-
| OutScalar | determines the output scalar type |
| LhsScalar | determines the left-hand-side scalar type |
| RhsScalar | determines the right-hand-side 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) |
| LhsMapper | determines the tensor contraction mapper type for left-hand-side matrix |
| RhsMapper | determines the tensor contraction mapper type for right-hand-side matrix |
| StorageIndex | determines the StorageIndex Type |
| Properties | determines the Contraction Panel properties |
| TripleDim | determines the M, K, N dimensions for the flatten tensors in order to treat them as a matrix |
| Vectorizable | determines whether or not the vectorization is enabled for the Eigen expression. |
| input_mapper_properties | : determine if the input tensors are matrix. If they are matrix, special memory access is used to guarantee that always the memory access are coalesced. |
| 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. This is the case when Tall/Skinny contraction is used. So in this case, a final reduction step is required to compute final output. |
| contraction_tp | it is an enum value representing whether the local memory/no local memory implementation of the algorithm to be used |
- Parameters
-
| scratch | local memory containing tiles of LHS and RHS tensors for each work-group |
| lhs | determines the left-hand-side flattened tensor (tensor mapper) |
| rhs | determines the right-hand-side flattened tensor (tensor mapper) |
| out_res | determines the output tensor containing the contraction result |
| groupSizeM | a logical number determining the number of work-group for m dimension |
| groupSizeN | a logical number determining the number of work-group for n dimension |
| numTiles | determines total number of tiles on the k dimension |
| TripleDim | determines the M, K, N dimensions for the flatten tensors in order to treat them as a matrix |