/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-composable-kernel/checkouts/develop/include/ck/wrapper/utils/tensor_utils.hpp Source File#
tensor_utils.hpp
Go to the documentation of this file.
Definition: ck.hpp:267
Tensor wrapper that performs static and dynamic buffer logic. The tensor is based on a descriptor sto...
Definition: host_tensor.hpp:277
__host__ constexpr __device__ const Layout< Shape, UnrolledDescriptorType > & GetLayout() const
Definition: tensor.hpp:246
__host__ constexpr __device__ const auto & layout(const Tensor< BufferAddressSpace, ElementType, Shape, UnrolledDescriptorType > &tensor)
Get Tensor Layout.
Definition: tensor_utils.hpp:162
constexpr auto slice(const FromType from, const ToType to)
Get dim slice.
Definition: tensor_utils.hpp:245
__host__ constexpr __device__ auto depth(const Tensor< BufferAddressSpace, ElementType, Shape, UnrolledDescriptorType > &tensor)
Depth of Shape tuple.
Definition: tensor_utils.hpp:216
__host__ __device__ void clear(Tensor< BufferAddressSpace, ElementType, Shape, UnrolledDescriptorType > &tensor)
Clear tensor. (Only for Vpgr/Sgpr)
Definition: tensor_utils.hpp:144
__host__ constexpr __device__ auto size(const Tensor< BufferAddressSpace, ElementType, Shape, UnrolledDescriptorType > &tensor)
Product of tensor shape dims.
Definition: tensor_utils.hpp:180
__host__ constexpr __device__ auto rank(const Tensor< BufferAddressSpace, ElementType, Shape, UnrolledDescriptorType > &tensor)
Rank of Shape tuple.
Definition: tensor_utils.hpp:198
__host__ constexpr __device__ const auto & shape(const Tensor< BufferAddressSpace, ElementType, Shape, UnrolledDescriptorType > &tensor)
Get Tensor shape.
Definition: tensor_utils.hpp:232
AddressSpaceEnum MemoryTypeEnum
Memory type, allowed members:
Definition: tensor_utils.hpp:30
constexpr auto make_register_tensor(const Layout< Shape, UnrolledDescriptorType > &layout)
Make SGPR or VGPR tensor function.
Definition: tensor_utils.hpp:129
constexpr auto make_tensor(ElementType *pointer, const Layout< Shape, UnrolledDescriptorType > &layout)
Make tensor function.
Definition: tensor_utils.hpp:112