Function tvm::ffi::CreateEmptyObject#
Defined in File creator.h
Function Documentation#
-
inline ObjectPtr<Object> tvm::ffi::CreateEmptyObject(const TVMFFITypeInfo *type_info)#
Create an empty object via the type’s native creator or
__ffi_new__type attr.Falls back to the
__ffi_new__type attribute (used by Python-defined types) when the nativemetadata->creatoris NULL.- Parameters:
type_info – The type info for the object to create.
- Throws:
RuntimeError – if neither creator nor ffi_new is available.
- Returns:
An owned ObjectPtr to the newly allocated (zero-initialized) object.