tvm
|
A Relax function. More...
#include <expr.h>
Public Member Functions | |
TVM_DECLARE_FINAL_OBJECT_INFO (FunctionNode, BaseFuncNode) | |
![]() | |
template<typename TObjectRef > | |
Optional< TObjectRef > | GetAttr (const std::string &attr_key, Optional< TObjectRef > default_value=std::nullopt) const |
Get a function attribute. More... | |
template<typename TObjectRef > | |
Optional< TObjectRef > | GetAttr (const std::string &attr_key, TObjectRef default_value) const |
bool | HasNonzeroAttr (const std::string &attr_key) const |
Check whether the function has an non-zero integer attr. More... | |
LinkageType | GetLinkageType () const |
Get the type of the linkage. More... | |
TVM_DECLARE_BASE_OBJECT_INFO (BaseFuncNode, RelaxExprNode) | |
![]() | |
TVM_DECLARE_BASE_OBJECT_INFO (RelaxExprNode, BaseExprNode) | |
![]() | |
TVM_DECLARE_BASE_OBJECT_INFO (BaseExprNode, Object) | |
Static Public Member Functions | |
static void | RegisterReflection () |
![]() | |
static void | RegisterReflection () |
![]() | |
static void | RegisterReflection () |
![]() | |
static void | RegisterReflection () |
Public Attributes | |
Array< Var > | params |
The parameters to the function. More... | |
SeqExpr | body |
The body of the function. More... | |
StructInfo | ret_struct_info |
The return type of the function. More... | |
bool | is_pure |
Whether the function is annotated as pure or not. More... | |
![]() | |
DictAttrs | attrs |
Additional attributes storing the meta-data. More... | |
![]() | |
Optional< ObjectRef > | struct_info_ = Optional<ObjectRef>() |
Stores the result of structure information of the expression that encapsulate both static shape and runtime information such as shape. More... | |
![]() | |
Span | span |
Span that points to the original source code. Reserved debug information. More... | |
Static Public Attributes | |
static constexpr TVMFFISEqHashKind | _type_s_eq_hash_kind = kTVMFFISEqHashKindDAGNode |
static constexpr const char * | _type_key = "relax.expr.Function" |
![]() | |
static constexpr const char * | _type_key = "ir.BaseFunc" |
static constexpr const uint32_t | _type_child_slots = 2 |
![]() | |
static constexpr const char * | _type_key = "ir.RelaxExpr" |
static constexpr const uint32_t | _type_child_slots = 22 |
![]() | |
static constexpr const char * | _type_key = "ir.BaseExpr" |
static constexpr TVMFFISEqHashKind | _type_s_eq_hash_kind = kTVMFFISEqHashKindTreeNode |
static constexpr const uint32_t | _type_child_slots = 64 |
A Relax function.
|
inlinestatic |
tvm::relax::FunctionNode::TVM_DECLARE_FINAL_OBJECT_INFO | ( | FunctionNode | , |
BaseFuncNode | |||
) |
|
staticconstexpr |
|
staticconstexpr |
SeqExpr tvm::relax::FunctionNode::body |
The body of the function.
bool tvm::relax::FunctionNode::is_pure |
Whether the function is annotated as pure or not.
Array<Var> tvm::relax::FunctionNode::params |
The parameters to the function.
StructInfo tvm::relax::FunctionNode::ret_struct_info |
The return type of the function.