tvm_ffi.register_object#
- tvm_ffi.register_object(type_key=None)[source]#
Register object type.
- Parameters:
type_key (
str|None, default:None) – The type key of the node. It requirestype_keyto be registered already on the C++ side. If not specified, the class name will be used.- Return type:
Callable[[TypeVar(_T, bound=type)],TypeVar(_T, bound=type)]
Examples
The following code registers MyObject using type key “test.MyObject”, if the type key is already registered on the C++ side.
@tvm_ffi.register_object("test.MyObject") class MyObject(Object): pass