|
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 (of some axis) More... | |
| PrimExpr | GetSpan (ffi::Optional< ffi::String > axis_name=std::nullopt) const final |
| Get the span of the layout (of some axis) 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::Array< PrimExpr > | GetShardShape () const |
| Get the shape of the shard. 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... | |
| bool | IsTrivial () const |
| Is the layout trivial (pure memory, identical mapping) More... | |
| bool | IsTrainium () const |
| Check if the layout is trainium layout. More... | |
| bool | HasMemoryAxis () const |
| Has Memory Axis. More... | |
| bool | HasThreadAxis () const |
| Has Thread Axis. More... | |
| ffi::Optional< Tuple< ExecScope, ExecScope > > | GetScope () const |
| Get the scope pair of the layout. More... | |
| TVM_FFI_DECLARE_OBJECT_INFO_FINAL ("tirx.TileLayout", TileLayoutNode, 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 () |
| static TileLayout | DefaultLayout (ffi::Array< PrimExpr > shape) |
| Get the default layout for the shape. More... | |
Public Attributes | |
| ffi::Array< Iter > | shard |
| ffi::Array< Iter > | replica |
| ffi::Map< Axis, PrimExpr > | offset |
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.
|
static |
Get the default layout for the shape.
|
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.
Get the scope pair of the layout.
| ffi::Array<PrimExpr> tvm::tirx::TileLayoutNode::GetShardShape | ( | ) | const |
Get the shape of the shard.
|
finalvirtual |
Get the size of the layout (of some axis)
Implements tvm::tirx::LayoutNode.
|
finalvirtual |
Get the span of the layout (of some axis)
Implements tvm::tirx::LayoutNode.
| bool tvm::tirx::TileLayoutNode::HasMemoryAxis | ( | ) | const |
Has Memory Axis.
| bool tvm::tirx::TileLayoutNode::HasThreadAxis | ( | ) | const |
Has Thread Axis.
|
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.
| bool tvm::tirx::TileLayoutNode::IsTrainium | ( | ) | const |
Check if the layout is trainium layout.
| bool tvm::tirx::TileLayoutNode::IsTrivial | ( | ) | const |
Is the layout trivial (pure memory, identical mapping)
|
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::TileLayoutNode::TVM_FFI_DECLARE_OBJECT_INFO_FINAL | ( | "tirx.TileLayout" | , |
| TileLayoutNode | , | ||
| LayoutNode | |||
| ) |
|
finalvirtual |
Verify if the layout is well-formed.
Implements tvm::tirx::LayoutNode.
| ffi::Array<Iter> tvm::tirx::TileLayoutNode::replica |
| ffi::Array<Iter> tvm::tirx::TileLayoutNode::shard |