|
tvm
|
#include <layout.h>
Public Member Functions | |
| bool | CompatibleWithShape (const ffi::Array< PrimExpr > &shape) const final |
| Check if the layout is compatible with the shape. More... | |
| bool | VerifyWellFormed () const final |
| Verify if the layout is well-formed. More... | |
| PrimExpr | GetSize (ffi::Optional< ffi::String > axis_name=std::nullopt) const final |
| Get the size of the layout. More... | |
| PrimExpr | GetSpan (ffi::Optional< ffi::String > axis_name=std::nullopt) const final |
| Get the span of the layout. More... | |
| ffi::Map< ffi::String, PrimExpr > | Apply (ffi::Array< PrimExpr > coord) const final |
| Apply the input coordinate and get the mapped output. More... | |
| ffi::Map< ffi::String, PrimExpr > | Apply (PrimExpr coord) const final |
| Layout | Canonicalize () const final |
| Turn the layout to canonical form. More... | |
| Layout | Tile (const TileLayout &outer, const ffi::Array< PrimExpr > &outer_shape, const ffi::Array< PrimExpr > &inner_shape) const final |
| Tile the layout with an outer layout. More... | |
| Layout | DirectSum (const TileLayout &left, const ffi::Array< PrimExpr > &left_shape, const ffi::Array< PrimExpr > &right_shape) const final |
| Direct-sum on the tiling domain (unscaled composition) Given left layout A (grouped by left_shape) and this layout B (grouped by right_shape), construct the interleaved-domain direct sum A + B without span scaling. More... | |
| ffi::Optional< TileLayout > | IsTileInner (const Layout &tile_layout, const ffi::Array< PrimExpr > &tiled_shape, const ffi::Array< PrimExpr > &inner_shape) const final |
| Check if the layout is the inner layout of a tiled layout. More... | |
| ffi::Optional< Layout > | IsTileOuter (const Layout &tile_layout, const ffi::Array< PrimExpr > &tiled_shape, const ffi::Array< PrimExpr > &outer_shape) const final |
| Check if the layout is the outer layout of a tiled layout. More... | |
| ffi::Optional< TileLayout > | IsDirectSumRight (const Layout &sum_layout, const ffi::Array< PrimExpr > &interleaved_shape, const ffi::Array< PrimExpr > &right_shape) const final |
| Check if this layout is the right addend B in a direct-sum A + B over the interleaved domain S_A \otimes S_B. If so, return the left layout A. More... | |
| ffi::Optional< Layout > | IsDirectSumLeft (const Layout &sum_layout, const ffi::Array< PrimExpr > &interleaved_shape, const ffi::Array< PrimExpr > &left_shape) const final |
| Check if this layout is the left addend A in a direct-sum A + B over the interleaved domain S_A \otimes S_B. If so, return the right layout B. More... | |
| ffi::Optional< Layout > | Slice (const ffi::Array< PrimExpr > &shape, const Region ®ion) const final |
| Slice the layout with a given shape and region. More... | |
| TVM_FFI_DECLARE_OBJECT_INFO_FINAL ("tirx.SwizzleLayout", SwizzleLayoutNode, LayoutNode) | |
Public Member Functions inherited from tvm::tirx::LayoutNode | |
| ffi::Map< ffi::String, PrimExpr > | Apply (const ffi::Array< PrimExpr > &coord, const ffi::Array< PrimExpr > &shape) const |
| TVM_FFI_DECLARE_OBJECT_INFO ("tirx.Layout", LayoutNode, ffi::Object) | |
Static Public Member Functions | |
| static void | RegisterReflection () |
Public Attributes | |
| int | per_element |
| int | swizzle_len |
| int | atom_len |
| bool | swizzle_inner |
Friends | |
| class | SwizzleLayout |
Additional Inherited Members | |
Static Public Attributes inherited from tvm::tirx::LayoutNode | |
| static constexpr TVMFFISEqHashKind | _type_s_eq_hash_kind = kTVMFFISEqHashKindTreeNode |
|
finalvirtual |
Apply the input coordinate and get the mapped output.
Implements tvm::tirx::LayoutNode.
|
finalvirtual |
Implements tvm::tirx::LayoutNode.
|
finalvirtual |
Turn the layout to canonical form.
Implements tvm::tirx::LayoutNode.
|
finalvirtual |
Check if the layout is compatible with the shape.
Implements tvm::tirx::LayoutNode.
|
finalvirtual |
Direct-sum on the tiling domain (unscaled composition) Given left layout A (grouped by left_shape) and this layout B (grouped by right_shape), construct the interleaved-domain direct sum A + B without span scaling.
Implements tvm::tirx::LayoutNode.
|
finalvirtual |
Get the size of the layout.
Implements tvm::tirx::LayoutNode.
|
finalvirtual |
Get the span of the layout.
Implements tvm::tirx::LayoutNode.
|
finalvirtual |
Check if this layout is the left addend A in a direct-sum A + B over the interleaved domain S_A \otimes S_B. If so, return the right layout B.
| sum_layout | The resulting direct-sum layout |
| interleaved_shape | The interleaved domain S_A \otimes S_B, i.e., [A0, B0, A1, B1, ...] |
| left_shape | The shape that groups this (left) layout |
Implements tvm::tirx::LayoutNode.
|
finalvirtual |
Check if this layout is the right addend B in a direct-sum A + B over the interleaved domain S_A \otimes S_B. If so, return the left layout A.
| sum_layout | The resulting direct-sum layout |
| interleaved_shape | The interleaved domain S_A \otimes S_B, i.e., [A0, B0, A1, B1, ...] |
| right_shape | The shape that groups this (right) layout |
Implements tvm::tirx::LayoutNode.
|
finalvirtual |
Check if the layout is the inner layout of a tiled layout.
Implements tvm::tirx::LayoutNode.
|
finalvirtual |
Check if the layout is the outer layout of a tiled layout.
Implements tvm::tirx::LayoutNode.
|
inlinestatic |
|
finalvirtual |
Slice the layout with a given shape and region.
Implements tvm::tirx::LayoutNode.
|
finalvirtual |
Tile the layout with an outer layout.
Implements tvm::tirx::LayoutNode.
| tvm::tirx::SwizzleLayoutNode::TVM_FFI_DECLARE_OBJECT_INFO_FINAL | ( | "tirx.SwizzleLayout" | , |
| SwizzleLayoutNode | , | ||
| LayoutNode | |||
| ) |
|
finalvirtual |
Verify if the layout is well-formed.
Implements tvm::tirx::LayoutNode.
|
friend |
| int tvm::tirx::SwizzleLayoutNode::atom_len |
| int tvm::tirx::SwizzleLayoutNode::per_element |
| bool tvm::tirx::SwizzleLayoutNode::swizzle_inner |
| int tvm::tirx::SwizzleLayoutNode::swizzle_len |