cyx-6 commented on PR #593: URL: https://github.com/apache/tvm-ffi/pull/593#issuecomment-4978725670
some other questions: > Trying to understand this - it means id-consistency is not guaranteed for tensors? `Tensors` deliberately don't bind as canonical (a chandle may be wrapped more than once per arg-setter), so is identity isn't guaranteed for them; FFI returns still route through `make_ret_object`. > A quick question: what objects will use the builtin allocator defined in C++? If we use import tvm_ffi, what objects do not have the desired property (i.e., created before we register the python custom allocator for tvm-ffi). Any object whose wrapper class derives from `CObject` and is registered via `@register_object` / `@c_class` / `@py_class` gets it — that's the sole gate in `_update_registry`. Since `core.pyx` registers the Python allocator at `import tvm_ffi` before any type is registered, effectively all Python-visible FFI objects qualify; the builtin C++ allocator only backs objects created during C++ static init or by non-Python frontends (plus `String/Bytes/Shape/Tensor`, which intentionally don't tie). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
