Documentation | Contributors | Community | Release Notes
TVM is a compiler stack for deep learning systems. It is designed to close the gap between the productivity-focused deep learning frameworks, and the performance- and efficiency-focused hardware backends. TVM works with deep learning frameworks to provide end to end compilation to different backends. Checkout the tvm stack homepage for more information.
基本安装步骤参考TVM官方文档
- 需要安装python yaml包。例如使用
pip install pyyaml
安装。 - 需要编译并安装yaml-cpp库。
- 下载并按说明编译这个LLVM repo,注意需要切换到release_70分支!并在编译TVM时,在
build/config.cmake
中修改set(USE_LLVM /path/to/your/llvm/bin/llvm-config)
,令它指向刚刚编译的LLVM。 - 下载并编译安装SystemC 2.3.3。建议在编译SystemC时使用C++14标准(
cmake -DCMAKE_CXX_STANDARD=14 ...
),否则可能出现加载libsystemc.so时符号找不到的错误。
- 首先将tvm/nnpu/python添加到PYTHONPATH环境变量。
tvm/nnpu/demos
目录下有各个算子的演示代码,例如执行python test_conv.1.py
执行卷积算子演示。使用--sim S0/SC
参数选择功能级/行为级仿真器,例如python test_conv.2.py --sim SC
。- 配置文件
tvm/nnpu/config/nnpu_config.yaml
包含NNPU后端硬件属性的配置参数,也可以将其复制到tvm/nnpu/
目录下。
© Contributors Licensed under an Apache-2.0 license.
TVM adopts apache committer model, we aim to create an open source project that is maintained and owned by the community. Checkout the Contributor Guide
We learnt a lot from the following projects when building TVM.
- Halide: TVM uses HalideIR as data structure for arithmetic simplification and low level lowering. We also learnt and adapted some part of 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.