Look up __ffi_init__ from the TypeAttrColumn and call it via __init_handle_by_constructor__.
(obj: Any, *args: Any)
| 54 | |
| 55 | |
| 56 | def _ffi_init(obj: Any, *args: Any) -> None: |
| 57 | """Look up __ffi_init__ from the TypeAttrColumn and call it via __init_handle_by_constructor__.""" |
| 58 | type_index = type(obj).__tvm_ffi_type_info__.type_index |
| 59 | ffi_init = core._lookup_type_attr(type_index, "__ffi_init__") |
| 60 | assert ffi_init is not None, f"No __ffi_init__ TypeAttrColumn entry for {type(obj)}" |
| 61 | obj.__init_handle_by_constructor__(ffi_init, *args) |
| 62 | |
| 63 | |
| 64 | def _field_map(type_cls: type) -> dict[str, Any]: |
no outgoing calls
no test coverage detected