tvm
Public Member Functions | List of all members
tvm::AttrsNodeReflAdapter< DerivedType > Class Template Reference

Adapter for AttrsNode with the new reflection API. More...

#include <attrs.h>

Inheritance diagram for tvm::AttrsNodeReflAdapter< DerivedType >:
Collaboration diagram for tvm::AttrsNodeReflAdapter< DerivedType >:

Public Member Functions

void InitByPackedArgs (const ffi::PackedArgs &args, bool allow_unknown) final
 Initialize the attributes by arguments. More...
 
- 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)
 

Additional Inherited Members

- 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

template<typename DerivedType>
class tvm::AttrsNodeReflAdapter< DerivedType >

Adapter for AttrsNode with the new reflection API.

We will phaseout the old AttrsNode in future in favor of the new reflection API. This adapter allows us to gradually migrate to the new reflection API.

Template Parameters
DerivedTypeThe final attribute type.

Member Function Documentation

◆ InitByPackedArgs()

template<typename DerivedType >
void tvm::AttrsNodeReflAdapter< DerivedType >::InitByPackedArgs ( const ffi::PackedArgs &  kwargs,
bool  allow_unknown 
)
inlinefinalvirtual

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.


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