|
tvm
|
The ir_builder frame for the relax function. More...
#include <frame.h>
Public Member Functions | |
| FunctionFrameObj (tvm::relax::BlockBuilder builder) | |
| FunctionFrameObj (ffi::UnsafeInit) | |
| TVM_FFI_DECLARE_OBJECT_INFO_FINAL ("script.ir_builder.relax.FunctionFrame", FunctionFrameObj, SeqExprFrameObj) | |
| void | EnterWithScope () final |
| The method called when entering RAII scope. | |
| void | ExitWithScope () final |
| The method called when exiting RAII scope. | |
Public Member Functions inherited from tvm::script::ir_builder::relax::SeqExprFrameObj | |
| TVM_FFI_DECLARE_OBJECT_INFO ("script.ir_builder.relax.SeqExprFrame", SeqExprFrameObj, RelaxFrameObj) | |
| void | EnterWithScope () override |
| The method called when entering RAII scope. | |
| void | ExitWithScope () override |
| The method called when exiting RAII scope. | |
Public Member Functions inherited from tvm::script::ir_builder::relax::RelaxFrameObj | |
| TVM_FFI_DECLARE_OBJECT_INFO ("script.ir_builder.relax.RelaxFrame", RelaxFrameObj, IRBuilderFrameObj) | |
Public Member Functions inherited from tvm::script::ir_builder::IRBuilderFrameObj | |
| IRBuilderFrameObj () | |
| Capture the source-call context when this frame is constructed. | |
| TVM_FFI_DECLARE_OBJECT_INFO ("script.ir_builder.IRBuilderFrame", IRBuilderFrameObj, ffi::Object) | |
| virtual | ~IRBuilderFrameObj ()=default |
| Default destructor. | |
| void | AddCallback (ffi::TypedFunction< void()> callback) |
| Add a callback method invoked when exiting the RAII scope. | |
Static Public Member Functions | |
| static void | RegisterReflection () |
Static Public Member Functions inherited from tvm::script::ir_builder::relax::SeqExprFrameObj | |
| static void | RegisterReflection () |
Static Public Member Functions inherited from tvm::script::ir_builder::relax::RelaxFrameObj | |
| static void | RegisterReflection () |
Static Public Member Functions inherited from tvm::script::ir_builder::IRBuilderFrameObj | |
| static void | RegisterReflection () |
Public Attributes | |
| ffi::Optional< ffi::String > | name |
| The function name. | |
| ffi::Array< tvm::Var > | params |
| The function params. | |
| ffi::Optional< tvm::Type > | ret_ty |
| The function return type. | |
| ffi::Optional< bool > | is_pure |
| Whether the function is annotated as pure. | |
| ffi::Optional< bool > | is_private |
| Whether the function is annotated as private. | |
| ffi::Map< ffi::String, Any > | attrs |
| The function attributes. | |
| tvm::relax::BlockBuilder | block_builder |
| The block builder to create Relax function. | |
| bool | declaration = false |
| Whether this frame constructs only a function signature. | |
| bool | local = false |
| ffi::Optional< tvm::Var > | local_var |
| ffi::Optional< tvm::relax::Function > | function |
| Finalized function and its stable module reference. | |
| ffi::Optional< tvm::GlobalVar > | global_var |
Public Attributes inherited from tvm::script::ir_builder::relax::SeqExprFrameObj | |
| ffi::Array< tvm::relax::BindingBlock > | binding_blocks |
| The binding blocks inside the frame. | |
| ffi::Optional< tvm::relax::Expr > | output |
The frame output expr. std::nullopt when undefined. | |
Public Attributes inherited from tvm::script::ir_builder::IRBuilderFrameObj | |
| std::vector< ffi::TypedFunction< void()> > | callbacks |
| A list of callbacks used when exiting the frame. | |
| Location | loc = UnknownLoc() |
| Source context retained until this frame constructs its result. | |
Additional Inherited Members | |
Static Public Attributes inherited from tvm::script::ir_builder::IRBuilderFrameObj | |
| static constexpr const bool | _type_mutable = true |
The ir_builder frame for the relax function.
|
inlineexplicit |
|
inlineexplicit |
|
finalvirtual |
The method called when entering RAII scope.
Reimplemented from tvm::script::ir_builder::IRBuilderFrameObj.
|
finalvirtual |
The method called when exiting RAII scope.
Reimplemented from tvm::script::ir_builder::IRBuilderFrameObj.
|
inlinestatic |
| tvm::script::ir_builder::relax::FunctionFrameObj::TVM_FFI_DECLARE_OBJECT_INFO_FINAL | ( | "script.ir_builder.relax.FunctionFrame" | , |
| FunctionFrameObj | , | ||
| SeqExprFrameObj | |||
| ) |
| ffi::Map<ffi::String, Any> tvm::script::ir_builder::relax::FunctionFrameObj::attrs |
The function attributes.
| tvm::relax::BlockBuilder tvm::script::ir_builder::relax::FunctionFrameObj::block_builder |
The block builder to create Relax function.
| bool tvm::script::ir_builder::relax::FunctionFrameObj::declaration = false |
Whether this frame constructs only a function signature.
| ffi::Optional<tvm::relax::Function> tvm::script::ir_builder::relax::FunctionFrameObj::function |
Finalized function and its stable module reference.
| ffi::Optional<tvm::GlobalVar> tvm::script::ir_builder::relax::FunctionFrameObj::global_var |
| ffi::Optional<bool> tvm::script::ir_builder::relax::FunctionFrameObj::is_private |
Whether the function is annotated as private.
| ffi::Optional<bool> tvm::script::ir_builder::relax::FunctionFrameObj::is_pure |
Whether the function is annotated as pure.
| bool tvm::script::ir_builder::relax::FunctionFrameObj::local = false |
| ffi::Optional<tvm::Var> tvm::script::ir_builder::relax::FunctionFrameObj::local_var |
| ffi::Optional<ffi::String> tvm::script::ir_builder::relax::FunctionFrameObj::name |
The function name.
R.func_name before exit this frame. | ffi::Array<tvm::Var> tvm::script::ir_builder::relax::FunctionFrameObj::params |
The function params.
| ffi::Optional<tvm::Type> tvm::script::ir_builder::relax::FunctionFrameObj::ret_ty |
The function return type.
ret_ty is None, try to use the deduced type from body If the ret_ty is not None, we can still take body.ty if we ret_ty is base of body.ty. If not, we will take the specified ret_ty.