tvm
|
Managed reference class to IRModuleNode. More...
#include <module.h>
Public Types | |
using | ContainerType = IRModuleNode |
Declare the container type. More... | |
![]() | |
using | ContainerType = Object |
type indicate the container type. More... | |
Public Member Functions | |
IRModule (Map< GlobalVar, BaseFunc > functions, SourceMap map={}, DictAttrs attrs=DictAttrs(), Map< String, Array< GlobalInfo >> global_infos={}) | |
constructor More... | |
IRModule () | |
default constructor More... | |
IRModule (ObjectPtr< Object > n) | |
constructor More... | |
IRModuleNode * | operator-> () const |
IRModule | ShallowCopyIRModule (IRModule mod) |
Create a shallow copy of an IRModule. More... | |
TVM_DEFINE_OBJECT_REF_COW_METHOD (IRModuleNode) | |
![]() | |
ObjectRef ()=default | |
default constructor More... | |
ObjectRef (ObjectPtr< Object > data) | |
Constructor from existing object ptr. More... | |
bool | same_as (const ObjectRef &other) const |
Comparator. More... | |
bool | operator== (const ObjectRef &other) const |
Comparator. More... | |
bool | operator!= (const ObjectRef &other) const |
Comparator. More... | |
bool | operator< (const ObjectRef &other) const |
Comparator. More... | |
bool | defined () const |
const Object * | get () const |
const Object * | operator-> () const |
bool | unique () const |
int | use_count () const |
template<typename ObjectType , typename = std::enable_if_t<std::is_base_of_v<Object, ObjectType>>> | |
const ObjectType * | as () const |
Try to downcast the internal Object to a raw pointer of a corresponding type. More... | |
template<typename ObjectRefType , typename = std::enable_if_t<std::is_base_of_v<ObjectRef, ObjectRefType>>> | |
Optional< ObjectRefType > | as () const |
Try to downcast the ObjectRef to a Optional<T> of the requested type. More... | |
Static Public Member Functions | |
static IRModule | FromExpr (const RelaxExpr &expr, const Map< GlobalVar, BaseFunc > &global_funcs={}) |
As for FromExprInContext , but assuming expr is bound to 'main' and no imports. More... | |
Static Public Attributes | |
static constexpr bool | _type_is_nullable = false |
Declare whether Ref is nullable. More... | |
![]() | |
static constexpr bool | _type_is_nullable = true |
Additional Inherited Members | |
![]() | |
Object * | get_mutable () const |
![]() | |
template<typename T > | |
static T | DowncastNoCheck (ObjectRef ref) |
Internal helper function downcast a ref without check. More... | |
static void | FFIClearAfterMove (ObjectRef *ref) |
Clear the object ref data field without DecRef after we successfully moved the field. More... | |
template<typename ObjectType > | |
static ObjectPtr< ObjectType > | GetDataPtr (const ObjectRef &ref) |
Internal helper function get data_ as ObjectPtr of ObjectType. More... | |
![]() | |
ObjectPtr< Object > | data_ |
Internal pointer that backs the reference. More... | |
Managed reference class to IRModuleNode.
Declare the container type.
|
explicit |
constructor
functions | Functions in the module. |
map | The module source map. |
attrs | The module meta-data attributes. |
global_infos | Global infos in the module. |
|
inline |
default constructor
constructor
n | The object pointer. |
|
static |
As for FromExprInContext
, but assuming expr
is bound to 'main' and no imports.
|
inline |
tvm::IRModule::TVM_DEFINE_OBJECT_REF_COW_METHOD | ( | IRModuleNode | ) |
|
staticconstexpr |
Declare whether Ref is nullable.