24#ifndef TVM_RELAX_UTILS_H_
25#define TVM_RELAX_UTILS_H_
28#include <tvm/ffi/error.h>
Algebra expression simplifications.
Managed reference to CallNode.
Definition expr.h:474
Managed reference to ExprNode.
Definition base_expr.h:335
Managed reference to TypeNode.
Definition base_expr.h:77
RAII wrapper function to enter and exit a context object similar to python's with syntax.
Definition with_context.h:59
Managed reference to AnalyzerObj.
Definition analyzer.h:931
IRModule that holds the functions and type definitions.
Expr ToNonDataflow(const Expr &e)
Transform all dataflow structure to non-dataflow version.
Expr Bind(const Expr &expr, const tvm::ffi::Map< Var, Expr > &binds)
Bind the variables to a Relax expression. This is a helper function usually called by other pass func...
Function CopyWithNewVars(Function func)
Copy the given function. All variables that are bound inside the original function would be copied to...
tvm::ffi::Map< Var, Expr > InferSymbolicVarMap(const tvm::ffi::Map< tvm::Var, relax::Expr > &binds, const arith::Analyzer &analyzer)
Infer a binding map for symbolic variables.
bool IsBoolType(const Type &ty, bool permit_unknown_rank=true, bool permit_unknown_dtype=true)
Check if the given Type is for a boolean scalar (tensor of rank 0 with a boolean dtype).
bool IsImpureCall(const Call &call)
Check if the given Call node is an impure operation. If the callee is a general expression,...
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.
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition analyzer.h:40