Revert "feat: Add `tvm_ffi.Function.__init__`" (#406)

Reverts apache/tvm-ffi#395

This PR breaks a downstream (wrong) usecase. Let's revert it for now and
table it for a bit
4 files changed
tree: d3207a5307f48ac749d9243e76ac236ea73f89b5
  1. .github/
  2. 3rdparty/
  3. addons/
  4. cmake/
  5. docs/
  6. examples/
  7. include/
  8. licenses/
  9. python/
  10. rust/
  11. src/
  12. tests/
  13. .asf.yaml
  14. .clang-format
  15. .clang-tidy
  16. .cmake-format.json
  17. .gitignore
  18. .gitmodules
  19. .markdownlint-cli2.yaml
  20. .pre-commit-config.yaml
  21. .yamllint.yaml
  22. CMakeLists.txt
  23. CONTRIBUTING.md
  24. KEYS
  25. LICENSE
  26. NOTICE
  27. pyproject.toml
  28. 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][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

Visit our documentation to learn more.

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.