tvm
|
The ir_builder frame for the relax function. More...
#include <frame.h>
Public Attributes | |
Optional< String > | name |
The function name. More... | |
Array< tvm::relax::Var > | params |
The function params. More... | |
Optional< tvm::relax::StructInfo > | ret_struct_info |
The function return struct info. More... | |
Optional< Bool > | is_pure |
Whether the function is annotated as pure. More... | |
Optional< Bool > | is_private |
Whether the function is annotated as private. More... | |
Map< String, ObjectRef > | attrs |
The function attributes. More... | |
tvm::relax::BlockBuilder | block_builder |
The block builder to create Relax function. More... | |
Public Attributes inherited from tvm::script::ir_builder::relax::SeqExprFrameNode | |
Array< tvm::relax::BindingBlock > | binding_blocks |
The binding blocks inside the frame. More... | |
Optional< tvm::relax::Expr > | output |
The frame output expr. NullOpt when undefined. More... | |
Public Attributes inherited from tvm::script::ir_builder::IRBuilderFrameNode | |
std::vector< runtime::TypedPackedFunc< void()> > | callbacks |
A list of callbacks used when exiting the frame. More... | |
Static Public Attributes | |
static constexpr const char * | _type_key = "script.ir_builder.relax.FunctionFrame" |
Static Public Attributes inherited from tvm::script::ir_builder::relax::SeqExprFrameNode | |
static constexpr const char * | _type_key = "script.ir_builder.relax.SeqExprFrame" |
Static Public Attributes inherited from tvm::script::ir_builder::relax::RelaxFrameNode | |
static constexpr const char * | _type_key = "script.ir_builder.relax.RelaxFrame" |
Static Public Attributes inherited from tvm::script::ir_builder::IRBuilderFrameNode | |
static constexpr const char * | _type_key = "script.ir_builder.IRBuilderFrame" |
Static Public Attributes inherited from tvm::runtime::Object | |
static constexpr const char * | _type_key = "runtime.Object" |
static constexpr bool | _type_final = false |
static constexpr uint32_t | _type_child_slots = 0 |
static constexpr bool | _type_child_slots_can_overflow = true |
static constexpr bool | _type_has_method_visit_attrs = true |
static constexpr bool | _type_has_method_sequal_reduce = false |
static constexpr bool | _type_has_method_shash_reduce = false |
static constexpr uint32_t | _type_index = TypeIndex::kDynamic |
Additional Inherited Members | |
Public Types inherited from tvm::runtime::Object | |
typedef void(* | FDeleter) (Object *self) |
Object deleter. More... | |
using | RefCounterType = std::atomic< int32_t > |
Static Public Member Functions inherited from tvm::runtime::Object | |
static std::string | TypeIndex2Key (uint32_t tindex) |
Get the type key of the corresponding index from runtime. More... | |
static size_t | TypeIndex2KeyHash (uint32_t tindex) |
Get the type key hash of the corresponding index from runtime. More... | |
static uint32_t | TypeKey2Index (const std::string &key) |
Get the type index of the corresponding key from runtime. More... | |
static uint32_t | _GetOrAllocRuntimeTypeIndex () |
static uint32_t | RuntimeTypeIndex () |
Protected Member Functions inherited from tvm::runtime::Object | |
void | IncRef () |
developer function, increases reference counter. More... | |
void | DecRef () |
developer function, decrease reference counter. More... | |
Static Protected Member Functions inherited from tvm::runtime::Object | |
static uint32_t | GetOrAllocRuntimeTypeIndex (const std::string &key, uint32_t static_tindex, uint32_t parent_tindex, uint32_t type_child_slots, bool type_child_slots_can_overflow) |
Get the type index using type key. More... | |
Protected Attributes inherited from tvm::runtime::Object | |
uint32_t | type_index_ {0} |
Type index(tag) that indicates the type of the object. More... | |
RefCounterType | ref_counter_ {0} |
The internal reference counter. More... | |
FDeleter | deleter_ = nullptr |
deleter of this object to enable customized allocation. If the deleter is nullptr, no deletion will be performed. The creator of the object must always set the deleter field properly. More... | |
The ir_builder frame for the relax function.
|
finalvirtual |
The method called when entering RAII scope.
Reimplemented from tvm::script::ir_builder::relax::SeqExprFrameNode.
|
finalvirtual |
The method called when exiting RAII scope.
Reimplemented from tvm::script::ir_builder::relax::SeqExprFrameNode.
tvm::script::ir_builder::relax::FunctionFrameNode::TVM_DECLARE_FINAL_OBJECT_INFO | ( | FunctionFrameNode | , |
SeqExprFrameNode | |||
) |
|
inline |
|
staticconstexpr |
The function attributes.
tvm::relax::BlockBuilder tvm::script::ir_builder::relax::FunctionFrameNode::block_builder |
The block builder to create Relax function.
Whether the function is annotated as private.
Whether the function is annotated as pure.
The function name.
R.func_name
before exit this frame. Array<tvm::relax::Var> tvm::script::ir_builder::relax::FunctionFrameNode::params |
The function params.
Optional<tvm::relax::StructInfo> tvm::script::ir_builder::relax::FunctionFrameNode::ret_struct_info |
The function return struct info.
ret_struct_info
is None, try to use the deduced type from body If the ret_struct_info
is not None, we can still take body.struct_info if we ret_struct_info is base of body.struct_info. If not, we will take the specified ret_struct_info
.