# apache/tvm

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/apache-tvm).**

13,132 stars · 3,791 forks · Python · apache-2.0

## Links

- GitHub: https://github.com/apache/tvm
- Homepage: https://tvm.apache.org/
- awesome-repositories: https://awesome-repositories.com/repository/apache-tvm.md

## Topics

`compiler` `deep-learning` `gpu` `javascript` `machine-learning` `metal` `opencl` `performance` `rocm` `spirv` `tensor` `tvm` `vulkan`

## Description

TVM is a machine learning compiler framework designed to convert deep learning models from various frameworks into optimized machine code. It functions as a cross-platform deployment engine that transforms high-level model definitions into efficient, hardware-specific binaries for diverse computing architectures.

The system utilizes a multi-level compilation pipeline that decouples algorithm logic from hardware implementation through tensor-operator abstractions. It employs a graph-level intermediate representation to perform cross-operator optimizations and memory planning before lowering computations to target-specific instructions. To maximize performance, the framework includes an automated schedule space search that explores potential loop transformations and hardware mappings, alongside a lightweight virtual machine runtime for consistent model execution.

This toolkit supports the deployment of computational workloads across a wide range of devices, including CPUs, GPUs, and specialized accelerators. It provides capabilities for cross-compiling models for various operating systems and processor architectures, facilitating the development of high-performance machine learning applications for resource-constrained edge devices.

## Tags

### Artificial Intelligence & ML

- [Compilers](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-optimization-and-inference/training-algorithms/machine-learning-optimization/compilers.md) — Converts deep learning models from various frameworks into optimized machine code for diverse hardware backends.
- [Model Compilers](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/frameworks/training-systems/model-performance-optimizations/model-compilers.md) — Converts complex neural network models into highly efficient, hardware-optimized machine code. ([source](https://tvm.apache.org/docs/))
- [Machine Learning Model Portability](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-management/machine-learning-model-portability.md) — Converts deep learning models from various frameworks into optimized machine code for efficient execution on diverse hardware.
- [Deep Learning Optimization](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-optimization-and-inference/training-algorithms/deep-learning-optimization.md) — Provides a toolkit for scheduling and tuning computational graphs to maximize execution speed on CPUs, GPUs, and accelerators.
- [Edge AI Model Deployment](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-deployment-and-serving/local-and-on-device-inference/edge-ai-model-deployment.md) — Optimizes memory usage and computational throughput to deploy high-performance models onto resource-constrained edge devices.
- [Hardware Optimization Tools](https://awesome-repositories.com/f/artificial-intelligence-ml/hardware-optimization-tools.md) — Maximizes processing speed by tuning scheduling strategies and hardware settings for complex computational workloads on specialized devices.
- [Model Performance Optimizations](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/frameworks/training-systems/model-performance-optimizations.md) — Adjusts hardware settings and scheduling strategies to maximize processing speed and resource efficiency for computational workloads. ([source](https://tvm.apache.org/docs/))
- [Tensor Computation Primitives](https://awesome-repositories.com/f/artificial-intelligence-ml/tensor-computation-primitives.md) — Defines mathematical operations as tensor computation primitives to decouple algorithm logic from low-level hardware implementation.

### DevOps & Infrastructure

- [Deployment Engines](https://awesome-repositories.com/f/devops-infrastructure/cross-platform-deployment-targets/deployment-engines.md) — Functions as a cross-platform deployment engine that transforms high-level model definitions into efficient, hardware-specific binaries.
- [Cross-Platform Deployment Targets](https://awesome-repositories.com/f/devops-infrastructure/cross-platform-deployment-targets.md) — Generates executable binaries for various processor architectures to ensure consistent model performance across different computing environments. ([source](https://tvm.apache.org/docs/))

### Development Tools & Productivity

- [Hardware-Specific Binaries](https://awesome-repositories.com/f/development-tools-productivity/build-tooling/build-orchestration-logic/build-orchestration-configuration/build-automation-systems/build-systems/binary-compilation-toolchains/server-binary-compilers/hardware-specific-binaries.md) — Translates optimized tensor operations into target-specific instructions for efficient execution on varied processors.

### Web Development

- [Automated Tuners](https://awesome-repositories.com/f/web-development/performance-optimizations/computational-parallelization/parallel-gpu-schedulers/automated-schedulers/automated-tuners.md) — Provides an automated tuner that explores loop transformations and hardware mappings to optimize computational execution strategies.

### Part of an Awesome List

- [Performance Optimization](https://awesome-repositories.com/f/awesome-lists/ai/performance-optimization.md) — Deep learning compiler stack for diverse hardware accelerators.

### Programming Languages & Runtimes

- [Intermediate Representations](https://awesome-repositories.com/f/programming-languages-runtimes/compiler-interpreter-internals/compiler-infrastructure/intermediate-representations.md) — Utilizes a graph-level intermediate representation to perform cross-operator optimizations and memory planning before lowering to hardware-specific code.
- [Multi-Level Pipelines](https://awesome-repositories.com/f/programming-languages-runtimes/source-code-compilers/multi-target-compilers/multi-level-pipelines.md) — Implements a multi-level compilation pipeline that progressively lowers model graphs into optimized machine code.
- [Virtual Machines](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-execution-environments/runtime-environments/execution-engines/virtual-machines.md) — Employs a lightweight virtual machine runtime to manage model loading and operator dispatching across different hardware targets.
