tvm
|
A pattern matcher for matching dataflow properties. More...
#include <tvm/relax/dataflow_pattern.h>
#include <tvm/runtime/container/optional.h>
#include <memory>
Go to the source code of this file.
Namespaces | |
tvm | |
runtime implementation for LibTorch/TorchScript. | |
tvm::relax | |
Functions | |
bool | tvm::relax::MatchExpr (DFPattern pattern, Expr expr, Optional< runtime::Map< Var, Expr >> bindings=NullOpt) |
Determine if a pattern matches an expression. More... | |
Optional< Map< DFPattern, Expr > > | tvm::relax::ExtractMatchedExpr (DFPattern pattern, Expr expr, Optional< runtime::Map< Var, Expr >> bindings=NullOpt) |
Optional< Map< DFPattern, Var > > | tvm::relax::MatchGraph (const PatternContext &ctx, const DataflowBlock &dfb) |
Match a sub-graph in a DataflowBlock with a graph of patterns and return the mapping. More... | |
Function | tvm::relax::RewriteBindings (const PatternContext &ctx, TypedPackedFunc< Map< Var, Expr >(Map< DFPattern, Var >, Map< Var, Expr >)> rewriter, Function f) |
Rewrite a function with the given pattern and the rewriter function. More... | |
Function | tvm::relax::RewriteCall (const DFPattern &pattern, TypedPackedFunc< Expr(Expr, Map< DFPattern, Expr >)> rewriter, Function func) |
Rewrite a function with the given pattern and the rewriter function. More... | |
A pattern matcher for matching dataflow properties.