tvm
Public Member Functions | List of all members
tvm::tir::BijectiveLayout Class Reference

Bijective function mapping for data layout transformation. Given two Layout, BijectiveLayout 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::tir::BijectiveLayout:
Collaboration diagram for tvm::tir::BijectiveLayout:

Public Member Functions

 BijectiveLayout (Layout src_layout, Layout 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 (BijectiveLayout, ObjectRef, BijectiveLayoutNode)
 

Detailed Description

Bijective function mapping for data layout transformation. Given two Layout, BijectiveLayout 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

◆ BijectiveLayout()

tvm::tir::BijectiveLayout::BijectiveLayout ( Layout  src_layout,
Layout  dst_layout 
)

The constructor.

Parameters
src_layoutThe source layout
dst_layoutThe destination layout

Member Function Documentation

◆ BackwardIndex()

ffi::Array<PrimExpr> tvm::tir::BijectiveLayout::BackwardIndex ( const ffi::Array< PrimExpr > &  dst_index) const

◆ BackwardShape()

ffi::Array<PrimExpr> tvm::tir::BijectiveLayout::BackwardShape ( const ffi::Array< PrimExpr > &  dst_shape) const

◆ ForwardIndex()

ffi::Array<PrimExpr> tvm::tir::BijectiveLayout::ForwardIndex ( const ffi::Array< PrimExpr > &  index) const

◆ ForwardShape()

ffi::Array<PrimExpr> tvm::tir::BijectiveLayout::ForwardShape ( const ffi::Array< PrimExpr > &  shape) const

◆ TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE()

tvm::tir::BijectiveLayout::TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE ( BijectiveLayout  ,
ObjectRef  ,
BijectiveLayoutNode   
)

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