Apache TVM
tvm.apache.org
- Free plan
- Open source
- Windows
- macOS
- Linux
- Web
- iPhone and iPad
- Android
- API
- Self-hosted
What Apache TVM is
Apache TVM is a free, open-source machine learning compilation framework that converts pre-trained models into modules for deployment. It imports models from PyTorch, ONNX, and TensorFlow Lite, and its optimization process can be customized in Python without rebuilding the TVM stack. Users can combine optimization passes, libraries, and code generation. Supported targets include CPU and GPU as well as Metal, ROCm, Vulkan, OpenCL, x86, ARM, and WebAssembly. A lightweight runtime can execute compiled code in JavaScript, Java, Python, and C++ on Android, iOS, Raspberry Pi, and web browsers. Installation options include PyPI, source builds, and Docker images; cross-compilation and RPC deployment cover ARM, x86, RISC-V, embedded systems, and accelerator devices. The default generated binary uses a minimal runtime API and limited system calls such as malloc. A key security constraint is the RPC server: it assumes trusted users and networks, and API users can write arbitrary files and gain full remote code execution. Apache TVM is licensed under Apache License 2.0.
Who it suits
Apache TVM suits machine learning developers who need to compile pre-trained models for varied deployment targets. Its RPC server should be used only where users and networks are trusted.
Good to know, and what to watch
- Imports PyTorch, ONNX, and TensorFlow Lite models.
- Optimization can be customized in Python.
- Supports CPU, GPU, and several other backends.
- Available free under Apache License 2.0.
- RPC assumes trusted users and networks.
- RPC API users can write files and run code remotely.
Plans
Every plan and priceApache TVM
Free plan
Getting started
- Open the Apache TVM website
- Install TVM from PyPI, build it from source, or use a Docker image
- Import a model from PyTorch, ONNX, or TensorFlow Lite
- Customize and compose optimization passes in Python
- Compile for the required CPU, GPU, mobile, browser, embedded, or accelerator target
- Deploy through the supported runtime or RPC workflow
The verdict
Apache TVM offers customizable compilation and a wide range of deployment targets at no cost. Its RPC interface carries substantial trust requirements, so its security constraint deserves attention before deployment.
Questions people ask
Is Apache TVM free?
Yes. The listed Apache TVM plan is free, and it is open-source under Apache License 2.0.
Which model formats can it import?
TVM supports model importers for PyTorch, ONNX, and TensorFlow Lite.
Which platforms and targets are supported?
Listed platforms include Android, iOS, Linux, macOS, Windows, web, APIs, and self-hosted use. Deployment targets include CPU, GPU, Metal, ROCm, Vulkan, OpenCL, x86, ARM, WebAssembly, RISC-V, embedded systems, and accelerator devices.
How can TVM be installed?
Users can install it from PyPI, build it from source, or use Docker images.
Is the RPC server safe for untrusted networks?
The RPC server assumes trusted users and trusted networks. API users can write arbitrary files and obtain full remote code execution.
What the maker publishes
- Build requirements
- Source builds require CMake 3.24 or newer, LLVM preferably 15 or newer, Git, a C++20 compiler and Python 3.10 or newer. source
- Code-generation backends
- Documented code generators include LLVM, CUDA, ROCm, NVPTX, Metal, OpenCL, Vulkan, WebGPU and C. source
- Community and support
- The project provides contributor guidance, community guidelines, code reviews, testing guidance, release processes and a security guide. source
- Composable optimization
- The optimization process supports composing new optimization passes, libraries and codegen. source
- Composable optimization
- TVM combines graph optimizations such as operator fusion and layout rewrites with tensor-program optimization. source
- Cross compilation
- TVM supports cross-compilation and RPC deployment to ARM, x86, RISC-V, embedded systems and accelerator devices. source
- Cross compilation
- TVM can compile for a target device even when that physical device is absent from the build machine if its toolchain is available. source
- Deployment backends
- TVM supports CPU, GPU and emerging backends, including Metal, ROCm, Vulkan, OpenCL, x86, ARM and WebAssembly. source
- Documentation depth
- The documentation is organized into getting-started guides, how-to tutorials, deep dives, API references, architecture material and contributor guidance. source
- Independent performance result
- A peer-reviewed paper reported TVM quantized-network speedups of 2.35x on Intel Xeon, 2.15x on Nvidia T4, 1.35x on Raspberry Pi 3 and 1.40x on Raspberry Pi 4 versus optimized FP32 execution. source
- Independent teaching material
- UC San Diego course slides describe TVM as highly general with many tools and target processors but warn that numerous optimization choices make optimal instruction generation complex. source
- Installation
- Users can install TVM from PyPI, build it from source or use Docker images. source
- Installation options
- Official installation paths are PyPI wheels, source builds and Docker images. source
- Licence
- The repository states that TVM is licensed under Apache License 2.0. source
- Limit: learning curve
- ToolDirectory reviewers said TVM requires compiler and hardware knowledge and has a steep learning curve. source
- Limit: tuning and debugging
- ToolDirectory reviewers described tuning and debugging as potentially time-consuming and brittle. source
- Maker headquarters
- The Apache Software Foundation lists 1000 N West Street, Suite 1200, Wilmington, Delaware 19801, U.S.A. as its mailing address. source
- Maker legal entity
- The Apache Software Foundation is a U.S. 501(c)(3) nonprofit public charity formed in 1999. source
- Mobile and browser runtime
- Its lightweight runtime can run compiled code in JavaScript, Java, Python and C++ on Android, iOS, Raspberry Pi and web browsers. source
- Model importers
- TVM supports importing models from PyTorch, ONNX and TensorFlow Lite. source
- Model imports
- Official frontends support PyTorch, ONNX and TensorFlow Lite models. source
- Praise: hardware breadth
- ToolDirectory reviewers praised compilation across mobile, edge, accelerators and TPUs. source
- Praise: scheduling control
- ToolDirectory reviewers praised fine-grained control over compute scheduling and memory layout. source
- Project origin
- TVM began as a research project at the University of Washington's Paul G. Allen School and later joined the Apache incubator. source
Checked against the maker's pages on 15 Oct 2026.