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,
108 template <
typename TObjectRef>
Runtime Array container types.
Base node of all functions.
Definition: function.h:77
static constexpr const uint32_t _type_child_slots
Definition: function.h:135
bool HasNonzeroAttr(const std::string &attr_key) const
Check whether the function has an non-zero integer attr.
Definition: function.h:132
Optional< TObjectRef > GetAttr(const std::string &attr_key, Optional< TObjectRef > default_value=Optional< TObjectRef >(nullptr)) const
Get a function attribute.
Definition: function.h:102
Optional< TObjectRef > GetAttr(const std::string &attr_key, TObjectRef default_value) const
Definition: function.h:109
DictAttrs attrs
Additional attributes storing the meta-data.
Definition: function.h:80
TVM_DECLARE_BASE_OBJECT_INFO(BaseFuncNode, RelayExprNode)
static constexpr const char * _type_key
Definition: function.h:134
Managed reference to BaseFuncNode.
Definition: function.h:143
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:297
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:361
Managed reference to RelayExprNode.
Definition: expr.h:433
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:161
constexpr const char * kTarget
Compilation target of the function.
Definition: function.h:170
constexpr const char * kGlobalSymbol
Global linker symbol of the function in generated code.
Definition: function.h:191
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.
Runtime String container types.