24 #ifndef TVM_IR_FUNCTION_H_
25 #define TVM_IR_FUNCTION_H_
34 #include <type_traits>
163 template <
typename TObjectRef>
165 const std::string& attr_key,
170 template <
typename TObjectRef>
Runtime Array container types.
Base node of all functions.
Definition: function.h:139
static constexpr const uint32_t _type_child_slots
Definition: function.h:222
bool HasNonzeroAttr(const std::string &attr_key) const
Check whether the function has an non-zero integer attr.
Definition: function.h:194
Optional< TObjectRef > GetAttr(const std::string &attr_key, Optional< TObjectRef > default_value=Optional< TObjectRef >(nullptr)) const
Get a function attribute.
Definition: function.h:164
LinkageType GetLinkageType() const
Get the type of the linkage.
Definition: function.h:214
Optional< TObjectRef > GetAttr(const std::string &attr_key, TObjectRef default_value) const
Definition: function.h:171
DictAttrs attrs
Additional attributes storing the meta-data.
Definition: function.h:142
TVM_DECLARE_BASE_OBJECT_INFO(BaseFuncNode, RelayExprNode)
static constexpr const char * _type_key
Definition: function.h:221
Managed reference to BaseFuncNode.
Definition: function.h:230
TVM_DEFINE_OBJECT_REF_METHODS(BaseFunc, RelayExpr, BaseFuncNode)
Managed reference to DictAttrsNode.
Definition: attrs.h:227
bool HasNonzeroAttr(const std::string &attr_key) const
Check whether the function has an non-zero integer attr.
Definition: attrs.h:306
Optional< TObjectRef > GetAttr(const std::string &attr_key, Optional< TObjectRef > default_value=Optional< TObjectRef >(nullptr)) const
Get a function attribute.
Definition: attrs.h:258
Base node of all non-primitive expressions.
Definition: expr.h:362
Managed reference to RelayExprNode.
Definition: expr.h:442
Optional container that to represent to a Nullable variant of T.
Definition: optional.h:51
Helpers for attribute objects.
Runtime Map container types.
constexpr const char * kCallingConv
Indicates the special calling convention.
Definition: function.h:96
constexpr const char * kTarget
Compilation target of the function.
Definition: function.h:105
constexpr const char * kGlobalSymbol
Global linker symbol of the function in generated code.
Definition: function.h:126
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
CallingConv
Possible Calling conventions.
Definition: function.h:44
@ kDefault
Default calling convention.
@ kCPackedFunc
PackedFunc that exposes a CPackedFunc signature.
@ kDeviceKernelLaunch
Device kernel launch.
LinkageType
Supported linkage types.
Definition: function.h:71
@ kExternal
External linkage.
@ kInternal
Internal linkage.
Runtime String container types.