Install TVM from Source
Ubuntu 下安装依赖包
sudo apt-get update
sudo apt-get install -y python3 python3-dev python3-setuptools gcc libtinfo-dev zlib1g-dev build-essential cmake libedit-dev libxml2-dev
获取源代码
git clone --recursive https://github.com/apache/tvm tvm
安装 LLVM
TVM 需要 LLVM 用于 CPU 代码生成,使用 LLVM 构建需要 LLVM 4.0 或更高版本。
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04.tar.xz
tar xvf clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04.tar.xz
mv clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04 llvm
构建共享库 创建 build 目录,将 cmake/config.
