Skip to content

Commit

Permalink
[CI][ETHOSN] Enable CI for Ethos-N (#6171)
Browse files Browse the repository at this point in the history
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 <[email protected]>
Co-authored-by: Leandro Nunes <[email protected]>

# 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
#
  • Loading branch information
mbaret authored Aug 4, 2020
1 parent 02b36e7 commit d9c4f82
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docker/Dockerfile.ci_cpu
Original file line number Diff line number Diff line change
Expand Up @@ -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
60 changes: 60 additions & 0 deletions docker/install/ubuntu_install_ethosn_driver_stack.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit d9c4f82

Please sign in to comment.