tvm
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
tvm::tirx::TileLayout Class Reference

#include <layout.h>

Inheritance diagram for tvm::tirx::TileLayout:
Collaboration diagram for tvm::tirx::TileLayout:

Public Member Functions

 TileLayout (ffi::Array< Iter > shard, ffi::Array< Iter > replica, ffi::Map< Axis, PrimExpr > offset)
 
ffi::Array< PrimExpr > GetShardShape () const
 Get the shape of the shard.
 
TVM_TIRX_DLL bool IsContiguous (ffi::Optional< sym::Analyzer > analyzer=std::nullopt) const
 Whether the tile describes contiguous row-major memory strides.
 
bool IsTrivial () const
 Is the layout trivial (pure memory, identical mapping)
 
bool HasThreadAxis () const
 Has Thread Axis.
 
TVM_TIRX_DLL ffi::Optional< Tuple< ThreadScope, ThreadScope > > GetScope () const
 Get the scope pair of the layout.
 
 TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE (TileLayout, Layout, TileLayoutObj)
 
 TVM_DEFINE_OBJECT_REF_COW_METHOD (TileLayoutObj)
 
- Public Member Functions inherited from tvm::tirx::Layout
TVM_TIRX_DLL void CheckWellFormed () const
 Verify if the layout is well-formed.
 
TVM_TIRX_DLL PrimExpr GetSize (ffi::Optional< ffi::String > axis_name=std::nullopt) const
 Get the size of the layout (of some axis)
 
TVM_TIRX_DLL PrimExpr GetSpan (ffi::Optional< ffi::String > axis_name=std::nullopt) const
 Get the span of the layout (of some axis)
 
TVM_TIRX_DLL ffi::Map< ffi::String, PrimExpr > Apply (ffi::Array< PrimExpr > coord, sym::AnalyzerObj *analyzer) const
 Apply a layout using caller-owned analysis state.
 
TVM_TIRX_DLL ffi::Map< ffi::String, PrimExpr > Apply (PrimExpr coord, sym::AnalyzerObj *analyzer) const
 
TVM_TIRX_DLL ffi::Map< ffi::String, PrimExpr > Apply (const ffi::Array< PrimExpr > &coord, const ffi::Array< PrimExpr > &shape, sym::AnalyzerObj *analyzer) const
 
TVM_TIRX_DLL Layout Canonicalize () const
 Turn the layout to canonical form.
 
TVM_TIRX_DLL Layout Tile (const TileLayout &outer, const ffi::Array< PrimExpr > &outer_shape, const ffi::Array< PrimExpr > &inner_shape) const
 Tile the current layout with a given layout.
 
 TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE (Layout, ffi::ObjectRef, LayoutObj)
 

Static Public Member Functions

static TVM_TIRX_DLL TileLayout DefaultLayout (ffi::Array< PrimExpr > shape)
 Get the default layout for the shape.
 

Constructor & Destructor Documentation

◆ TileLayout()

tvm::tirx::TileLayout::TileLayout ( ffi::Array< Iter >  shard,
ffi::Array< Iter >  replica,
ffi::Map< Axis, PrimExpr >  offset 
)
inlineexplicit

Member Function Documentation

◆ DefaultLayout()

static TVM_TIRX_DLL TileLayout tvm::tirx::TileLayout::DefaultLayout ( ffi::Array< PrimExpr >  shape)
static

Get the default layout for the shape.

◆ GetScope()

TVM_TIRX_DLL ffi::Optional< Tuple< ThreadScope, ThreadScope > > tvm::tirx::TileLayout::GetScope ( ) const

Get the scope pair of the layout.

◆ GetShardShape()

ffi::Array< PrimExpr > tvm::tirx::TileLayout::GetShardShape ( ) const
inline

Get the shape of the shard.

◆ HasThreadAxis()

bool tvm::tirx::TileLayout::HasThreadAxis ( ) const
inline

Has Thread Axis.

◆ IsContiguous()

TVM_TIRX_DLL bool tvm::tirx::TileLayout::IsContiguous ( ffi::Optional< sym::Analyzer >  analyzer = std::nullopt) const

Whether the tile describes contiguous row-major memory strides.

Memory-axis origins do not affect this predicate. Replicas and non-memory axes are rejected; unit extents may have arbitrary strides. Deep equality is tried first, reusing the supplied analyzer or lazily creating one for proof.

◆ IsTrivial()

bool tvm::tirx::TileLayout::IsTrivial ( ) const
inline

Is the layout trivial (pure memory, identical mapping)

◆ TVM_DEFINE_OBJECT_REF_COW_METHOD()

tvm::tirx::TileLayout::TVM_DEFINE_OBJECT_REF_COW_METHOD ( TileLayoutObj  )

◆ TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE()

tvm::tirx::TileLayout::TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE ( TileLayout  ,
Layout  ,
TileLayoutObj   
)

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