24 #ifndef TVM_RELAX_DATAFLOW_MATCHER_H_
25 #define TVM_RELAX_DATAFLOW_MATCHER_H_
Managed reference to RelaxExprNode.
Definition: expr.h:405
Managed reference to dataflow patterns.
Definition: dataflow_pattern.h:102
Managed reference to a pattern context.
Definition: dataflow_pattern.h:279
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
A pattern language for matching dataflow properties.
Optional< Map< DFPattern, Expr > > ExtractMatchedExpr(DFPattern pattern, Expr expr, Optional< runtime::Map< Var, Expr >> bindings=NullOpt)
Function RewriteCall(const DFPattern &pattern, runtime::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, runtime::TypedPackedFunc< Map< Var, Expr >(Map< DFPattern, Var >, Map< Var, Expr >)> rewriter, Function f)
Rewrite a function with the given pattern and the rewriter function.
RelaxExpr Expr
Definition: expr.h:38
bool MatchExpr(DFPattern pattern, Expr expr, Optional< runtime::Map< Var, Expr >> bindings=NullOpt)
Determine if a pattern matches an expression.
Performance counters for profiling via the PAPI library.
Definition: analyzer.h:36
constexpr runtime::NullOptType NullOpt
Definition: optional.h:169
Runtime Optional container types.
Type-erased function used across TVM API.