build(python)!: require CMake 3.26 for ABI-aware builds (#661) Architecture: - Split Python interpreter discovery from development-component discovery so the extension ABI is known before CMake resolves link targets. - Detect Py_GIL_DISABLED with the selected interpreter, pin its exact version, and request only the development components used by that ABI branch. - Set CMake 3.26 as the project minimum, matching the first release that provides Development.SABIModule and python_add_library(USE_SABI). Public Interfaces: - Standard CPython 3.12 and newer requires Development.Module and Development.SABIModule and produces an abi3 extension. - Free-threaded CPython and CPython older than 3.12 require only Development.Module and produce a version-specific extension with SOABI. - Building the root project now requires CMake 3.26 or newer. Runtime APIs and the stable TVM FFI C ABI are unchanged. UI/UX: - none Behavioral Changes: - Stop requiring stable-ABI development artifacts for configurations that cannot use the Limited API, including free-threaded CPython. - Preserve the existing abi3 path for standard CPython 3.12 and newer while allowing declared cp314t builds to configure against their native ABI. - Fail early with an explicit CMake version requirement instead of reaching unsupported FindPython components or USE_SABI options on older CMake. Docs: - Raise the CMake prerequisite to 3.26 in the source-build guide, AGENTS.md, and the tracked developer-tool reference. Tests: - Executed: staged pre-commit hooks, isolated CMake configuration for the C++ project, and isolated CMake configuration with the Python module enabled. - Result: all executed checks passed. Untested Edge Cases: - Free-threaded CPython, Windows, and Python versions older than 3.12 were not available locally; their component selection remains covered by the explicit CMake branches and should be exercised in CI. - Compilation, wheel creation, and the full unit-test suites were not rerun because this commit changes configuration and dependency selection only. BREAKING CHANGE: Building TVM FFI now requires CMake 3.26 or newer. Upgrade CMake before configuring either the standalone C++ project or Python package.
📚 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:
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.
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
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.
Our documentation site includes: