Repolode
apache

apache/tvm

An open machine learning compilation framework that lets developers customize compiler pipelines in Python and deploy models to many hardware targets.

Stars
13,853
Forks
4,018
Open issues
358
Last commit
12 hours ago

What is it?

Apache TVM is a machine learning compiler framework that takes trained models and compiles them into deployable modules for different hardware. Its development is Python-first, so most transformations in the compiler pipeline can be customized in Python rather than modifying the C++ core.

The project uses a cross-level design: TensorIR serves as the tensor-level representation for low-level operator programs, while Relax serves as the graph-level representation for computational graphs. This lets graph optimizations and tensor program optimizations be applied together, and also allows integration with external libraries.

TVM is also positioned as infrastructure for building domain-specific compilers, with LLMs mentioned as one example. Its topics indicate support for backends such as CUDA-adjacent GPU stacks, OpenCL, Vulkan, Metal, ROCm and WebAssembly-style JavaScript targets.

Key features

  • 01Python-first customization of compiler transformation pipelines.
  • 02TensorIR for tensor-level program representation.
  • 03Relax for graph-level representation of computational graphs.
  • 04Joint optimization of graphs, tensor programs and external libraries.
  • 05Targets GPU backends including OpenCL, Vulkan, Metal and ROCm.

Use cases

  • Deploying a trained deep learning model to varied hardware such as GPUs or edge devices.
  • Building a custom ML compiler for a specific domain or model family.
  • Researching new tensor program optimizations in Python.
  • Compiling models to run in browsers or JavaScript environments.

Quick start

  1. 1

    Read the installation instructions on the TVM documentation site

  2. 2

    Follow the Getting Started with TVM tutorial

Topics

FAQ

What is tvm?
An open machine learning compilation framework that lets developers customize compiler pipelines in Python and deploy models to many hardware targets. Apache TVM is a machine learning compiler framework that takes trained models and compiles them into deployable modules for different hardware. Its development is Python-first, so most transformations in the compiler pipeline can be customized in Python rather than modifying the C++ core.
Is tvm free to use? What license does it have?
tvm is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is tvm still maintained?
Actively maintained. The last commit to tvm was on Oct 21, 2026.
What can I use tvm for?
Deploying a trained deep learning model to varied hardware such as GPUs or edge devices. Building a custom ML compiler for a specific domain or model family. Researching new tensor program optimizations in Python. Compiling models to run in browsers or JavaScript environments.
How do I install tvm?
Read the installation instructions on the TVM documentation site Follow the Getting Started with TVM tutorial
Where can I get tvm?
The source code and installation instructions are on GitHub: https://github.com/apache/tvm

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects