Define TVM_FFI_DECLARE_OBJECT_INFO_STATIC

Define TVM_FFI_DECLARE_OBJECT_INFO_STATIC#

Define Documentation#

TVM_FFI_DECLARE_OBJECT_INFO_STATIC(TypeKey, TypeName, ParentType)#

Helper macro to declare object information with static type index.

For each custom object, you need to call tvm::ffi::reflection::ObjectDef<TypeName>() once in your cc file to register the type index with the runtime. Alternatively, you can call TypeName::_GetOrAllocRuntimeTypeIndex() once.

Parameters:
  • TypeKey – The type key of the current type.

  • TypeName – The name of the current type.

  • ParentType – The name of the ParentType