tvm
|
Helper container to store nested message for robust tuple-aware analysis. More...
#include <tvm/relax/expr.h>
#include <tvm/relax/struct_info.h>
#include <tvm/runtime/container/array.h>
#include <tvm/runtime/container/optional.h>
#include <utility>
#include <vector>
Go to the source code of this file.
Classes | |
class | tvm::relax::NestedMsg< T > |
Container that stores possibly nested message with leaf message type T. More... | |
Namespaces | |
tvm | |
runtime implementation for LibTorch/TorchScript. | |
tvm::relax | |
Functions | |
template<typename T , typename FType > | |
void | tvm::relax::ForEachLeaf (const NestedMsg< T > &msg, FType fvisit) |
Apply fvisit for each leaf elements in the nested message. More... | |
template<typename T , typename FType > | |
bool | tvm::relax::Equal (const NestedMsg< T > &lhs, const NestedMsg< T > &rhs, FType fequal) |
Recursively compare two nested messages. More... | |
template<typename T , typename FType > | |
NestedMsg< T > | tvm::relax::MapToNestedMsg (Expr expr, FType fmapleaf) |
Map expr with possible nested-tuple to nested message. More... | |
template<typename T , typename FType > | |
NestedMsg< T > | tvm::relax::MapToNestedMsg (StructInfo sinfo, FType fmapleaf) |
Map structinfo with possible nested-sinfo to nested message. More... | |
template<typename T , typename FType > | |
NestedMsg< T > | tvm::relax::MapToNestedMsgBySInfo (Expr expr, FType fmapleaf) |
Map expr with possible nested-tuple to nested message. More... | |
template<typename TargetType , typename T , typename FMapLeaf , typename FCombine > | |
TargetType | tvm::relax::NestedMsgTo (NestedMsg< T > msg, FMapLeaf fmapleaf, FCombine fcombine) |
Map nested message back to TargetType. More... | |
template<typename T , typename FType > | |
Expr | tvm::relax::NestedMsgToExpr (NestedMsg< T > msg, FType fmapleaf) |
Map nested message back to the expr. More... | |
template<typename T , typename FType > | |
NestedMsg< T > | tvm::relax::CombineNestedMsg (NestedMsg< T > lhs, NestedMsg< T > rhs, FType fcombine) |
Recursively combine two nested message into one. More... | |
template<typename T , typename FType > | |
NestedMsg< T > | tvm::relax::MapNestedMsg (NestedMsg< T > msg, FType fmapleaf) |
Recursively map a nested message to another one, with leaf mapped by the input fmapleaf. More... | |
template<typename T , typename FType > | |
void | tvm::relax::DecomposeNestedMsg (Expr expr, NestedMsg< T > msg, FType fvisitleaf) |
Recursively decompose the tuple structure in expr and msg along with it. More... | |
template<typename T , std::size_t N, typename FType > | |
Expr | tvm::relax::TransformTupleLeaf (Expr expr, std::array< NestedMsg< T >, N > msgs, FType ftransleaf) |
Recursively transform the tuple structure in expr and msgs along with it. More... | |
template<typename T , std::size_t N, typename FType > | |
StructInfo | tvm::relax::TransformTupleLeaf (StructInfo sinfo, std::array< NestedMsg< T >, N > msgs, FType ftransleaf) |
Recursively transform the tuple structure in sinfo and msgs along with it. More... | |
Helper container to store nested message for robust tuple-aware analysis.
Please see NestedMsg for description of usage.