tvm
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
tvm::DictAttrsNode Class Reference

Specialized attribute type that is backed by a map. The DictAttrsNode implements the Attrs behavior, its fields are directly accessible via object.field_name like other normal nodes. More...

#include <attrs.h>

Inheritance diagram for tvm::DictAttrsNode:
Collaboration diagram for tvm::DictAttrsNode:

Public Member Functions

void InitByPackedArgs (const ffi::PackedArgs &args, bool allow_unknown) final
 Initialize the attributes by arguments. More...
 
 TVM_DECLARE_FINAL_OBJECT_INFO (DictAttrsNode, BaseAttrsNode)
 
- Public Member Functions inherited from tvm::BaseAttrsNode
virtual ~BaseAttrsNode ()
 virtual destructor More...
 
template<typename... Args>
void InitBySeq (Args &&... args)
 Initialize the attributes by sequence of arguments. More...
 
 TVM_DECLARE_BASE_OBJECT_INFO (BaseAttrsNode, Object)
 

Static Public Member Functions

static void RegisterReflection ()
 

Public Attributes

Map< String, ffi::Any > dict
 internal attrs map More...
 

Static Public Attributes

static constexpr const char * _type_key = "ir.DictAttrs"
 
- Static Public Attributes inherited from tvm::BaseAttrsNode
static constexpr TVMFFISEqHashKind _type_s_eq_hash_kind = kTVMFFISEqHashKindTreeNode
 
static constexpr const char * _type_key = "ir.Attrs"
 

Detailed Description

Specialized attribute type that is backed by a map. The DictAttrsNode implements the Attrs behavior, its fields are directly accessible via object.field_name like other normal nodes.

Member Function Documentation

◆ InitByPackedArgs()

void tvm::DictAttrsNode::InitByPackedArgs ( const ffi::PackedArgs &  kwargs,
bool  allow_unknown 
)
finalvirtual

Initialize the attributes by arguments.

Parameters
kwargsThe key value pairs for initialization. [key0, value0, key1, value1, ..., key_n, value_n]
allow_unknownWhether allow additional unknown fields.
Note
This function throws when the required field is not present.

Implements tvm::BaseAttrsNode.

◆ RegisterReflection()

static void tvm::DictAttrsNode::RegisterReflection ( )
inlinestatic

◆ TVM_DECLARE_FINAL_OBJECT_INFO()

tvm::DictAttrsNode::TVM_DECLARE_FINAL_OBJECT_INFO ( DictAttrsNode  ,
BaseAttrsNode   
)

Member Data Documentation

◆ _type_key

constexpr const char* tvm::DictAttrsNode::_type_key = "ir.DictAttrs"
staticconstexpr

◆ dict

Map<String, ffi::Any> tvm::DictAttrsNode::dict

internal attrs map


The documentation for this class was generated from the following file: