| AI Engine API User Guide (AIE-API) 2026.1

Loading...
Searching...
No Matches
aie::tensor_descriptor< Rank, T, Elems, Layout, Repr, ByteSteps > Class Template Reference

`#include <iterator.hpp>`

## Public Types
using | type = T
using | vector_type = detail::tensor_desc_type_t<T, Elems>

## Public Member Functions
constexpr | tensor_descriptor ()=default
constexpr | tensor_descriptor (const contiguous_dim &dim)
constexpr | tensor_descriptor (const std::array< tensor_dim, Rank > &dims)
constexpr | tensor_descriptor (const tensor_descriptor &other)

## Static Public Attributes
static constexpr unsigned | elems = Elems
static constexpr bool | has_innermost_sliding_dim
static constexpr unsigned | num_levels = std::tuple_size_v<Repr>

## Member Typedef Documentation

## ◆ type

template<unsigned Rank, typename T, unsigned Elems, data_layout Layout = data_layout::row_major, typename Repr = detail::default_repr_t<Rank>, bool ByteSteps = false>

using aie::tensor_descriptor< Rank, T, Elems, Layout, Repr, ByteSteps >::type = T

## ◆ vector_type

template<unsigned Rank, typename T, unsigned Elems, data_layout Layout = data_layout::row_major, typename Repr = detail::default_repr_t<Rank>, bool ByteSteps = false>

using aie::tensor_descriptor< Rank, T, Elems, Layout, Repr, ByteSteps >::vector_type = detail::tensor_desc_type_t<T, Elems>

## Constructor & Destructor Documentation

## ◆ tensor_descriptor() [1/4]

template<unsigned Rank, typename T, unsigned Elems, data_layout Layout = data_layout::row_major, typename Repr = detail::default_repr_t<Rank>, bool ByteSteps = false>

aie::tensor_descriptor< Rank, T, Elems, Layout, Repr, ByteSteps >::tensor_descriptor | ( |  | ) |
| constexpr default

## ◆ tensor_descriptor() [2/4]

template<unsigned Rank, typename T, unsigned Elems, data_layout Layout = data_layout::row_major, typename Repr = detail::default_repr_t<Rank>, bool ByteSteps = false>

aie::tensor_descriptor< Rank, T, Elems, Layout, Repr, ByteSteps >::tensor_descriptor | ( | const std::array< tensor_dim, Rank > & | dims | ) |
| inline explicit constexpr

## ◆ tensor_descriptor() [3/4]

template<unsigned Rank, typename T, unsigned Elems, data_layout Layout = data_layout::row_major, typename Repr = detail::default_repr_t<Rank>, bool ByteSteps = false>

aie::tensor_descriptor< Rank, T, Elems, Layout, Repr, ByteSteps >::tensor_descriptor | ( | const contiguous_dim & | dim | ) |
| inline explicit constexpr

## ◆ tensor_descriptor() [4/4]

template<unsigned Rank, typename T, unsigned Elems, data_layout Layout = data_layout::row_major, typename Repr = detail::default_repr_t<Rank>, bool ByteSteps = false>

aie::tensor_descriptor< Rank, T, Elems, Layout, Repr, ByteSteps >::tensor_descriptor | ( | const tensor_descriptor< Rank, T, Elems, Layout, Repr, ByteSteps > & | other | ) |
| inline constexpr

## Friends And Related Symbol Documentation

## ◆ detail::make_tensor_buffer_stream [1/2]

template<unsigned Rank, typename T, unsigned Elems, data_layout Layout = data_layout::row_major, typename Repr = detail::default_repr_t<Rank>, bool ByteSteps = false>
template<typename ResourceType, ResourceType Resource, tbs_mode Mode, bool Restrict, typename StreamType, typename MemType, typename Desc>

auto detail::make_tensor_buffer_stream | ( | StreamType * | stream_ptr,
|  | MemType * | mem_ptr,
|  | const Desc & | desc )
| friend

## ◆ detail::make_tensor_buffer_stream [2/2]

template<unsigned Rank, typename T, unsigned Elems, data_layout Layout = data_layout::row_major, typename Repr = detail::default_repr_t<Rank>, bool ByteSteps = false>
template<typename ResourceType, ResourceType Resource, tbs_mode Mode, bool Restrict, bool Unaligned, typename T2, typename Desc>

auto detail::make_tensor_buffer_stream | ( | T2 && | src,
|  | const Desc & | desc )
| friend

## ◆ make_restrict_tensor_buffer_stream

template<unsigned Rank, typename T, unsigned Elems, data_layout Layout = data_layout::row_major, typename Repr = detail::default_repr_t<Rank>, bool ByteSteps = false>
template<aie_dm_resource Resource, tbs_mode Mode, DecoratedElemBaseOrBlockType T2, typename TensorDescriptor>
requires (arch::is(arch::Gen2))

auto make_restrict_tensor_buffer_stream | ( | T2 * | base,
|  | const TensorDescriptor & | dims )
| friend

## ◆ make_tensor_buffer_stream [1/2]

template<unsigned Rank, typename T, unsigned Elems, data_layout Layout = data_layout::row_major, typename Repr = detail::default_repr_t<Rank>, bool ByteSteps = false>
template<aie_dm_resource Resource, tbs_mode Mode, DecoratedElemBaseOrBlockType T2, typename TensorDescriptor>
requires (arch::is(arch::Gen2))

auto make_tensor_buffer_stream | ( | const T2 * | base,
|  | const TensorDescriptor & | dims )
| friend

## ◆ make_tensor_buffer_stream [2/2]

template<unsigned Rank, typename T, unsigned Elems, data_layout Layout = data_layout::row_major, typename Repr = detail::default_repr_t<Rank>, bool ByteSteps = false>
template<aie_dm_resource Resource, tbs_mode Mode, DecoratedElemBaseOrBlockType T2, typename TensorDescriptor>
requires (arch::is(arch::Gen2))

