tvm
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 (SLayout src_layout, SLayout dst_layout)
 The constructor. More...
 
ffi::Array< PrimExprForwardShape (const ffi::Array< PrimExpr > &shape) const
 
ffi::Array< PrimExprBackwardShape (const ffi::Array< PrimExpr > &dst_shape) const
 
ffi::Array< PrimExprForwardIndex (const ffi::Array< PrimExpr > &index) const
 
ffi::Array< PrimExprBackwardIndex (const ffi::Array< PrimExpr > &dst_index) const
 
 TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE (SBijectiveLayout, ffi::ObjectRef, SBijectiveLayoutNode)
 

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()

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

◆ 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_NULLABLE()

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

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