24#ifndef TVM_RELAX_UTILS_H_
25#define TVM_RELAX_UTILS_H_
27#include <tvm/ffi/error.h>
48TVM_DLL
Expr Bind(
const Expr& expr,
const tvm::ffi::Map<Var, Expr>& binds);
54TVM_DLL
Type Bind(
const Type& ty,
const tvm::ffi::Map<Var, Expr>& binds);
74 const tvm::ffi::Map<tvm::Var, relax::Expr>& binds,
const sym::Analyzer& analyzer);
90 bool permit_unknown_dtype =
true);
Algebra expression simplifications.
Managed reference to BindNode.
Definition stmt.h:159
Managed reference to CallNode.
Definition expr.h:972
Managed reference to ExprNode.
Definition base_expr.h:359
Managed reference to TypeNode.
Definition base_expr.h:80
Managed reference to AnalyzerObj.
Definition analyzer.h:916
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...
tvm::ffi::Map< Var, Expr > InferSymbolicVarMap(const tvm::ffi::Map< tvm::Var, relax::Expr > &binds, const sym::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 attr.h:23