auto make_tensor_buffer_stream | ( | T2 * | base,
|  | const TensorDescriptor & | dims )
| friend

## ◆ make_tensor_descriptor_from_native

template<unsigned Rank, typename T, unsigned Elems, data_layout Layout = data_layout::row_major, typename Repr = detail::default_repr_t<Rank>, bool ByteSteps = false>
template<typename T2, unsigned Elems2, data_layout Layout2, NativeDim... Args>
requires (arch::is(arch::Gen2))

auto make_tensor_descriptor_from_native | ( | Args &&... | args | ) |
| friend

Creates a tensor descriptor from native dim types (int, dim_2d, dim_3d) that is to be used to create a tensor buffer stream.

Template Parameters

  T | Type of the elements in the described tensor.
  Elems | Size of the vector used as part of the tensor descriptor.
  Layout | The memory order of the tensor.

Parameters

  args | A pack of native dim types which describe the multidimensional increments,

AIE hardware is limited to 3D addressing and therefore tensors of higher rank are partitioned into nested tensor buffer streams. The default partitioning for a rank N tensor is (N/3)x3D + 1x(N%3)D. For example, a 5D tensor buffer stream will be represented as an outer 3D tensor buffer stream with an inner 2D tensor buffer stream.

See also
  aie::dim_2d, aie::dim_3d

Template Parameters

  M | An aie::mask<N> type
  Layout | The memory order of the tensor.

Parameters

  args | A pack of native dim types which describe the multidimensional increments,

AIE hardware is limited to 3D addressing and therefore tensors of higher rank are partitioned into nested tensor buffer streams. The default partitioning for a rank N tensor is (N/3)x3D + 1x(N%3)D. For example, a 5D tensor buffer stream will be represented as an outer 3D tensor buffer stream with an inner 2D tensor buffer stream.

See also
  aie::dim_2d, aie::dim_3d

## ◆ make_tensor_descriptor_from_native_bytes

template<unsigned Rank, typename T, unsigned Elems, data_layout Layout = data_layout::row_major, typename Repr = detail::default_repr_t<Rank>, bool ByteSteps = false>
template<typename T2, unsigned Elems2, data_layout Layout2, NativeOrSlidingDim... Args>
requires (arch::is(arch::Gen2))

auto make_tensor_descriptor_from_native_bytes | ( | Args &&... | args | ) |
| friend

Creates a tensor descriptor from native dim types (int, dim_2d, dim_3d) that is to be used to create a tensor buffer stream.

Template Parameters

  T | Type of the elements in the described tensor.
  Elems | Size of the vector used as part of the tensor descriptor.
  Layout | The memory order of the tensor.

Parameters

  args | A pack of native dim types which describe the multidimensional increments, in units of bytes,

AIE hardware is limited to 3D addressing and therefore tensors of higher rank are partitioned into nested tensor buffer streams. The default partitioning for a rank N tensor is (N/3)x3D + 1x(N%3)D. For example, a 5D tensor buffer stream will be represented as an outer 3D tensor buffer stream with an inner 2D tensor buffer stream.

See also
  aie::dim_2d, aie::dim_3d

Template Parameters

  M | An aie::mask<N> type
  Layout | The memory order of the tensor.

Parameters

  args | A pack of native dim types which describe the multidimensional increments, in units of bytes,

AIE hardware is limited to 3D addressing and therefore tensors of higher rank are partitioned into nested tensor buffer streams. The default partitioning for a rank N tensor is (N/3)x3D + 1x(N%3)D. For example, a 5D tensor buffer stream will be represented as an outer 3D tensor buffer stream with an inner 2D tensor buffer stream.

See also
  aie::dim_2d, aie::dim_3d

## Member Data Documentation

## ◆ elems

template<unsigned Rank, typename T, unsigned Elems, data_layout Layout = data_layout::row_major, typename Repr = detail::default_repr_t<Rank>, bool ByteSteps = false>

unsigned aie::tensor_descriptor< Rank, T, Elems, Layout, Repr, ByteSteps >::elems = Elems
| static constexpr

## ◆ has_innermost_sliding_dim

template<unsigned Rank, typename T, unsigned Elems, data_layout Layout = data_layout::row_major, typename Repr = detail::default_repr_t<Rank>, bool ByteSteps = false>

bool aie::tensor_descriptor< Rank, T, Elems, Layout, Repr, ByteSteps >::has_innermost_sliding_dim
| static constexpr

Initial value:
= detail::utils::is_one_of_v<std::tuple_element_t<num_levels - 1, Repr>,
sliding_window_dim_1d, sliding_window_dim_2d, sliding_window_dim_3d>
aie::tensor_descriptor::num_levels
static constexpr unsigned num_levels
Definition iterator.hpp:1770
aie::sliding_window_dim_3d
detail::sliding_window_dim_3d sliding_window_dim_3d
Definition iterator.hpp:1741
aie::sliding_window_dim_1d
detail::sliding_window_dim_1d sliding_window_dim_1d
Definition iterator.hpp:1739
aie::sliding_window_dim_2d
detail::sliding_window_dim_2d sliding_window_dim_2d
Definition iterator.hpp:1740

## ◆ num_levels

template<unsigned Rank, typename T, unsigned Elems, data_layout Layout = data_layout::row_major, typename Repr = detail::default_repr_t<Rank>, bool ByteSteps = false>

unsigned aie::tensor_descriptor< Rank, T, Elems, Layout, Repr, ByteSteps >::num_levels = std::tuple_size_v<Repr>
| static constexpr

The documentation for this class was generated from the following file:

- iterator.hpp