|
tvm
|
#include <layout.h>
Public Member Functions | |
| virtual bool | CompatibleWithShape (const ffi::Array< PrimExpr > &shape) const =0 |
| Compatible with shape. More... | |
| virtual bool | VerifyWellFormed () const =0 |
| Verify if the layout is well-formed. More... | |
| virtual PrimExpr | GetSize (ffi::Optional< ffi::String > axis_name=std::nullopt) const =0 |
| Get the size of the layout (of some axis) More... | |
| virtual PrimExpr | GetSpan (ffi::Optional< ffi::String > axis_name=std::nullopt) const =0 |
| Get the span of the layout (of some axis) More... | |
| virtual ffi::Map< ffi::String, PrimExpr > | Apply (ffi::Array< PrimExpr > coord) const =0 |
| Apply layout on the input coordinate and get the mapped output. More... | |
| virtual ffi::Map< ffi::String, PrimExpr > | Apply (PrimExpr coord) const =0 |
| ffi::Map< ffi::String, PrimExpr > | Apply (const ffi::Array< PrimExpr > &coord, const ffi::Array< PrimExpr > &shape) const |
| virtual Layout | Canonicalize () const =0 |
| Turn the layout to canonical form. More... | |
| virtual Layout | Tile (const TileLayout &outer, const ffi::Array< PrimExpr > &outer_shape, const ffi::Array< PrimExpr > &inner_shape) const =0 |
| Tile the current layout with a given layout. More... | |
| virtual ffi::Optional< Layout > | Slice (const ffi::Array< PrimExpr > &shape, const Region ®ion) const =0 |
| Slice the layout with a given shape and region. More... | |
| virtual Layout | DirectSum (const TileLayout &left, const ffi::Array< PrimExpr > &left_shape, const ffi::Array< PrimExpr > &right_shape) const =0 |
| 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... | |
| virtual ffi::Optional< TileLayout > | IsTileInner (const Layout &tile_layout, const ffi::Array< PrimExpr > &tiled_shape, const ffi::Array< PrimExpr > &inner_shape) const =0 |
| Check if the layout is the inner layout of a tiled layout. More... | |
| virtual ffi::Optional< Layout > | IsTileOuter (const Layout &tile_layout, const ffi::Array< PrimExpr > &tiled_shape, const ffi::Array< PrimExpr > &outer_shape) const =0 |
| Check if the layout is the outer layout of a tiled layout. More... | |
| virtual ffi::Optional< TileLayout > | IsDirectSumRight (const Layout &sum_layout, const ffi::Array< PrimExpr > &interleaved_shape, const ffi::Array< PrimExpr > &right_shape) const =0 |
| 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... | |
| virtual ffi::Optional< Layout > | IsDirectSumLeft (const Layout &sum_layout, const ffi::Array< PrimExpr > &interleaved_shape, const ffi::Array< PrimExpr > &left_shape) const =0 |
| 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... | |
| TVM_FFI_DECLARE_OBJECT_INFO ("tirx.Layout", LayoutNode, ffi::Object) | |
Static Public Attributes | |
| static constexpr TVMFFISEqHashKind | _type_s_eq_hash_kind = kTVMFFISEqHashKindTreeNode |
| ffi::Map<ffi::String, PrimExpr> tvm::tirx::LayoutNode::Apply | ( | const ffi::Array< PrimExpr > & | coord, |
| const ffi::Array< PrimExpr > & | shape | ||
| ) | const |
|
pure virtual |
Apply layout on the input coordinate and get the mapped output.
Implemented in tvm::tirx::ComposeLayoutNode, tvm::tirx::SwizzleLayoutNode, and tvm::tirx::TileLayoutNode.
|
pure virtual |
Implemented in tvm::tirx::ComposeLayoutNode, tvm::tirx::SwizzleLayoutNode, and tvm::tirx::TileLayoutNode.
|
pure virtual |
Turn the layout to canonical form.
Implemented in tvm::tirx::ComposeLayoutNode, tvm::tirx::SwizzleLayoutNode, and tvm::tirx::TileLayoutNode.
|
pure virtual |
Compatible with shape.
Implemented in tvm::tirx::ComposeLayoutNode, tvm::tirx::SwizzleLayoutNode, and tvm::tirx::TileLayoutNode.
|
pure virtual |
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.
Implemented in tvm::tirx::ComposeLayoutNode, tvm::tirx::SwizzleLayoutNode, and tvm::tirx::TileLayoutNode.
|
pure virtual |
Get the size of the layout (of some axis)
Implemented in tvm::tirx::ComposeLayoutNode, tvm::tirx::SwizzleLayoutNode, and tvm::tirx::TileLayoutNode.
|
pure virtual |
Get the span of the layout (of some axis)
Implemented in tvm::tirx::ComposeLayoutNode, tvm::tirx::SwizzleLayoutNode, and tvm::tirx::TileLayoutNode.
|
pure virtual |
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 |
Implemented in tvm::tirx::ComposeLayoutNode, tvm::tirx::SwizzleLayoutNode, and tvm::tirx::TileLayoutNode.
|
pure virtual |
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 |
Implemented in tvm::tirx::ComposeLayoutNode, tvm::tirx::SwizzleLayoutNode, and tvm::tirx::TileLayoutNode.
|
pure virtual |
Check if the layout is the inner layout of a tiled layout.
| tile_layout | The tiled layout to check |
| tiled_shape | The shape of the tiled layout |
| inner_shape | The shape of the inner layout |
Implemented in tvm::tirx::ComposeLayoutNode, tvm::tirx::SwizzleLayoutNode, and tvm::tirx::TileLayoutNode.
|
pure virtual |
Check if the layout is the outer layout of a tiled layout.
| tile_layout | The tiled layout to check |
| tiled_shape | The shape of the tiled layout |
| outer_shape | The shape of the outer layout |
Implemented in tvm::tirx::ComposeLayoutNode, tvm::tirx::SwizzleLayoutNode, and tvm::tirx::TileLayoutNode.
|
pure virtual |
Slice the layout with a given shape and region.
Implemented in tvm::tirx::ComposeLayoutNode, tvm::tirx::SwizzleLayoutNode, and tvm::tirx::TileLayoutNode.
|
pure virtual |
Tile the current layout with a given layout.
Implemented in tvm::tirx::ComposeLayoutNode, tvm::tirx::SwizzleLayoutNode, and tvm::tirx::TileLayoutNode.
| tvm::tirx::LayoutNode::TVM_FFI_DECLARE_OBJECT_INFO | ( | "tirx.Layout" | , |
| LayoutNode | , | ||
| ffi::Object | |||
| ) |
|
pure virtual |
Verify if the layout is well-formed.
Implemented in tvm::tirx::ComposeLayoutNode, tvm::tirx::SwizzleLayoutNode, and tvm::tirx::TileLayoutNode.
|
staticconstexpr |