test(python): add regression test for register_object __init__ wiring (#493)

## Summary

Add a regression test for the `register_object` `__init__` wiring that
prevents a NULL-handle segfault.

## Root Cause

`CObject` (Cython extension type) has a custom `tp_new`, so CPython's
`object.__init__` silently ignores extra positional arguments. Before
`_install_init` was wired into `register_object` (#491), calling
`TestIntPair(1, 2)` fell through to `object.__init__`, producing
`chandle = NULL`. Any subsequent field access (e.g. `pair.a`)
dereferences `chandle + field_offset` → **segfault**.

## Test Coverage

The new `test_register_object_wires_init` verifies:

1. Construction via the wired `__init__` yields a live (non-NULL) handle
with correct field values.
2. `__new__` alone leaves `chandle` at 0, confirming `__init__` is the
only path that creates the C++ object.

The test does not exercise the actual segfault (which would crash the
runner); the NULL-handle assertion is the safe proxy.

## Test Plan

- [x] `pytest -xvs
tests/python/test_object.py::test_register_object_wires_init` — passed
1 file changed
tree: 359acf43113c7df8092c6fda140f83bc2e7538dc
  1. .claude/
  2. .github/
  3. 3rdparty/
  4. addons/
  5. cmake/
  6. docs/
  7. examples/
  8. include/
  9. licenses/
  10. python/
  11. rust/
  12. src/
  13. tests/
  14. .asf.yaml
  15. .clang-format
  16. .clang-tidy
  17. .cmake-format.json
  18. .gitignore
  19. .gitmodules
  20. .markdownlint-cli2.yaml
  21. .pre-commit-config.yaml
  22. .yamllint.yaml
  23. CLAUDE.md
  24. CMakeLists.txt
  25. CONTRIBUTING.md
  26. KEYS
  27. LICENSE
  28. NOTICE
  29. pyproject.toml
  30. README.md
README.md

TVM FFI: Open ABI and FFI for Machine Learning Systems

📚 Documentation | 🚀 Quickstart

Apache TVM FFI is an open ABI and FFI for machine learning systems. It is a minimal, framework-agnostic, yet flexible open convention with the following systems in mind:

  • Kernel libraries - ship one wheel to support multiple frameworks, Python versions, and different languages. [FlashInfer]
  • Kernel DSLs - reusable open ABI for JIT and AOT kernel exposure frameworks and runtimes. [TileLang][cuteDSL]
  • Frameworks and runtimes - a uniform extension point for ABI-compliant libraries and DSLs. [PyTorch][JAX][PaddlePaddle][NumPy/CuPy]
  • ML infrastructure - out-of-box bindings and interop across languages. [Python][C++][Rust]
  • Coding agents - a unified mechanism for shipping generated code in production.

Features

  • Stable, minimal C ABI designed for kernels, DSLs, and runtime extensibility.
  • Zero-copy interop across PyTorch, JAX, and CuPy using DLPack protocol.
  • Compact value and call convention covering common data types for ultra low-overhead ML applications.
  • Multi-language support out of the box: Python, C++, and Rust (with a path towards more languages).

These enable broad interoperability across frameworks, libraries, DSLs, and agents; the ability to ship one wheel for multiple frameworks and Python versions (including free-threaded Python); and consistent infrastructure across environments.

Getting Started

Install TVM-FFI with pip, uv or from source:

pip install apache-tvm-ffi
pip install torch-c-dlpack-ext  # compatibility package for torch <= 2.9

Status and Release Versioning

C ABI stability is our top priority.

Status: RFC Main features are complete and ABI stable. We recognize potential needs for evolution to ensure it works best for the machine learning systems community, and would like to work together with the community for such evolution. We plan to stay in the RFC stage for three months from the v0.1.0 release.

Releases during the RFC stage will be 0.X.Y, where bumps in X indicate C ABI-breaking changes and Y indicates other changes. We anticipate the RFC stage will last for three months, then we will start following Semantic Versioning (major.minor.patch) going forward.

Documentation

Our documentation site includes:

Get Started

Guides

Concepts

Packaging

Developer Manual