pfk-beta edited a comment on issue #10167:
URL: https://github.com/apache/tvm/issues/10167#issuecomment-1034946597


   Hi @driazati,
   Thanks for the answer. Here is simple script: (takes some time to build lib 
+ downloads `resnet.pb` from site zenodo.org)
   ```shell
   sudo apt-get install llvm-12\* git
   sudo mkdir /tvm
   sudo chown `whoami`:`whoami` /tvm
   git clone --recursive -b main [email protected]:apache/tvm.git /tvm
   wget -nc https://zenodo.org/record/2535873/files/resnet50_v1.pb\?download\=1 
-O resnet50.pb
   virtualenv -p /usr/bin/python3 /tvm/.venv/tvm
   source /tvm/.venv/tvm/bin/activate
   pip install numpy xgboost onnx attrs decorator tornado psutil cloudpickle 
tensorflow-cpu
   rm -rf /tvm/build-llvm12/*
   mkdir -p /tvm/build-llvm12
   cp /tvm/cmake/config.cmake /tvm/build-llvm12
   cd /tvm/build-llvm12
   sed -i 's/set(USE_LLVM OFF)/set(USE_LLVM 
\/usr\/lib\/llvm-12\/bin\/llvm-config)/g' config.cmake
   sed -i 's/set(USE_RPC OFF)/set(USE_RPC ON)/g' config.cmake
   cmake .. \
       -DUSE_RPC=ON \
       -DCMAKE_SYSTEM_NAME=Linux \
       -DCMAKE_SYSTEM_VERSION=1 \
       -DUSE_LLVM=/usr/lib/llvm-12/bin/llvm-config
   make -j4
   
   export TVM_HOME=/tvm
   export PYTHONPATH=/tvm/python
   TVM_LIBRARY_PATH=/tvm/build-llvm12 python3 \
       -m tvm.driver.tvmc tune \
       --number 10 \
       --repeat 10 \
       --target "llvm" \
       --timeout 60 \
       --trials 47 \
       --output module_resnet.tar \
       /tvm/resnet50.pb
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to