24 #ifndef TVM_RELAY_TRANSFORM_H_
25 #define TVM_RELAY_TRANSFORM_H_
678 std::function<
Expr(
const Expr&)> fmulti_ref_trigger =
nullptr);
694 std::function<
Expr(
const Expr&)> fmulti_ref_trigger =
nullptr);
Managed reference class to CompilationConfig.
Definition: compilation_config.h:191
Managed reference class to IRModuleNode.
Definition: module.h:366
Managed reference to RelayExprNode.
Definition: expr.h:442
Managed reference class to TargetNode.
Definition: target.h:200
Managed reference to TypeNode.
Definition: type.h:93
Managed reference class to VirtualDeviceNode.
Definition: virtual_device.h:271
Managed reference to FunctionNode.
Definition: function.h:105
Array, container representing a contiguous sequence of ObjectRefs.
Definition: array.h:289
Map container of NodeRef->NodeRef in DSL graph. Map implements copy on write semantics,...
Definition: map.h:1271
Module container of TVM.
Definition: module.h:79
Base class of all object reference.
Definition: object.h:519
Packed function is a type-erased function. The arguments are passed by packed format.
Definition: packed_func.h:141
Reference to string objects.
Definition: string.h:98
Please refer to TypedPackedFunc<R(Args..)>.
Definition: packed_func.h:63
PassContextNode contains the information that a pass can rely on, such as analysis results.
Definition: transform.h:77
PassContext that is used to configure the pass behavior.
Definition: transform.h:182
A helper class to collect all the targets in canonical form necessary for compilation.
Expr Legalize(const Expr &expr, const std::string &legalize_map_attr_name)
Expr ForwardRewrite(const Expr &expr, const String &rewrite_map_attr_name, std::function< ObjectRef(const Call &)> fcontext=nullptr, std::function< Expr(const Expr &)> fmulti_ref_trigger=nullptr)
Apply rewrite rules to rewrite the expr in post DFS order. This function is used as a helper function...
Function UnCPS(const Function &f)
Remove the continuation argument of a CPS function.
Expr DeDup(const Expr &e)
Deduplicate the bound variables and type variables in the expression.
tvm::RelayExpr Expr
Definition: expr.h:54
Expr RewriteAnnotatedOps(const Expr &expr, int fallback_device)
Rewrite the annotated program.
Function SubstituteBoundVars(const Function &func, const tvm::Map< Var, Expr > &binds)
Substitute variables with new variables (including function parameters) in a function....
Function ToCPS(const Function &f, const IRModule &mod)
Turn an expression into continuation passing style(CPS).
Expr Bind(const Expr &expr, const tvm::Map< Var, Expr > &binds)
Bind the free variables to a Relay expression. This is a helper function usually called by other pass...
tvm::PrimExpr mod(const tvm::PrimExpr &a, const tvm::PrimExpr &b)
Definition: broadcast.h:290
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
Relay expression language.
Primitive operators(builtin intrinsics).
The Expr and related elements in DataFlow construction.
Compilation target object.
A compile time representation for where data is to be stored at runtime, and how to compile code to c...