From d9c4f82b899e9bd7a54ca6df155cef083b679b21 Mon Sep 17 00:00:00 2001 From: mbaret <55580676+mbaret@users.noreply.github.com> Date: Tue, 4 Aug 2020 03:04:16 +0100 Subject: [PATCH] [CI][ETHOSN] Enable CI for Ethos-N (#6171) This introduces the necessary changes to docker to support building the Ethos-N driver stack. This is required for subsequent patches which introduce the Ethos-N integration into TVM. Co-authored-by: Leo Blonk Co-authored-by: Leandro Nunes # Please enter the commit message for your changes. Lines starting # with '#' will be kept; you may remove them yourself if you want to. # An empty message aborts the commit. # # Date: Mon Jul 27 15:43:41 2020 +0100 # # On branch ethosn-ci # Changes to be committed: # modified: docker/Dockerfile.ci_cpu # new file: docker/install/ubuntu_install_ethosn_driver_stack.sh # # Untracked files: # CombinedMemoryMap.hex # OutputModel.hex # config.txt # docker/install/ethosn_cap/ # docker/install/ethosn_driver_dev-20.05-dbg-20200612-141030.tar.gz # ssd.npy # tests/python/integration/test_tir_gemm.py # tests/python/relay/test_pattern_annotate.py # tests/python/unittest/failure.py # --- docker/Dockerfile.ci_cpu | 4 ++ .../ubuntu_install_ethosn_driver_stack.sh | 60 +++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100755 docker/install/ubuntu_install_ethosn_driver_stack.sh diff --git a/docker/Dockerfile.ci_cpu b/docker/Dockerfile.ci_cpu index 305fec7ccba7..828fff4e5fc6 100644 --- a/docker/Dockerfile.ci_cpu +++ b/docker/Dockerfile.ci_cpu @@ -82,3 +82,7 @@ RUN bash /install/ubuntu_install_arm_compute_lib.sh # Caffe deps COPY install/ubuntu_install_caffe.sh /install/ubuntu_install_caffe.sh RUN bash /install/ubuntu_install_caffe.sh + +# Github Arm(R) Ethos(TM)-N NPU driver +COPY install/ubuntu_install_ethosn_driver_stack.sh /install/ubuntu_install_ethosn_driver_stack.sh +RUN bash /install/ubuntu_install_ethosn_driver_stack.sh diff --git a/docker/install/ubuntu_install_ethosn_driver_stack.sh b/docker/install/ubuntu_install_ethosn_driver_stack.sh new file mode 100755 index 000000000000..94fe1e1ea06e --- /dev/null +++ b/docker/install/ubuntu_install_ethosn_driver_stack.sh @@ -0,0 +1,60 @@ +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +set -e +set -u +set -o pipefail + +repo_url="https://github.com/Arm-software/ethos-n-driver-stack" +repo_dir="ethosn-driver" +repo_revision="20.05" +install_path="/opt/arm/$repo_dir" + +tmpdir=$(mktemp -d) + +cleanup() +{ + rm -rf "$tmpdir" +} + +trap cleanup 0 + +# Ubuntu 16.04 dependencies +apt-get update + +apt-get install -y \ + bsdmainutils \ + build-essential \ + cmake \ + cpp \ + git \ + linux-headers-generic \ + python-dev \ + python3 \ + scons \ + wget + +cd "$tmpdir" +git clone "$repo_url" "$repo_dir" + +cd "$repo_dir" +git checkout "$repo_revision" + +cd "driver" +scons install_prefix="$install_path" install +