README 未提供安装命令,需按官方文档自行编译或安装;具体依赖与后端要求 README 未说明
tvm
apacheApache-2.0活跃维护把深度学习模型编译到 CPU、GPU 及各类加速器上运行的开源编译器框架,通过统一中间表示和自动调优提升推理性能。
Open Machine Learning Compiler Framework
README 未给出安装命令,安装步骤见官方文档 https://tvm.apache.org/docs/README 未说明
开源机器学习编译框架,用 Python 把模型编译成最小可部署模块
把深度学习模型编译到 CPU、GPU 及各类加速器上运行的开源编译器框架,通过统一中间表示和自动调优提升推理性能。
核心能力
- 以 TensorIR 做张量级表示、Relax 做图级表示
- 跨层联合优化计算图、张量程序与库
- Python-first 开发,编译流水线可在 Python 中定制
- 支持把模型打包成最小可部署模块
- 可作为构建 LLM 等领域垂直编译器的基础设施
容易踩的坑
- v0.27.0.post1最新正式版2026-09-29 · 2026-09-29 19:11 UTC
What's Changed
- [FIX][TIRx][CUDA] Support low-precision, tensor-map and cluster kernels in CUDA-host bundles by @spectrometerHBH in https://github.com/apache/tvm/pull/20489
Full Changelog: https://github.com/apache/tvm/compare/v0.27.0.rc1...v0.27.0.post1
- v0.27.02026-09-25 · 2026-09-25 18:40 UTC
查看更新说明
What's Changed
- [Web] Bump tvmjs version to 0.27.0-dev0 on main by @MasterJH5574 in https://github.com/apache/tvm/pull/20095
- [Fix][Relax][ONNX] Handle Split initializer with keep_params_in_input by @hahalfx in https://github.com/apache/tvm/pull/20091
- [Fix][Arith] Isolate Z3 contexts and make memoization deterministic by @tlopex in https://github.com/apache/tvm/pull/20097
- [Fix][TIRx] Fix MSVC build of IndexDataTypeNormalizer by @MasterJH5574 in https://github.com/apache/tvm/pull/20098
- [Python] Bump apache-tvm-ffi floor to >=0.1.13.post2 by @MasterJH5574 in https://github.com/apache/tvm/pull/20094
- [FIX][TIRx] Traverse pointer expressions in tile calls by @jinhongyii in https://github.com/apache/tvm/pull/20089
- [FIX][TIRx] Remap typed buffer expressions during specialization by @jinhongyii in https://github.com/apache/tvm/pull/20090
- [FIX][Relax][ONNX] Keep the static shape of a rank-0 Shape input by @adityasingh2400 in https://github.com/apache/tvm/pull/20092
- [FIX][TIRx] Use typed buffer parameter in pointer config test by @tqchen in https://github.com/apache/tvm/pull/20102
- [FIX][CUDA] Select NVRTC architecture for output format by @jinhongyii in https://github.com/apache/tvm/pull/20100
- [TIRx][CUDA] Add a table-driven PTX dialect and retire tirx.ptx.* by @spectrometerHBH in https://github.com/apache/tvm/pull/20103
- [BugFix][Metal] Preserve pointer address spaces for byte offsets by @GY-Bai in https://github.com/apache/tvm/pull/20101
- [TIRx][CUDA] uint32 index dtypes, directive fixes, and PTX ISA coverage by @spectrometerHBH in https://github.com/apache/tvm/pull/20110
- [SCRIPT] Support PEP 695 symbolic variables in Relax and TIR by @tqchen in https://github.com/apache/tvm/pull/20107
- [Fix][WebGPU] Preserve read-only buffer access modes by @akaashrp in https://github.com/apache/tvm/pull/20113
- [Relax][ONNX] Support lower-rank PRelu slopes by @Aharrypotter in https://github.com/apache/tvm/pull/20115
- [TIRX] Split backend.cuda.intrinsics, fold tcgen05 descriptors, and fix two PTX dialect gaps by @spectrometerHBH in https://github.com/apache/tvm/pull/20120
- [Feature][Relax] Support shared-KV attention with configurable sliding windows by @akaashrp in https://github.com/apache/tvm/pull/20121
- [Web] Avoid redundant memory byte copies by @akaashrp in https://github.com/apache/tvm/pull/20127
- [TIRx][CUDA] Replace source helpers with typed PTX forms by @jinhongyii in https://github.com/apache/tvm/pull/20140
- [Fix][DLight] Reject GEMV accesses unsupported by scheduling by @akaashrp in https://github.com/apache/tvm/pull/20122
- [Fix][Relax][ONNX] Fold Min/Max/Sum/Mean constants elementwise by @aryanputta in https://github.com/apache/tvm/pull/20119
- [Relax][Frontend][TFLite] Support StableHLO shape ops by @Aharrypotter in https://github.com/apache/tvm/pull/20114
- [TIRx][CUDA] Version-gate CUDA 12.8 tensor-map enums and fix registry-test lock leak by @spectrometerHBH in https://github.com/apache/tvm/pull/20154
- [TIRx][CUDA] Add PTX address expressions with immediate byte offsets by @spectrometerHBH in https://github.com/apache/tvm/pull/20153
- [Fix][DLight] Handle rank-one GEMV cache loads by @SamJSui in https://github.com/apache/tvm/pull/20158
- [Relax][ONNX] Support scalar QDQ inputs by @Aharrypotter in https://github.com/apache/tvm/pull/20126
- [BugFix][TE] Initialize nested reductions at the outermost reduction scope by @Gunse11er in https://github.com/apache/tvm/pull/20116
- [Fix][Relax] Track lowered reshape storage aliases by @akaashrp in https://github.com/apache/tvm/pull/20134
- [Fix][WebGPU] Validate and bound symbolic stack allocations by @akaashrp in https://github.com/apache/tvm/pull/20132
- [Web] Avoid tensor-cache record copies by @akaashrp in https://github.com/apache/tvm/pull/20156
- [Fix][TOPI] Fuse GPU scan blocks to avoid CUDA gridDim.y overflow by @chenmiaoming in https://github.com/apache/tvm/pull/20108
- [TIRx][CUDA] Add register and cluster launch cont
- v0.27.0.rc1pre-release2026-09-22 · 2026-09-22 03:24 UTC
查看更新说明
What's Changed
- [Web] Bump tvmjs version to 0.27.0-dev0 on main by @MasterJH5574 in https://github.com/apache/tvm/pull/20095
- [Fix][Relax][ONNX] Handle Split initializer with keep_params_in_input by @hahalfx in https://github.com/apache/tvm/pull/20091
- [Fix][Arith] Isolate Z3 contexts and make memoization deterministic by @tlopex in https://github.com/apache/tvm/pull/20097
- [Fix][TIRx] Fix MSVC build of IndexDataTypeNormalizer by @MasterJH5574 in https://github.com/apache/tvm/pull/20098
- [Python] Bump apache-tvm-ffi floor to >=0.1.13.post2 by @MasterJH5574 in https://github.com/apache/tvm/pull/20094
- [FIX][TIRx] Traverse pointer expressions in tile calls by @jinhongyii in https://github.com/apache/tvm/pull/20089
- [FIX][TIRx] Remap typed buffer expressions during specialization by @jinhongyii in https://github.com/apache/tvm/pull/20090
- [FIX][Relax][ONNX] Keep the static shape of a rank-0 Shape input by @adityasingh2400 in https://github.com/apache/tvm/pull/20092
- [FIX][TIRx] Use typed buffer parameter in pointer config test by @tqchen in https://github.com/apache/tvm/pull/20102
- [FIX][CUDA] Select NVRTC architecture for output format by @jinhongyii in https://github.com/apache/tvm/pull/20100
- [TIRx][CUDA] Add a table-driven PTX dialect and retire tirx.ptx.* by @spectrometerHBH in https://github.com/apache/tvm/pull/20103
- [BugFix][Metal] Preserve pointer address spaces for byte offsets by @GY-Bai in https://github.com/apache/tvm/pull/20101
- [TIRx][CUDA] uint32 index dtypes, directive fixes, and PTX ISA coverage by @spectrometerHBH in https://github.com/apache/tvm/pull/20110
- [SCRIPT] Support PEP 695 symbolic variables in Relax and TIR by @tqchen in https://github.com/apache/tvm/pull/20107
- [Fix][WebGPU] Preserve read-only buffer access modes by @akaashrp in https://github.com/apache/tvm/pull/20113
- [Relax][ONNX] Support lower-rank PRelu slopes by @Aharrypotter in https://github.com/apache/tvm/pull/20115
- [TIRX] Split backend.cuda.intrinsics, fold tcgen05 descriptors, and fix two PTX dialect gaps by @spectrometerHBH in https://github.com/apache/tvm/pull/20120
- [Feature][Relax] Support shared-KV attention with configurable sliding windows by @akaashrp in https://github.com/apache/tvm/pull/20121
- [Web] Avoid redundant memory byte copies by @akaashrp in https://github.com/apache/tvm/pull/20127
- [TIRx][CUDA] Replace source helpers with typed PTX forms by @jinhongyii in https://github.com/apache/tvm/pull/20140
- [Fix][DLight] Reject GEMV accesses unsupported by scheduling by @akaashrp in https://github.com/apache/tvm/pull/20122
- [Fix][Relax][ONNX] Fold Min/Max/Sum/Mean constants elementwise by @aryanputta in https://github.com/apache/tvm/pull/20119
- [Relax][Frontend][TFLite] Support StableHLO shape ops by @Aharrypotter in https://github.com/apache/tvm/pull/20114
- [TIRx][CUDA] Version-gate CUDA 12.8 tensor-map enums and fix registry-test lock leak by @spectrometerHBH in https://github.com/apache/tvm/pull/20154
- [TIRx][CUDA] Add PTX address expressions with immediate byte offsets by @spectrometerHBH in https://github.com/apache/tvm/pull/20153
- [Fix][DLight] Handle rank-one GEMV cache loads by @SamJSui in https://github.com/apache/tvm/pull/20158
- [Relax][ONNX] Support scalar QDQ inputs by @Aharrypotter in https://github.com/apache/tvm/pull/20126
- [BugFix][TE] Initialize nested reductions at the outermost reduction scope by @Gunse11er in https://github.com/apache/tvm/pull/20116
- [Fix][Relax] Track lowered reshape storage aliases by @akaashrp in https://github.com/apache/tvm/pull/20134
- [Fix][WebGPU] Validate and bound symbolic stack allocations by @akaashrp in https://github.com/apache/tvm/pull/20132
- [Web] Avoid tensor-cache record copies by @akaashrp in https://github.com/apache/tvm/pull/20156
- [Fix][TOPI] Fuse GPU scan blocks to avoid CUDA gridDim.y overflow by @chenmiaoming in https://github.com/apache/tvm/pull/20108
- [TIRx][CUDA] Add register and cluster launch cont
- v0.27.0.rc0pre-release2026-09-19 · 2026-09-19 03:30 UTC
查看更新说明
What's Changed
- [Web] Bump tvmjs version to 0.27.0-dev0 on main by @MasterJH5574 in https://github.com/apache/tvm/pull/20095
- [Fix][Relax][ONNX] Handle Split initializer with keep_params_in_input by @hahalfx in https://github.com/apache/tvm/pull/20091
- [Fix][Arith] Isolate Z3 contexts and make memoization deterministic by @tlopex in https://github.com/apache/tvm/pull/20097
- [Fix][TIRx] Fix MSVC build of IndexDataTypeNormalizer by @MasterJH5574 in https://github.com/apache/tvm/pull/20098
- [Python] Bump apache-tvm-ffi floor to >=0.1.13.post2 by @MasterJH5574 in https://github.com/apache/tvm/pull/20094
- [FIX][TIRx] Traverse pointer expressions in tile calls by @jinhongyii in https://github.com/apache/tvm/pull/20089
- [FIX][TIRx] Remap typed buffer expressions during specialization by @jinhongyii in https://github.com/apache/tvm/pull/20090
- [FIX][Relax][ONNX] Keep the static shape of a rank-0 Shape input by @adityasingh2400 in https://github.com/apache/tvm/pull/20092
- [FIX][TIRx] Use typed buffer parameter in pointer config test by @tqchen in https://github.com/apache/tvm/pull/20102
- [FIX][CUDA] Select NVRTC architecture for output format by @jinhongyii in https://github.com/apache/tvm/pull/20100
- [TIRx][CUDA] Add a table-driven PTX dialect and retire tirx.ptx.* by @spectrometerHBH in https://github.com/apache/tvm/pull/20103
- [BugFix][Metal] Preserve pointer address spaces for byte offsets by @GY-Bai in https://github.com/apache/tvm/pull/20101
- [TIRx][CUDA] uint32 index dtypes, directive fixes, and PTX ISA coverage by @spectrometerHBH in https://github.com/apache/tvm/pull/20110
- [SCRIPT] Support PEP 695 symbolic variables in Relax and TIR by @tqchen in https://github.com/apache/tvm/pull/20107
- [Fix][WebGPU] Preserve read-only buffer access modes by @akaashrp in https://github.com/apache/tvm/pull/20113
- [Relax][ONNX] Support lower-rank PRelu slopes by @Aharrypotter in https://github.com/apache/tvm/pull/20115
- [TIRX] Split backend.cuda.intrinsics, fold tcgen05 descriptors, and fix two PTX dialect gaps by @spectrometerHBH in https://github.com/apache/tvm/pull/20120
- [Feature][Relax] Support shared-KV attention with configurable sliding windows by @akaashrp in https://github.com/apache/tvm/pull/20121
- [Web] Avoid redundant memory byte copies by @akaashrp in https://github.com/apache/tvm/pull/20127
- [TIRx][CUDA] Replace source helpers with typed PTX forms by @jinhongyii in https://github.com/apache/tvm/pull/20140
- [Fix][DLight] Reject GEMV accesses unsupported by scheduling by @akaashrp in https://github.com/apache/tvm/pull/20122
- [Fix][Relax][ONNX] Fold Min/Max/Sum/Mean constants elementwise by @aryanputta in https://github.com/apache/tvm/pull/20119
- [Relax][Frontend][TFLite] Support StableHLO shape ops by @Aharrypotter in https://github.com/apache/tvm/pull/20114
- [TIRx][CUDA] Version-gate CUDA 12.8 tensor-map enums and fix registry-test lock leak by @spectrometerHBH in https://github.com/apache/tvm/pull/20154
- [TIRx][CUDA] Add PTX address expressions with immediate byte offsets by @spectrometerHBH in https://github.com/apache/tvm/pull/20153
- [Fix][DLight] Handle rank-one GEMV cache loads by @SamJSui in https://github.com/apache/tvm/pull/20158
- [Relax][ONNX] Support scalar QDQ inputs by @Aharrypotter in https://github.com/apache/tvm/pull/20126
- [BugFix][TE] Initialize nested reductions at the outermost reduction scope by @Gunse11er in https://github.com/apache/tvm/pull/20116
- [Fix][Relax] Track lowered reshape storage aliases by @akaashrp in https://github.com/apache/tvm/pull/20134
- [Fix][WebGPU] Validate and bound symbolic stack allocations by @akaashrp in https://github.com/apache/tvm/pull/20132
- [Web] Avoid tensor-cache record copies by @akaashrp in https://github.com/apache/tvm/pull/20156
- [Fix][TOPI] Fuse GPU scan blocks to avoid CUDA gridDim.y overflow by @chenmiaoming in https://github.com/apache/tvm/pull/20108
- [TIRx][CUDA] Add register and cluster launch cont
- v0.26.02026-08-11 · 2026-08-11 01:02 UTC
查看更新说明
What's Changed
- [Relax][PyTorch] Cast non-bool inputs to bool in logical_and converter by @javierdejesusda in https://github.com/apache/tvm/pull/19679
- [CI] Remove PyPI-only tag ref guard from wheel publishing by @tlopex in https://github.com/apache/tvm/pull/19685
- [CI] Target apache-tvm for PyPI wheel publishing by @tlopex in https://github.com/apache/tvm/pull/19686
- [Web] Bump tvmjs version to 0.25.0-dev1 by @akaashrp in https://github.com/apache/tvm/pull/19687
- [Fix] CommReduce could handle 0-dim data by @flashmouse in https://github.com/apache/tvm/pull/19683
- [CI] Pin actions by version tag, trim wheel perms by @MasterJH5574 in https://github.com/apache/tvm/pull/19703
- [Tests] Fix s_tir tests using removed T.block API in TIRx script by @tlopex in https://github.com/apache/tvm/pull/19706
- [CI] Fix release verification script by @MasterJH5574 in https://github.com/apache/tvm/pull/19700
- [Refactor][Meta-schedule] Remove meta-schedule as_string mechanism in favor of default representation by @tlopex in https://github.com/apache/tvm/pull/19709
- [Python] Bump apache-tvm-ffi floor to >=0.1.12 by @MasterJH5574 in https://github.com/apache/tvm/pull/19710
- [Relax][CoreML] Fix CoreML partition pass by @tlopex in https://github.com/apache/tvm/pull/19711
- [Tests] Skip test modules cleanly when optional deps are missing by @tlopex in https://github.com/apache/tvm/pull/19704
- [CI] Merge PR against its target branch instead of main by @MasterJH5574 in https://github.com/apache/tvm/pull/19712
- [CI] Fix CI script test subprocess environment by @tlopex in https://github.com/apache/tvm/pull/19713
- [Codegen][LLVM] Accept splat form in VLA broadcast test by @tlopex in https://github.com/apache/tvm/pull/19716
- [DOCS] Clarify loading serialized artifacts requires a trusted source by @tqchen in https://github.com/apache/tvm/pull/19720
- [REFACTOR][PYTHON] Slim tvm.libinfo to info-only helpers by @tqchen in https://github.com/apache/tvm/pull/19719
- [Codegen][NVPTX] Skip runtime execution in Vulkan codegen tests by @tlopex in https://github.com/apache/tvm/pull/19717
- [REFACTOR][PYTHON] Remove tvm.ffi shim; import tvm_ffi directly by @tqchen in https://github.com/apache/tvm/pull/19721
- [Runtime][Tests] Fix contrib wheel tests by @tlopex in https://github.com/apache/tvm/pull/19714
- [Tests][Disco] Skip CCL tests when runtime support is absent by @tlopex in https://github.com/apache/tvm/pull/19724
- [Tests][Relax] Gate multi-GPU VM test on three devices by @tlopex in https://github.com/apache/tvm/pull/19725
- [REFACTOR][IR] Phase out diagnostic.h for visit-context-aware pass errors by @tqchen in https://github.com/apache/tvm/pull/19722
- [Tests][Hexagon] Lazily import pytest plugin dependencies by @tlopex in https://github.com/apache/tvm/pull/19726
- [Python] Refactor pyproject.toml dependencies by @tlopex in https://github.com/apache/tvm/pull/19723
- [Tests][NNAPI] Skip tests cleanly when remote environment is unavailable by @tlopex in https://github.com/apache/tvm/pull/19730
- [Tests][S-TIR] Fix stale MetaSchedule sketch expectations and migrate let binds to T.let by @tlopex in https://github.com/apache/tvm/pull/19729
- [Tests] Remove test_runtime_ndarray (covered by tvm-ffi) by @tlopex in https://github.com/apache/tvm/pull/19715
- [TIRx] Preserve Triton call_kernel compile options by @tlopex in https://github.com/apache/tvm/pull/19728
- [Relax][PyTorch][DLight] Fix exported-program CUDA test failures by @tlopex in https://github.com/apache/tvm/pull/19732
- [PYTHON] Autoload backends; simplify library loading; remove TVMError for native errors by @tqchen in https://github.com/apache/tvm/pull/19727
- [Script][Tests] Fix dialect redirect module re-execution and stray category-less tirx.intrin_test op by @tlopex in https://github.com/apache/tvm/pull/19731
- [S-TIR][Tests] Fix transform test failures after TIRx bringup by @tlopex in https://github.com/apache/tvm/pull/19735
- [TIRx] Use canonical PTX
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
<img src=https://raw.githubusercontent.com/apache/tvm-site/main/images/logo/tvm-logo-small.png width=128/> 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.