skillfed

apache-tvm-ffi

tvm ffi

apache-tvm-ffi v0.1.13.post3 7.8M downloads/30d#1,689 on PyPI445
Permissive license Apache 2.0 Active released

What it is and what it does

Apache TVM FFI is an open ABI and FFI standard designed to let machine learning libraries, kernel DSLs, and runtimes interoperate across frameworks without recompilation. It defines a stable C ABI for exposing kernels and extensions, and provides Python bindings with zero-copy tensor interchange via the DLPack protocol. The package enables a single compiled wheel to work across PyTorch, JAX, CuPy, and NumPy, and supports multi-language bindings (Python, C++, Rust). It is currently in RFC status, meaning the core ABI is stable but the project is actively gathering community feedback before moving to semantic versioning.

The package depends only on typing-extensions and is available as pre-built wheels for modern Python versions (3.10–3.14) across Linux, macOS, and Windows. It is intended for kernel library authors, DSL framework developers, and ML infrastructure teams who need a framework-agnostic way to ship optimized code and integrate with multiple downstream consumers.

Use it for:

  • Ship a single compiled kernel library wheel that works with PyTorch, JAX, and CuPy without rebuilding
  • Expose a custom kernel DSL (like TileLang or cuteDSL) through a stable ABI for consumption by multiple frameworks
  • Build ML infrastructure that accepts ABI-compliant extensions from third-party kernel libraries
  • Enable zero-copy tensor passing between PyTorch and JAX using DLPack without data copying
  • Integrate generated code from coding agents into production ML systems via a unified ABI

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a stable, minimal C ABI and FFI for machine learning systems to expose kernels, DSLs, and runtime extensions across frameworks like PyTorch, JAX, and NumPy with zero-copy interop.

Yes, if you are building or consuming ML kernel libraries or DSLs that need to work across multiple frameworks. The stable C ABI, zero-copy interop, and multi-language support make it a solid choice for infrastructure teams. However, be aware that the project is in RFC stage and may evolve; if you require absolute API stability, wait for the first semantic-versioning release. No known security vulnerabilities.

Install

apache-tvm-ffi on PyPI

pip

pip install apache-tvm-ffi

uv

uv add apache-tvm-ffi

poetry

poetry add apache-tvm-ffi

Installing apache-tvm-ffi

Before you install

Medium install friction due to platform-specific wheels for multiple Python versions (3.10–3.14) and architectures (x86_64, aarch64, arm64, Windows). Active maintenance with a release 4 days old and recent commits; early-stage RFC status means the ABI is stable but the project is still soliciting community feedback.

License in practice

Apache 2.0 permissive license allows use in most commercial and open-source projects without significant restriction, though derivative works must include license notices.

Quickstart

pip install apache-tvm-ffi

import tvm.ffi
# Use TVM FFI to expose or consume ABI-compliant kernels across frameworks

Requires Python >= 3.9; pre-built wheels available for Python 3.10–3.14 on Linux (manylinux), macOS (arm64), and Windows; other configurations may require building from source.

Verify before relying

  • Whether the RFC stage will introduce breaking C ABI changes before semantic versioning begins
  • Performance overhead of the FFI layer compared to direct framework-specific APIs
  • Completeness of multi-language support (C++, Rust) in the current release

Package facts

License Apache 2.0 (permissive)
Python support supports the current Python release (>=3.9)
Install friction medium — platform-specific wheel
Runtime dependencies 1 — typing-extensions
Maintenance actively maintained — 4 days since the last release
Last repo commit
First released
Downloads 7,843,396/month — #1,689 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: apache_tvm_ffi-0.1.13.post3-cp310-cp310-macosx_11_0_arm64.whl; apache_tvm_ffi-0.1.13.post3-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; apache_tvm_ffi-0.1.13.post3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; apache_tvm_ffi-0.1.13.post3-cp310-cp310-win_amd64.whl; apache_tvm_ffi-0.1.13.post3-cp311-cp311-macosx_11_0_arm64.whl; apache_tvm_ffi-0.1.13.post3-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; apache_tvm_ffi-0.1.13.post3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; apache_tvm_ffi-0.1.13.post3-cp311-cp311-win_amd64.whl; apache_tvm_ffi-0.1.13.post3-cp312-cp312-macosx_11_0_arm64.whl; apache_tvm_ffi-0.1.13.post3-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; apache_tvm_ffi-0.1.13.post3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; apache_tvm_ffi-0.1.13.post3-cp312-cp312-win_amd64.whl; apache_tvm_ffi-0.1.13.post3-cp313-cp313-macosx_11_0_arm64.whl; apache_tvm_ffi-0.1.13.post3-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; apache_tvm_ffi-0.1.13.post3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; apache_tvm_ffi-0.1.13.post3-cp313-cp313-win_amd64.whl; apache_tvm_ffi-0.1.13.post3-cp314-cp314-macosx_11_0_arm64.whl; apache_tvm_ffi-0.1.13.post3-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; apache_tvm_ffi-0.1.13.post3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; apache_tvm_ffi-0.1.13.post3-cp314-cp314t-macosx_11_0_arm64.whl

Keywords: machine learning, inference

Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software License

Tags

machine learning ABI FFIkernel library interoppytorch jax numpy bridgezero-copy tensor interchangeml framework extensiondlpack interoperabilitykernel dsl runtime
ml-interopkernel-libraryffi-abi

More Artificial Intelligence packages