24 #ifndef TVM_RELAY_BASE_H_ 25 #define TVM_RELAY_BASE_H_ 45 #define RELAY_DEBUG(...) \ 47 auto fdebug = runtime::Registry::Get("relay.debug"); \ 48 ICHECK(fdebug) << "Could not find Relay Python debugger function."; \ 49 (*fdebug)("RELAY_DEBUG", __FILE__, __LINE__, __VA_ARGS__); \ 52 #define RELAY_DEBUG_INTERP(...) \ 54 auto fdebug = runtime::Registry::Get("relay.debug_interp"); \ 55 ICHECK(fdebug) << "Could not find Relay Python debugger function."; \ 56 (*fdebug)("RELAY_DEBUG", __FILE__, __LINE__, __VA_ARGS__); \ 77 static constexpr
const char*
_type_key =
"relay.Node";
118 TVM_DLL
explicit Id(
String name_hint);
154 #endif // TVM_RELAY_BASE_H_ tvm::Span Span
Definition: base.h:65
void FreeVarHashImpl(const runtime::Object *var) const
Implementation for hash for a free var.
Definition: structural_hash.h:193
Definitions and helper macros for IR/AST nodes.
bool FreeVarEqualImpl(const runtime::Object *lhs, const runtime::Object *rhs) const
Implementation for equality rule of var type objects(e.g. TypeVar, tir::Var).
Definition: structural_equal.h:313
A Reducer class to reduce the structural equality result of two objects.
Definition: structural_equal.h:124
The unique identifier of variables.
Definition: base.h:89
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
A Reducer class to reduce the structural hash value.
Definition: structural_hash.h:110
PrimExpr equal(PrimExpr a, PrimExpr b, Span span=Span())
equal
tvm::SourceName SourceName
Definition: base.h:64
A map from source names to source code.
Span span
The location of the program in a SourceFragment can be null, check with span.defined() ...
Definition: base.h:75
base class of all object containers.
Definition: object.h:167
String name_hint
The name of the variable, this only acts as a hint to the user, and is not used for equality...
Definition: base.h:96
This is the base node container of all relay structures.
Definition: base.h:71
Visitor class to get the attributes of an AST/IR node. The content is going to be called for each fie...
Definition: reflection.h:52
void VisitAttrs(tvm::AttrVisitor *v)
Definition: base.h:98
Definition: source_map.h:120
The source name of a file span.
Definition: source_map.h:67
String AsText(const ObjectRef &node, bool show_meta_data=true, runtime::TypedPackedFunc< String(ObjectRef)> annotate=nullptr)
Render the node as a string in the text format.
TVM_DECLARE_BASE_OBJECT_INFO(RelayNode, Object)
Reference to string objects.
Definition: string.h:98
Please refer to TypedPackedFunc<R(Args..)>.
Definition: packed_func.h:60
String PrettyPrint(const ObjectRef &node)
Pretty print a node for debug purposes.
#define TVM_DEFINE_OBJECT_REF_METHODS(TypeName, ParentType, ObjectName)
Definition: object.h:713
Base class of all object reference.
Definition: object.h:511
Stores locations in frontend source that generated a node.
Definition: source_map.h:87
bool SEqualReduce(const IdNode *other, SEqualReducer equal) const
Definition: base.h:100
#define TVM_DECLARE_FINAL_OBJECT_INFO(TypeName, ParentType)
helper macro to declare type information in a final class.
Definition: object.h:671
static constexpr bool _type_has_method_shash_reduce
Definition: object.h:234
tvm::SpanNode SpanNode
Definition: base.h:66
Reference to PrimExprNode.
Definition: expr.h:114
static constexpr bool _type_has_method_sequal_reduce
Definition: object.h:233
void SHashReduce(SHashReducer hash_reduce) const
Definition: base.h:104
static constexpr const char * _type_key
Definition: base.h:77