24 #ifndef TVM_IR_FUNCTION_H_ 25 #define TVM_IR_FUNCTION_H_ 34 #include <type_traits> 101 template <
typename TObjectRef>
103 const std::string& attr_key,
105 return attrs.
GetAttr(attr_key, default_value);
108 template <
typename TObjectRef>
134 static constexpr
const char* _type_key =
"BaseFunc";
135 static constexpr
const uint32_t _type_child_slots = 2;
195 #endif // TVM_IR_FUNCTION_H_ DictAttrs attrs
Additional attributes storing the meta-data.
Definition: function.h:80
PackedFunc that exposes a CPackedFunc signature.
Runtime String container types.
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
constexpr const char * kTarget
Compilation target of the function.
Definition: function.h:170
Default calling convention.
Managed reference to DictAttrsNode.
Definition: attrs.h:227
Helpers for attribute objects.
Runtime Array container types.
Optional< TObjectRef > GetAttr(const std::string &attr_key, TObjectRef default_value) const
Definition: function.h:109
constexpr const char * kGlobalSymbol
Global linker symbol of the function in generated code.
Definition: function.h:191
Optional< TObjectRef > GetAttr(const std::string &attr_key, Optional< TObjectRef > default_value=Optional< TObjectRef >(nullptr)) const
Get a function attribute.
Definition: attrs.h:259
CallingConv
Possible Calling conventions.
Definition: function.h:44
Managed reference to RelayExprNode.
Definition: expr.h:433
#define TVM_DEFINE_OBJECT_REF_METHODS(TypeName, ParentType, ObjectName)
Definition: object.h:713
bool HasNonzeroAttr(const std::string &attr_key) const
Check whether the function has an non-zero integer attr.
Definition: function.h:132
constexpr const char * kCallingConv
Indicates the special calling convention.
Definition: function.h:161
Base node of all functions.
Definition: function.h:77
Runtime Map container types.
Optional< TObjectRef > GetAttr(const std::string &attr_key, Optional< TObjectRef > default_value=Optional< TObjectRef >(nullptr)) const
Get a function attribute.
Definition: function.h:102
Managed reference to BaseFuncNode.
Definition: function.h:143
Optional container that to represent to a Nullable variant of T.
Definition: optional.h:51
Base node of all non-primitive expressions.
Definition: expr.h:361
#define TVM_DECLARE_BASE_OBJECT_INFO(TypeName, ParentType)
helper macro to declare a base object type that can be inherited.
Definition: object.h:648
bool HasNonzeroAttr(const std::string &attr_key) const
Check whether the function has an non-zero integer attr.
Definition: attrs.h:298