Open Machine Learning Compiler Framework

Clone this repo:
  1. 84657c0 [Relax][Frontend][ONNX] Lower ThresholdedRelu with where in the input dtype (#20861) by Dundy Pasupuleti · 2 days ago main
  2. f53a340 [Fix][Relax] Preserve the flattened order of repeat in ConvertLayout (#21110) by Javier De Jesus · 2 days ago
  3. 958f45a [Relax][TVMScript] Keep metadata for bare constant If-branch bodies (#20946) by Neo Chien · 2 days ago
  4. 1091f2f [Fix][Metal] Fit wide FP32 prefill attention in shared memory (#21002) by Julian Ng-Thow-Hing · 9 days ago
  5. 3d89c49 [Relax][ONNX] Support constant output_shape input in MaxUnpool (#21000) by Neo Chien · 11 days ago

Open Machine Learning Compiler Framework

Documentation | Contributors | Community | Release Notes

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

  • Python-first development that enables quick customization of machine learning compiler pipelines.
  • Universal deployment to bring models into minimum deployable modules.

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:

  • Halide: Part of TVM's TIR and arithmetic simplification module originates from Halide. We also learned and adapted some parts of the lowering pipeline from Halide.
  • Loopy: use of integer set analysis and its loop transformation primitives.
  • Theano: the design inspiration of symbolic scan operator for recurrence.

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.