Closed Jackwin closed 3 years ago
well, I have configured the code running environment in the docker of ubuntu20.04. It is really hard and complicated. So I give the full installation step with Docker, TVM, Ax, Maestro and some dependences.
pull ubuntu docker images
docker pull ubuntu:20.04
docker run -it -d --name hasco ubuntu:20.04
docker exec -it hasco /bin/bash
configure hasco
apt-get update
apt-get install python3 python3-pip sudo vim git llvm-9 cmake
# configure user
adduser eric ## password 123456
usermod -a -G sudo eric
# copy or download hasco source code
git clone --recursive https://github.com/pku-liang/HASCO.git HASCO
#configure dependence of the HASCO
# 1.build TVM
cd HASCO/src/tvm
mkdir build
cp cmake/config.cmake build
vim cmake/config.cmake build
# edit: replace 'set(USE_LLVM OFF)' with 'set(USE_LLVM llvm-config-9)'
cd build
cmake ..
make -j8
cd -
pip3 install numpy decorator attrs tornado psutil xgboost cloudpickle
# configue PYTHON PATH in shell environment
export TVM_HOME=/home/eric/HASCO/src/tvm
export PYTHONPATH=$TVM_HOME/python:${PYTHONPATH}
pip3 install tensorflow tqdm IPython
# 2.configure mastro
sudo apt-get install scons libboost-all-dev
cd HASCO/src/maestro
scons
cd -
# configure src/codesign/config.py with absolute path for maestro
# example: maestro_home = "/home/eric/HASCO/src/maestro/"
vim HASCO/src/codesign/config.py
# 3.configure for Ax
cd HASCO/src/Ax
sudo python3 setup.py install
cd -
# configue PYTHON PATH in shell environment
export AX_HOME=/home/eric/HASCO/src/Ax
export PYTHONPATH=$AX_HOME:${PYTHONPATH}
# 4.mkdir result folders
cd HASCO
mkdir -p rst/mapping
mkdir -p rst/config
mkdir -p rst/software
running hasco code
cd HASCO
python3 testbench/co_resnet_conv.py
Commit and save docker image
docker commit hasco hasco:ready
docker save -o hasco.tar hasco
load docker image
docker load --input hasco.tar
Hi @zw22zw22 Thanks for your quick reply.
Another error pops out when executing the cmake .. command in the build folder for TMV. From the log, it seems it does not work for the config "(USE_LLVM llvm-config-9"? What's your solution? Thanks.
Hi @zw22zw22 Thanks for your quick reply.
Another error pops out when executing the cmake .. command in the build folder for TMV. From the log, it seems it does not work for the config "(USE_LLVM llvm-config-9"? What's your solution? Thanks.
do you install llvm-9?
sudo apt-get install llvm-9
@zw22zw22 The issue is fixed after the re-installation of llvm-9. Thanks.
@zw22zw22 Thanks for your docker tutorial! That's very helpful for the staters.
When I run HASCO code by "python3 testbench/co_resnet_conv.py", an error pops like this.(I have already done the above steps). @zw22zw22 Could you please give your solution?
@zw22zw22 I used your docker but got the same error: 'AttributeError: module 'tvm' has no attribute 'schedule''. Any ideas what should I do next?
@zw22zw22 I used your docker but got the same error: 'AttributeError: module 'tvm' has no attribute 'schedule''. Any ideas what should I do next?
I can't solve this, and still looking forward to @zw22zw22's reply.
Dear folks,
First, quite appreciate your time in this issue.
After the successful installation required by the HSACO, the error pops out when running the following test case. From the above log, we can see the errors stems from the TVM. My question is what the configuration in config.cmake file should be? Could you give an instance?
python testbench/co_resnet_gemm.py
Thanks