tvm README

The project's README from github.com/apache/tvm. As one markdown file: README.md.

Open Machine Learning Compiler Framework

Documentation | Contributors | Community | Release Notes

Apache TVM is an open machine learning compilation framework, following the following principles:

License

TVM is licensed under the Apache-2.0 license.

Getting Started

Check out the TVM Documentation site for installation instructions, tutorials, examples, and more. The Getting Started with TVM tutorial is a great place to start.

Contribute to TVM

TVM adopts the Apache committer model. We aim to create an open-source project maintained and owned by the community. Check out the Contributor Guide.

History and Acknowledgement

TVM started as a research project for deep learning compilation. The first version of the project benefited a lot from the following projects:

Since then, the project has gone through several rounds of redesigns. The current design is also drastically different from the initial design, following the development trend of the ML compiler community.

The most recent version focuses on a cross-level design with TensorIR as the tensor-level representation and Relax as the graph-level representation and Python-first transformations. The project's current design goal is to make the ML compiler accessible by enabling most transformations to be customizable in Python and bringing a cross-level representation that can jointly optimize computational graphs, tensor programs, and libraries. The project is also a foundation infra for building Python-first vertical compilers for domains, such as LLMs.

tvm (apache/tvm)

Searching Database…

13.8K ·GitHub
What is this?Apache TVM is an open machine learning compiler framework that turns trained models into optimized, deployable code for a wide range of hardware targets.
Is TVM a one-off tool or a framework I build compiler pipelines with?It's a Python-first compiler framework, not a single CLI tool — you customize and assemble your own ML compilation pipeline in Python, and it can even serve as a base for building domain-specific 'vertical compilers' such as ones for LLMs.
How do I get started with TVM?Start at the official TVM Documentation site, which has installation instructions, tutorials and examples, including a dedicated 'Getting Started with TVM' tutorial.
Do I need to know Python to use TVM?Yes — TVM's design is Python-first, so most customization of the compiler pipeline is done in Python rather than requiring deep knowledge of its C++ internals.
Which hardware backends does TVM target?TVM is built for universal deployment and targets many backends, including GPU paths like Metal, OpenCL, ROCm, Vulkan/SPIRV and CUDA, on top of standard CPUs.
What is TensorIR and Relax?TensorIR is TVM's tensor-level IR for representing and optimizing low-level programs, while Relax is the graph-level IR; together they let TVM jointly optimize computational graphs, tensor programs, and libraries in Python.
Where did TVM's design come from?TVM started as a research project for deep learning compilation and drew ideas from Halide's loop lowering and arithmetic simplification, Loopy's integer-set loop analysis, and Theano's symbolic scan design, before evolving into its current cross-level architecture.
Is TVM only useful for classic deep learning models?No — beyond standard DL models, the project positions itself as a foundation for building Python-first vertical compilers for other domains, explicitly mentioning LLMs as a target use case.
What are similar projects?mlc-llm, burn, pytorch, qxotic, MNN, DeepGEMM, lectures, tilelang
Creator
apache
Size
161.9 MB
Stars
13.8K
Age
10y
Commits · 90 Days