Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docker/Dockerfile.ci_cpu
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ RUN bash /install/ubuntu_install_tflite.sh
COPY install/ubuntu_install_tensorflow.sh /install/ubuntu_install_tensorflow.sh
RUN bash /install/ubuntu_install_tensorflow.sh

# Arm(R) Compute Library
COPY install/ubuntu_install_arm_compute_lib.sh /install/ubuntu_install_arm_compute_lib.sh
RUN bash /install/ubuntu_install_arm_compute_lib.sh
# Compute Library
COPY install/ubuntu_download_arm_compute_lib_binaries.sh /install/ubuntu_download_arm_compute_lib_binaries.sh
RUN bash /install/ubuntu_download_arm_compute_lib_binaries.sh

# Caffe deps
COPY install/ubuntu_install_caffe.sh /install/ubuntu_install_caffe.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,62 +17,46 @@
# under the License.

set -e
set -u
set -o pipefail

repo_url="https://github.com/ARM-software/ComputeLibrary.git"
repo_dir="acl"
install_path="/opt/$repo_dir"
architecture_type=$(uname -i)
target_arch="arm64-v8a" # arm64-v8a / arm64-v8.2-a / armv7a
build_type="native"

tmpdir=$(mktemp -d)

cleanup()
{
rm -rf "$tmpdir"
}

trap cleanup 0

apt-get update && \
apt-get install -y --no-install-recommends \
git \
scons \
bsdmainutils \
build-essential

# Install cross-compiler when not building natively.
# Depending on the architecture selected to compile for,
# you may need to install an alternative cross-compiler.
if [ "$architecture_type" != "aarch64" ]; then
apt-get install -y --no-install-recommends \
apt-get update && apt-get install -y --no-install-recommends \
g++-aarch64-linux-gnu \
gcc-aarch64-linux-gnu
fi

cd "$tmpdir"
compute_lib_version="v21.05"
compute_lib_base_url="https://github.com/ARM-software/ComputeLibrary/releases/download/${compute_lib_version}"
compute_lib_file_name="arm_compute-${compute_lib_version}-bin-linux.tar.gz"
compute_lib_download_url="${compute_lib_base_url}/${compute_lib_file_name}"

git clone "$repo_url" "$repo_dir"
target_lib="linux-arm64-v8a-neon"

cd "$repo_dir"
# uncomment line below if you need asserts/debug version of the library
# target_lib="${target_lib}-asserts"

# pin version to v21.02
git checkout "v21.02"
extract_dir="arm_compute-${compute_lib_version}-bin-linux"
install_path="/opt/arm/acl"

if [ "$architecture_type" != "aarch64" ]; then
build_type="cross_compile"
fi
tmpdir=$(mktemp -d)

cleanup()
{
rm -rf "$tmpdir"
}

trap cleanup 0

cd "$tmpdir"

curl -sL "${compute_lib_download_url}" -o "${compute_lib_file_name}"
tar xzf "${compute_lib_file_name}"

scons \
install_dir="$install_path" \
Werror=1 \
-j8 \
debug=0 \
asserts=0 \
neon=1 \
opencl=0 \
os=linux \
arch="$target_arch" \
build="$build_type"
mkdir -p "${install_path}"
cp -r "${extract_dir}/include" "${install_path}/"
cp -r "${extract_dir}/arm_compute" "${install_path}/include/"
cp -r "${extract_dir}/support" "${install_path}/include/"
cp -r "${extract_dir}/utils" "${install_path}/include/"
cp -r "${extract_dir}/lib/${target_lib}" "${install_path}/lib"