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
这是什么?Apache TVM 是一个开源的机器学习编译器框架,能把训练好的模型转换成经过优化、可部署的代码,适用于多种硬件目标。
TVM 是一次性使用的工具,还是我可以用来搭建编译流水线的框架?它是一个以 Python 为核心的编译器框架,而不是单一的命令行工具。你可以用 Python 自定义并组装自己的机器学习编译流水线,它甚至可以作为基础,用来构建面向特定领域的“垂直编译器”,例如面向大语言模型的编译器。
我该如何开始使用 TVM?先访问 TVM 官方文档网站,那里有安装说明、教程和示例,其中包括专门的 'Getting Started with TVM' 教程。
使用 TVM 需要懂 Python 吗?需要。TVM 的设计以 Python 为核心,因此对编译流水线的大部分定制都在 Python 中完成,不需要深入了解其 C++ 内部实现。
TVM 支持哪些硬件后端?TVM 面向通用部署设计,支持多种后端,包括 Metal、OpenCL、ROCm、Vulkan/SPIRV 和 CUDA 等 GPU 路径,同时也支持标准 CPU。
什么是 TensorIR 和 Relax?TensorIR 是 TVM 的张量级中间表示,用于表示和优化底层程序;Relax 则是图级中间表示。二者结合起来,让 TVM 能够用 Python 联合优化计算图、张量程序和库。
TVM 的设计思路来自哪里?TVM 最初是一个深度学习编译的研究项目,借鉴了 Halide 的循环降低与算术化简、Loopy 的整数集循环分析,以及 Theano 的符号化 scan 设计,之后才发展成如今的跨层级架构。
TVM 只适用于经典的深度学习模型吗?不是。除了标准的深度学习模型,该项目还将自己定位为构建其他领域 Python 优先垂直编译器的基础,并明确提到大语言模型是其目标应用场景之一。
What are similar projects?mlc-llm, burn, pytorch, qxotic, MNN, DeepGEMM, lectures, tilelang
Creator
apache
Size
161.3 MB
Stars
13.8K
Age
10y
Commits · 90 Days