24 #ifndef TVM_RELAY_ANALYSIS_H_ 25 #define TVM_RELAY_ANALYSIS_H_ 32 #include <tvm/runtime/logging.h> 35 #include <unordered_map> 58 Optional<DiagnosticContext> diag_ctx = Optional<DiagnosticContext>());
95 Optional<DiagnosticContext> diag_ctx = Optional<DiagnosticContext>());
256 #endif // TVM_RELAY_ANALYSIS_H_ bool ConstantCheck(const Expr &e)
Check whether an expression is constant.
IRModule that holds the functions and type definitions.
Relay expression language.
std::unordered_map< const Object *, size_t > GetExprRefCount(const Expr &body)
Get reference counter of each internal ExprNode in body.
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
bool WellFormed(const Expr &expr, Optional< DiagnosticContext > diag_ctx=Optional< DiagnosticContext >())
Check that each Var is only bound once.
IRModule GetCalibrateModule(IRModule mod)
Get the updated module for collecting calibration data.
Array< Pattern > UnmatchedCases(const Match &match, const IRModule &mod)
Finds cases that the given match expression does not catch, if any.
tvm::Array< TypeVar > FreeTypeVars(const Expr &expr, const IRModule &mod)
Get free TypeVars from expression expr.
tvm::Array< Var > AllVars(const Expr &expr)
Get all variables from expression expr.
Kind KindCheck(const Type &t, const IRModule &mod, Optional< DiagnosticContext > diag_ctx=Optional< DiagnosticContext >())
Check that types are well kinded by applying "kinding rules".
Algebraic data types for Relay.
tvm::Array< TypeVar > AllTypeVars(const Expr &expr, const IRModule &mod)
Get all type variables in expression expr.
Map< GlobalVar, Array< Integer > > GetCalibrateOutputMap(const IRModule &mod)
Get the output map between subgrpahs and its inputs/output.
tvm::Array< TypeVar > BoundTypeVars(const Expr &expr, const IRModule &mod)
Get all bound type variables from expression expr.
Array, container representing a contiguous sequence of ObjectRefs.
Definition: array.h:289
tvm::Array< Var > BoundVars(const Expr &expr)
Get all bound variables from expression expr.
tvm::Type Type
Definition: type.h:47
TypeKind Kind
Definition: type.h:46
tvm::RelayExpr Expr
Definition: expr.h:54
bool BasicBlockNormalFormCheck(const Expr &e)
Check whether an expression is in the basic block normal form.
tvm::PrimExpr mod(const tvm::PrimExpr &a, const tvm::PrimExpr &b)
Definition: broadcast.h:290
tvm::Array< Var > FreeVars(const Expr &expr)
Get free type parameters from expression expr.
IRModuleFrame IRModule()
The IRModule declaration statement.