24 #ifndef TVM_RELAX_UTILS_H_
25 #define TVM_RELAX_UTILS_H_
30 #include <tvm/runtime/logging.h>
94 bool permit_unknown_dtype =
true);
Algebra expression simplifications.
Managed reference to RelayExprNode.
Definition: expr.h:442
Analyzer that contains bunch of sub-analyzers.
Definition: analyzer.h:629
Managed reference to StructInfoNode.
Definition: expr.h:129
Map container of NodeRef->NodeRef in DSL graph. Map implements copy on write semantics,...
Definition: map.h:1271
IRModule that holds the functions and type definitions.
Expr ToNonDataflow(const Expr &e)
Transform all dataflow structure to non-dataflow version.
Function CopyWithNewVars(Function func)
Copy the given function. All variables that are bound inside the original function would be copied to...
bool IsImpureCall(const Call &call)
Check if the given Call node is an impure operation. If the callee is a general expression,...
Expr Bind(const Expr &expr, const tvm::Map< Var, Expr > &binds, const tvm::Map< tir::Var, PrimExpr > &symbolic_var_map={})
Bind the variables to a Relax expression. This is a helper function usually called by other pass func...
tvm::Map< tir::Var, PrimExpr > InferSymbolicVarMap(const tvm::Map< relax::Var, relax::Expr > &binds, arith::Analyzer *analyzer)
Infer a binding map for symbolic variables.
bool IsLeafOrTuple(const Expr &expr)
Check if the given expression is a "leaf" node or tuple node for normalization purposes.
Expr GetBoundValue(const Binding &b)
Get the value bound in the binding.
bool IsBoolStructInfo(const StructInfo &sinfo, bool permit_unknown_rank=true, bool permit_unknown_dtype=true)
Check if the given StructInfo is for a boolean scalar (tensor of rank 0 with a boolean dtype).
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36