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

Bijective function mapping for data layout transformation. Given two SLayout, SBijectiveLayout build and store the mapping rules, provides API to transform N-dimention tensor from the source indices (i0, i1, .., im) to the destination indices (j0, j1, .., jm). More...

#include <data_layout.h>

Inheritance diagram for tvm::tirx::SBijectiveLayout:
Collaboration diagram for tvm::tirx::SBijectiveLayout:

Public Member Functions

 SBijectiveLayout (ffi::UnsafeInit tag, ffi::ObjectPtr< SBijectiveLayoutNode > data)
 
 SBijectiveLayout (SLayout src_layout, SLayout dst_layout)
 The constructor.
 
ffi::Array< PrimExpr > ForwardShape (const ffi::Array< PrimExpr > &shape) const
 
ffi::Array< PrimExpr > BackwardShape (const ffi::Array< PrimExpr > &dst_shape) const
 
ffi::Array< PrimExpr > ForwardIndex (const ffi::Array< PrimExpr > &index) const
 
ffi::Array< PrimExpr > BackwardIndex (const ffi::Array< PrimExpr > &dst_index) const
 
 TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE (SBijectiveLayout, ffi::ObjectRef, SBijectiveLayoutNode)
 

Static Public Member Functions

static ffi::Optional< SBijectiveLayout > Create (SLayout src_layout, SLayout dst_layout)
 

Detailed Description

Bijective function mapping for data layout transformation. Given two SLayout, SBijectiveLayout build and store the mapping rules, provides API to transform N-dimention tensor from the source indices (i0, i1, .., im) to the destination indices (j0, j1, .., jm).

Constructor & Destructor Documentation

◆ SBijectiveLayout() [1/2]

tvm::tirx::SBijectiveLayout::SBijectiveLayout ( ffi::UnsafeInit  tag,
ffi::ObjectPtr< SBijectiveLayoutNode >  data 
)
inlineexplicit

◆ SBijectiveLayout() [2/2]

tvm::tirx::SBijectiveLayout::SBijectiveLayout ( SLayout  src_layout,
SLayout  dst_layout 
)

The constructor.

Parameters
src_layoutThe source layout
dst_layoutThe destination layout

Member Function Documentation

◆ BackwardIndex()

ffi::Array< PrimExpr > tvm::tirx::SBijectiveLayout::BackwardIndex ( const ffi::Array< PrimExpr > &  dst_index) const

◆ BackwardShape()

ffi::Array< PrimExpr > tvm::tirx::SBijectiveLayout::BackwardShape ( const ffi::Array< PrimExpr > &  dst_shape) const

◆ Create()

static ffi::Optional< SBijectiveLayout > tvm::tirx::SBijectiveLayout::Create ( SLayout  src_layout,
SLayout  dst_layout 
)
static

◆ ForwardIndex()

ffi::Array< PrimExpr > tvm::tirx::SBijectiveLayout::ForwardIndex ( const ffi::Array< PrimExpr > &  index) const

◆ ForwardShape()

ffi::Array< PrimExpr > tvm::tirx::SBijectiveLayout::ForwardShape ( const ffi::Array< PrimExpr > &  shape) const

◆ TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE()

tvm::tirx::SBijectiveLayout::TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE ( SBijectiveLayout  ,
ffi::ObjectRef  ,
SBijectiveLayoutNode   
)

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