You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/04/29 13:28:38 UTC
[GitHub] [tvm] Dougalll opened a new issue, #11182: build and run problems[Bug]
Dougalll opened a new issue, #11182:
URL: https://github.com/apache/tvm/issues/11182
here as the ApacheTVM site will not allow links.
**Computer**
I’m running on Ubuntu 18.04 LTS. Windows is not possible for me as I do not have access to Visual studio Enterprise 2019 and most of the download websites are blocked by my companies firewall. My Ubuntu 18.04 LTS has no restrictions. I want to test deployment onto Xilinx FPGAs.
**Why I’m evaluating Apache TVM**
I’m looking for a tool to port trained machine learning onto various targets including FPGAs, and Apache TVM:
• Has a lot of relevant major companies backing it
• Has a lot of active current contributors on GIT
• Aims to solve many of the problems we are interested in
• Claims to support pipelining and parallelism, so implementing a CNN with parallel units in each layer and a pipeline stage for each CNN layer may be possible.
• Has a stage which optimises CNN layers by combining them were possible
**The good**
The only thing that I have got to work is compiling the V8 code from the website:
https://tvm.apache.org/download
Following the instructions in the page
https://tvm.apache.org/docs/install/from_source.html
**Proposal 1**
Page:
https://tvm.apache.org/docs/install/from_source.html
Is too complex becuase there are many different options and some such as conda are not chronological on the page. I propose providing a page like this:
https://tlcpack.ai/
With options for:
• Windows Mac Linux
• Development, source, docker, docker prebuilt
• Conda pip source
• Options for the common flags that are likely be changed
• etc
Use the options to write a script file with a set of chronological commands to install Apache TVM, with comments stating what is happening.
The script file has the benefit that they can be run as part of a nightly build to verify that the various software builds compile. The builds provide versions of TVM that can be used to verify the commands in the tutorials. The tutorials should be run as part of the nightly build. These tests, which consist of builds followed by tutorial tests, can all be run in parallel on different virtual machines.
**Problem 1 Hello world does not work (The first TVM command in the first tutorial)**
Successfully installing the v0.8 from the https://tvm.apache.org/download tvm (Ubuntu 18.04.6 LTS, x64, no GPU, with LLVM, miniconda)
To familiarise myself with Apache TVM I decided to run the tutorial.
The onnx download works, but the first line running ApacheTVM fails, so I can’t get past the first tvm step in the first tutorial. It appears that the example onnx example is too a message. Error output:
https://tvm.apache.org/docs/install/from_source.html
wget https://github.com/onnx/models/raw/main/vision/classification/resnet/model/resnet50-v2-7.onnx
(tvm-build) dlaod@dlaod-HP:~/apachetvm/apache-tvm-src-v0.8.0.rc0$ tvmc compile \
> --target "llvm" \
> --output resnet50-v2-7-tvm.tar \
> resnet50-v2-7.onnx
[13:57:32] /home/dlaod/apachetvm/apache-tvm-src-v0.8.0.rc0/src/target/target_kind.cc:164: Warning: Unable to detect CUDA version, default to "-mcpu=sm_20" instead
[13:57:32] /home/dlaod/apachetvm/apache-tvm-src-v0.8.0.rc0/src/target/target_kind.cc:190: Warning: Unable to detect ROCm compute arch, default to "-mcpu=gfx900" instead
[13:57:32] /home/dlaod/apachetvm/apache-tvm-src-v0.8.0.rc0/src/target/target_kind.cc:204: Warning: Unable to detect ROCm version, assuming >= 3.5
[13:57:32] /home/dlaod/apachetvm/apache-tvm-src-v0.8.0.rc0/src/target/target_kind.cc:164: Warning: Unable to detect CUDA version, default to "-mcpu=sm_20" instead
[13:57:32] /home/dlaod/apachetvm/apache-tvm-src-v0.8.0.rc0/src/target/target_kind.cc:190: Warning: Unable to detect ROCm compute arch, default to "-mcpu=gfx900" instead
[13:57:32] /home/dlaod/apachetvm/apache-tvm-src-v0.8.0.rc0/src/target/target_kind.cc:204: Warning: Unable to detect ROCm version, assuming >= 3.5
[libprotobuf ERROR google/protobuf/io/coded_stream.cc:207] A protocol message was rejected because it was too big (more than 67108864 bytes). To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h.
Traceback (most recent call last):
File "/home/dlaod/.local/bin/tvmc", line 33, in <module>
sys.exit(load_entry_point('tvm==0.8.0', 'console_scripts', 'tvmc')())
File "/home/dlaod/.local/lib/python3.6/site-packages/tvm-0.8.0-py3.6-linux-x86_64.egg/tvm/driver/tvmc/main.py", line 94, in main
sys.exit(_main(sys.argv[1:]))
File "/home/dlaod/.local/lib/python3.6/site-packages/tvm-0.8.0-py3.6-linux-x86_64.egg/tvm/driver/tvmc/main.py", line 87, in _main
return args.func(args)
File "/home/dlaod/.local/lib/python3.6/site-packages/tvm-0.8.0-py3.6-linux-x86_64.egg/tvm/driver/tvmc/compiler.py", line 137, in drive_compile
tvmc_model = frontends.load_model(args.FILE, args.model_format, args.input_shapes)
File "/home/dlaod/.local/lib/python3.6/site-packages/tvm-0.8.0-py3.6-linux-x86_64.egg/tvm/driver/tvmc/frontends.py", line 404, in load_model
mod, params = frontend.load(path, shape_dict, **kwargs)
File "/home/dlaod/.local/lib/python3.6/site-packages/tvm-0.8.0-py3.6-linux-x86_64.egg/tvm/driver/tvmc/frontends.py", line 169, in load
model = onnx.load(path)
File "/home/dlaod/.local/lib/python3.6/site-packages/onnx/__init__.py", line 115, in load_model
model = load_model_from_string(s, format=format)
File "/home/dlaod/.local/lib/python3.6/site-packages/onnx/__init__.py", line 152, in load_model_from_string
return _deserialize(s, ModelProto())
File "/home/dlaod/.local/lib/python3.6/site-packages/onnx/__init__.py", line 95, in _deserialize
decoded = cast(Optional[int], proto.ParseFromString(s))
google.protobuf.message.DecodeError: Error parsing message
(tvm-build) dlaod@dlaod-HP:~/apachetvm/apache-tvm-src-v0.8.0.rc0$
**Problem 2 Docker does not build with conda**
I thought I’d try a second build of Apache TVM to see if it would run, but Apache TVM will not build.
Building docker does not work, even though I have the correct python version because conda has the wrong python version.
Install conda as recommended in
https://tvm.apache.org/docs/install/from_source.html
(without the following activate tline it says that everything is upto date, but the tutorial fails)
Conda activate tvm-build
https://tlcpack.ai/
states v0.8 Linux Conda No cuda
conda install tlcpack -c tlcpack
without conda my python is 3.7.11
in conda my python is 3.10.4
error message running
(tvm-build) dlaod@dlaod-HP:~/apachetvm/docker/conda$ conda install tlcpack -c tlcpack
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: |
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
- tlcpack -> python[version='>=3.6,<3.7.0a0|>=3.8,<3.9.0a0|>=3.7,<3.8.0a0']
Your python: python=3.10
If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.
The following specifications were found to be incompatible with your system:
- feature:/linux-64::__glibc==2.27=0
- feature:|@/linux-64::__glibc==2.27=0
Your installed version is: 2.27
(tvm-build) dlaod@dlaod-HP:~/apachetvm/docker/conda$ python --version
Python 3.10.4
(tvm-build) dlaod@dlaod-HP:~/apachetvm/docker/conda$
**Problem 3 Docker NO conda**
In v8 dir
docker ci_cpu
states this script does not work in python 3.6 the minimum is 3.7. The python installed on the computer is 3.7.11. The python being downloaded as part of the docker computer is 3.6.
Selecting previously unselected package python3.6-dev.
Preparing to unpack .../07-python3.6-dev_3.6.9-1~18.04ubuntu1.7_amd64.deb ...
Unpacking python3.6-dev (3.6.9-1~18.04ubuntu1.7) ...
Selecting previously unselected package python3-dev.
Preparing to unpack .../08-python3-dev_3.6.7-1~18.04_amd64.deb ...
Unpacking python3-dev (3.6.7-1~18.04) ...
Selecting previously unselected package python3-pkg-resources.
Preparing to unpack .../09-python3-pkg-resources_39.0.1-2_all.deb ...
Unpacking python3-pkg-resources (39.0.1-2) ...
Selecting previously unselected package python3-setuptools.
Preparing to unpack .../10-python3-setuptools_39.0.1-2_all.deb ...
Unpacking python3-setuptools (39.0.1-2) ...
Setting up python3-pkg-resources (39.0.1-2) ...
Setting up libexpat1-dev:amd64 (2.2.5-3ubuntu0.7) ...
Setting up python3-lib2to3 (3.6.9-1~18.04) ...
Setting up python3-distutils (3.6.9-1~18.04) ...
Setting up libpython3.6:amd64 (3.6.9-1~18.04ubuntu1.7) ...
Setting up libpython3.6-dev:amd64 (3.6.9-1~18.04ubuntu1.7) ...
Setting up python3-setuptools (39.0.1-2) ...
Setting up python3.6-dev (3.6.9-1~18.04ubuntu1.7) ...
Setting up dh-python (3.20180325ubuntu2) ...
Setting up libpython3-dev:amd64 (3.6.7-1~18.04) ...
Setting up python3-dev (3.6.7-1~18.04) ...
Processing triggers for libc-bin (2.27-3ubuntu1.5) ...
ERROR: This script does not work on Python 3.6 The minimum supported Python version is 3.7. Please use https://bootstrap.pypa.io/pip/3.6/get-pip.py instead.
The command '/bin/sh -c bash /install/ubuntu1804_install_python.sh' returned a non-zero code: 1
ERROR: docker build failed.
(base) dlaod@dlaod-HP:~/apachetvm/apache-tvm-src-v0.8.0.rc0$ python --version
Python 3.7.11
(base) dlaod@dlaod-HP:~/apachetvm/apache-tvm-src-v0.8.0.rc0$
**Problem 4 Docker images are not available**
I thought I’d try a third build of Apache TVM to see if it would run, but Apache TVM will not build.
This is external really, but the downloads of the prebuilt docker do not work.
https://hub.docker.com/r/tlcpack/ci-cpu
(base) dlaod@dlaod-HP:~/apachetvm/docker/prebuilt$ docker pull tlcpack/ci-cpu
Using default tag: latest
Error response from daemon: manifest for tlcpack/ci-cpu:latest not found: manifest unknown: manifest unknown
(base) dlaod@dlaod-HP:~/apachetvm/docker/prebuilt$
**Problem 5 Docker for Vitis does not work**
As the introduction does not work I thought I’d skip the introduction and go straight to FPGA synthesis. Again the docker build does not work, but in a different way. Apache TVM document:
• tvm/docs/how_to/deploy/vitis_ai.rst
But 'https://apt.kitware.com/ubuntu bionic InRelease' is not signed or the public key cannot be obtained.
tvm$ ./docker/build.sh demo_vitis_ai bash
(base) dlaod@dlaod-HP:~/apachetvm/vitis/tvm$ ./docker/build.sh demo_vitis_ai bash
Using default context path: /home/dlaod/apachetvm/vitis/tvm/docker
WORKSPACE: /home/dlaod/apachetvm/vitis/tvm/docker/../
CI_DOCKER_EXTRA_PARAMS:
COMMAND: bash --allow-unauthenticated
CONTAINER_TYPE: demo_vitis_ai
BUILD_TAG: tvm
DOCKER CONTAINER NAME: tvm.demo_vitis_ai
DOCKER_IMAGE_TAG: latest
DOCKER_IMG_SPEC: tvm.demo_vitis_ai:latest
Building container (tvm.demo_vitis_ai)...
Sending build context to Docker daemon 235kB
Step 1/19 : FROM xilinx/vitis-ai:1.4.916
---> a325686c45a3
Step 2/19 : RUN apt-get update --fix-missing
---> Running in f5acf8b929e9
Get:1 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:4 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1,344 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [11.3 MB]
Get:7 http://ppa.launchpad.net/timsc/opencv-3.4/ubuntu bionic InRelease [15.9 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages [13.5 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [186 kB]
Get:10 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [29.8 kB]
Get:11 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [3,167 kB]
Get:12 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic InRelease [20.8 kB]
Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [2,272 kB]
Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [942 kB]
Get:15 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [12.9 kB]
Get:16 http://archive.ubuntu.com/ubuntu bionic-backports/main amd64 Packages [12.2 kB]
Get:17 https://apt.kitware.com/ubuntu bionic InRelease [11.0 kB]
Get:18 http://ppa.launchpad.net/timsc/opencv-3.4/ubuntu bionic/main amd64 Packages [11.1 kB]
Get:19 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [21.1 kB]
Get:20 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [1,496 kB]
Err:17 https://apt.kitware.com/ubuntu bionic InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6AF7F09730B3F0A4
Get:21 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [2,732 kB]
Get:22 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main amd64 Packages [50.4 kB]
Get:23 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [909 kB]
Reading package lists... Done
W: GPG error: https://apt.kitware.com/ubuntu bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6AF7F09730B3F0A4
E: The repository 'https://apt.kitware.com/ubuntu bionic InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
The command '/bin/sh -c apt-get update --fix-missing' returned a non-zero code: 100
ERROR: docker build failed.
(base) dlaod@dlaod-HP:~/apachetvm/vitis/tvm$ ./docker/build.sh demo_vitis_ai bash
tried:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6AF7F09730B3F0A4
then rerunning ./docker/build.sh demo_vitis_ai bash
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 30B3F0A4
then rerunning ./docker/build.sh demo_vitis_ai bash
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 6AF7F09730B3F0A4
then rerunning ./docker/build.sh demo_vitis_ai bash
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 30B3F0A4
then rerunning ./docker/build.sh demo_vitis_ai bash
And some other versions of the above. They day the key exists and is not updated
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 7EA0A9C3F273FCD8
sudo apt-get update
then rerunning ./docker/build.sh demo_vitis_ai bash
adding
/etc/apt/apt.conf.d/99myown
with line
APT::Get::AllowUnauthenticated "true";
then rerunning ./docker/build.sh demo_vitis_ai bash
apt-get update --allow-unauthenticated
then rerunning ./docker/build.sh demo_vitis_ai bash
sudo apt-get update --allow-insecure-repositories
then rerunning ./docker/build.sh demo_vitis_ai bash
tried modifiying
apps/microtvm/reference-vm/zephyr/base-box/base_box_setup.sh
docker/install/ubuntu_install_zephyr.sh
but the code is not run
**Proposal 2**
I recommend verifying all the above in nightly build script files on blank virtual machines, so problems can be identified as they occur:
• External dependencies can mean that https://tvm.apache.org/download works one day and fails the next, and needs to be fixed.
• Blank virtual machines mean that the build is not dependant on things that have previously been manually fixed and forgotten to be added to the script files.
• I believe that Jenkins can schedule things like this for you and many other combinations of tools and script files.
--
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: commits-unsubscribe@tvm.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] masahi commented on issue #11182: build and run problems[Bug]
Posted by GitBox <gi...@apache.org>.
masahi commented on issue #11182:
URL: https://github.com/apache/tvm/issues/11182#issuecomment-1342324984
Unclear what the problem is.
--
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: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] masahi closed issue #11182: build and run problems[Bug]
Posted by GitBox <gi...@apache.org>.
masahi closed issue #11182: build and run problems[Bug]
URL: https://github.com/apache/tvm/issues/11182
--
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: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org