24 #ifndef TVM_RELAX_DATAFLOW_MATCHER_H_
25 #define TVM_RELAX_DATAFLOW_MATCHER_H_
Managed reference to RelayExprNode.
Definition: expr.h:442
Managed reference to dataflow patterns.
Definition: dataflow_pattern.h:101
Managed reference to a pattern context.
Definition: dataflow_pattern.h:278
Map container of NodeRef->NodeRef in DSL graph. Map implements copy on write semantics,...
Definition: map.h:1271
Optional container that to represent to a Nullable variant of T.
Definition: optional.h:51
Please refer to TypedPackedFunc<R(Args..)>.
Definition: packed_func.h:63
Optional< Map< DFPattern, Expr > > ExtractMatchedExpr(DFPattern pattern, Expr expr, Optional< runtime::Map< Var, Expr >> bindings=NullOpt)
Function RewriteCall(const DFPattern &pattern, TypedPackedFunc< Expr(Expr, Map< DFPattern, Expr >)> rewriter, Function func)
Rewrite a function with the given pattern and the rewriter function.
Optional< Map< DFPattern, Var > > MatchGraph(const PatternContext &ctx, const DataflowBlock &dfb)
Match a sub-graph in a DataflowBlock with a graph of patterns and return the mapping.
Function 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.
RelayExpr Expr
Definition: expr.h:37
bool MatchExpr(DFPattern pattern, Expr expr, Optional< runtime::Map< Var, Expr >> bindings=NullOpt)
Determine if a pattern matches an expression.
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
constexpr runtime::NullOptType NullOpt
Definition: optional.h:169
Runtime Optional container types.
A pattern language for matching dataflow properties.