blob: 0075bbad31a671006bea2a5c95b129034c048d0e [file] [log] [blame]
James Conroy919ec712022-07-13 12:57:53 +01001#!/bin/bash
Teresa Charlinad1b3d72023-03-14 12:10:28 +00002
James Conroy919ec712022-07-13 12:57:53 +01003#
Teresa Charlinad1b3d72023-03-14 12:10:28 +00004# Copyright © 2022-2023 Arm Ltd and Contributors. All rights reserved.
James Conroy919ec712022-07-13 12:57:53 +01005# SPDX-License-Identifier: MIT
6#
7
8# Script which builds Arm NN and ACL
9# setup-armnn.sh must be executed in the same directory, before running this script
10
11set -o nounset # Catch references to undefined variables.
12set -o pipefail # Catch non zero exit codes within pipelines.
13set -o errexit # Catch and propagate non zero exit codes.
14
15rel_path=$(dirname "$0") # relative path from where script is executed to script location
16
17build_acl()
18{
19 cd "$ACL_SRC"
20
James Conroye6f30ad2022-09-08 12:04:26 +010021 # $acl_scons_params are additional options provided by the user and will overwrite any previously defined args
22 local acl_params="neon=$flag_neon_backend opencl=$flag_cl_backend Werror=0 embed_kernels=1 examples=0 validation_tests=0 benchmark_tests=0 benchmark_examples=0 $acl_scons_params"
James Conroy919ec712022-07-13 12:57:53 +010023
24 if [ "$flag_debug" -eq 1 ]; then
25 acl_params="$acl_params debug=1 asserts=1"
26 fi
27
28 local native_flag=""
29 if [ "$NATIVE_BUILD" ]; then
30 native_flag="build=native"
31 fi
32
33 # Force -fPIC so that ACL is suitable for inclusion in Arm NN library
34 local extra_cxx_flags="extra_cxx_flags='-fPIC'"
35
36 local compile_flags=""
37 local acl_arch=""
38
39 case "$TARGET_ARCH" in
40 "aarch64")
41 compile_flags+="$AARCH64_COMPILER_FLAGS"
42 acl_arch="arch=arm64-v8a"
43 ;;
44
John Mcloughlin35bae832023-07-24 11:55:13 +010045 "android64")
46 compile_flags+="$AARCH64_COMPILER_FLAGS"
47 acl_arch="arch=arm64-v8a"
48 ;;
49
James Conroy919ec712022-07-13 12:57:53 +010050 "x86_64")
51 acl_arch="arch=x86_64"
52 ;;
53 esac
54
55 echo -e "\n***** Building ACL for $TARGET_ARCH *****"
56
57 if [ "$flag_clean" -eq 1 ]; then
58 echo -e "\n***** Clean flag detected: removing existing ACL build *****"
59 rm -rf "$ACL_BUILD_TARGET"
60 fi
61
62 mkdir -p "$ACL_BUILD_TARGET"
63
John Mcloughlin35bae832023-07-24 11:55:13 +010064 if [ "$TARGET_ARCH" == "android64" ]; then
65 eval "$compile_flags" \
66 scons toolchain_prefix=llvm- \
67 compiler_prefix=aarch64-linux-android$ANDROID_API_VERSION- \
68 "$acl_arch" \
69 "$acl_params" \
70 "$extra_cxx_flags" \
71 os=android -j "$NUM_THREADS"
72 else
73 eval "$compile_flags" \
74 scons "$native_flag" \
James Conroy919ec712022-07-13 12:57:53 +010075 "$acl_arch" \
76 "$acl_params" \
77 build_dir="$ACL_BUILD_TARGET" \
78 "$extra_cxx_flags" \
79 -j "$NUM_THREADS"
John Mcloughlin35bae832023-07-24 11:55:13 +010080 fi
James Conroy919ec712022-07-13 12:57:53 +010081
82 echo -e "\n***** Built ACL for $TARGET_ARCH *****"
83
84 return 0
85}
86
87build_armnn()
88{
89 mkdir -p "$ARMNN_BUILD_TARGET"
90 cd "$ARMNN_BUILD_TARGET"
91
92 local build_type="Release"
93 if [ "$flag_debug" -eq 1 ]; then
94 build_type="Debug"
95 fi
96
John Mcloughlin35bae832023-07-24 11:55:13 +010097 local cmake_flags=""
James Conroy919ec712022-07-13 12:57:53 +010098 local compile_flags=""
John Mcloughlin35bae832023-07-24 11:55:13 +010099 local android_cmake_args=""
James Conroy919ec712022-07-13 12:57:53 +0100100
101 case "$TARGET_ARCH" in
102 "aarch64")
103 compile_flags+="$AARCH64_COMPILER_FLAGS"
104 ;;
John Mcloughlin35bae832023-07-24 11:55:13 +0100105 "android64")
106 compile_flags+="$ANDROID64_COMPILER_FLAGS"
107 cmake_flags+="CXXFLAGS='-fPIE -fPIC'"
108 android_cmake_args+="-DCMAKE_ANDROID_NDK=$NDK_SRC \
109 -DNDK_VERSION=r$NDK_VERSION \
110 -DCMAKE_SYSTEM_NAME=Android \
111 -DCMAKE_SYSTEM_VERSION=$ANDROID_API_VERSION \
112 -DCMAKE_ANDROID_ARCH_ABI=$ANDROID_ARM_ARCH \
113 -DCMAKE_SYSROOT=$ANDROID64_x86_TOOLCHAIN/sysroot \
114 -DCMAKE_EXE_LINKER_FLAGS='-pie -llog'"
115 ;;
James Conroy919ec712022-07-13 12:57:53 +0100116 esac
117
118 if [ "$flag_clean" -eq 1 ]; then
119 echo -e "\n***** Clean flag detected: removing existing Arm NN build *****"
120 rm -rf "$ARMNN_BUILD_TARGET"
121 fi
122
123 echo -e "\n***** Building Arm NN for $TARGET_ARCH *****"
124
125 eval "$compile_flags" \
John Mcloughlin35bae832023-07-24 11:55:13 +0100126 cmake "$android_cmake_args" \
127 -DCMAKE_BUILD_TYPE="$build_type" \
Nikhil Raj542c8482023-04-26 16:22:10 +0100128 -DBUILD_CLASSIC_DELEGATE="$flag_tflite_classic_delegate" \
129 -DBUILD_OPAQUE_DELEGATE="$flag_tflite_opaque_delegate" \
James Conroy919ec712022-07-13 12:57:53 +0100130 -DBUILD_TF_LITE_PARSER="$flag_tflite_parser" \
Nikhil Raj0d294532023-04-20 15:19:05 +0100131 -DBUILD_DELEGATE_JNI_INTERFACE="$flag_jni" \
James Conroy919ec712022-07-13 12:57:53 +0100132 -DBUILD_ONNX_PARSER="$flag_onnx_parser" \
133 -DARMCOMPUTENEON="$flag_neon_backend" \
134 -DARMCOMPUTECL="$flag_cl_backend" \
135 -DARMNNREF="$flag_ref_backend" \
136 -DARMCOMPUTE_ROOT="$ACL_SRC" \
137 -DARMCOMPUTE_BUILD_DIR="$ACL_BUILD_TARGET" \
138 -DTENSORFLOW_ROOT="$TENSORFLOW_SRC" \
John Mcloughlin35bae832023-07-24 11:55:13 +0100139 -DTFLITE_ROOT_DIR="$TFLITE_SRC" \
140 -DTF_LITE_GENERATED_PATH="$TFLITE_SRC"/schema \
141 -DTF_LITE_SCHEMA_INCLUDE_PATH="$TFLITE_SRC"/schema \
James Conroy919ec712022-07-13 12:57:53 +0100142 -DTFLITE_LIB_ROOT="$TFLITE_BUILD_TARGET" \
143 -DFLATBUFFERS_ROOT="$FLATBUFFERS_BUILD_TARGET" \
144 -DFLATC_DIR="$FLATBUFFERS_BUILD_HOST" \
145 -DONNX_GENERATED_SOURCES="$ONNX_BUILD_TARGET" \
John Mcloughlin35bae832023-07-24 11:55:13 +0100146 -DPROTOBUF_ROOT="$PROTOBUF_BUILD_TARGET" \
James Conroy919ec712022-07-13 12:57:53 +0100147 "$armnn_cmake_args" \
148 "$ARMNN_SRC"
149
150 make -j "$NUM_THREADS"
151
152 # Copy protobuf library into Arm NN build directory, if ONNX Parser is enabled
153 if [ "$flag_onnx_parser" -eq 1 ]; then
154 cd "$ARMNN_BUILD_TARGET"
155 rm -f libprotobuf.so libprotobuf.so.23 libprotobuf.so.23.0.0
John Mcloughlin35bae832023-07-24 11:55:13 +0100156 if [ "$TARGET_ARCH" != "android64" ]; then
157 cp "$PROTOBUF_LIBRARY_TARGET" .
158 ln -s libprotobuf.so.23.0.0 ./libprotobuf.so.23
159 ln -s libprotobuf.so.23.0.0 ./libprotobuf.so
160 else
161 cp "$PROTOBUF_ANDROID_LIB_TARGET" .
162 fi
James Conroy919ec712022-07-13 12:57:53 +0100163 fi
164
James Conroy3106c7f2022-12-07 10:30:19 +0000165 # Copy Arm NN include directory into build output
166 cd "$ARMNN_BUILD_TARGET"
167 rm -rf include
168 cp -r "$SOURCE_DIR"/armnn/include .
169
James Conroy919ec712022-07-13 12:57:53 +0100170 echo -e "\n***** Built Arm NN for $TARGET_ARCH *****"
171
172 local tarball_path="$ROOT_DIR/armnn_$ARMNN_BUILD_DIR_NAME.tar.gz"
173 echo -e "\n***** Creating tarball of Arm NN build at $tarball_path *****"
174
175 cd "$ARMNN_BUILD_ROOT"
176 rm -f "$tarball_path"
177 tar -czf "$tarball_path" "$ARMNN_BUILD_DIR_NAME"
178
179 echo -e "\n***** Created tarball of Arm NN build at $ROOT_DIR/armnn_$ARMNN_BUILD_DIR_NAME.tar.gz *****"
180 echo -e "\n***** To extract tarball, run: tar -xzf armnn_$ARMNN_BUILD_DIR_NAME.tar.gz *****\n"
181
182 return 0
183}
184
James Conroy210897d2022-08-04 16:55:05 +0100185download_armnn()
186{
187 cd "$SOURCE_DIR"
188
189 echo -e "\n***** Downloading Arm NN *****"
190
191 rm -rf "$ARMNN_SRC"
192
Ciara Sookarry4a43c942023-09-20 12:10:31 +0100193 # Main branch of Arm NN is checked out
194 git clone --branch main https://github.com/ARM-software/armnn.git armnn
James Conroy210897d2022-08-04 16:55:05 +0100195
196 cd "$ARMNN_SRC"
James Conroyc4fbbec2022-09-22 16:40:00 +0100197 local armnn_branch="$(git rev-parse --abbrev-ref HEAD)"
James Conroy210897d2022-08-04 16:55:05 +0100198
199 echo -e "\n***** Arm NN Downloaded: $armnn_branch *****"
200}
201
202download_acl()
203{
James Conroyc4fbbec2022-09-22 16:40:00 +0100204 # First get Arm NN branch so that we can download corresponding ACL tag
205 cd "$ARMNN_SRC"
206 local armnn_branch="$(git rev-parse --abbrev-ref HEAD)"
James Conroy210897d2022-08-04 16:55:05 +0100207
James Conroyc4fbbec2022-09-22 16:40:00 +0100208 echo -e "\n***** Downloading corresponding ACL version using Arm NN branch: $armnn_branch *****"
209
210 cd "$SOURCE_DIR"
James Conroy210897d2022-08-04 16:55:05 +0100211
212 rm -rf "$ACL_SRC"
213
214 git clone https://github.com/ARM-software/ComputeLibrary.git acl
215
216 # Get corresponding release tag for ACL by parsing release branch number for Arm NN
217 local acl_tag=""
218 acl_tag="$(echo "$armnn_branch" | tr '\n' ' ' | sed -e 's/[^0-9]/ /g' -e 's/^ *//g' -e 's/ *$//g' | tr -s ' ' | sed 's/ /./g')"
219
220 cd "$ACL_SRC"
221 git checkout v"$acl_tag"
222
223 echo -e "\n***** ACL Downloaded: $acl_tag *****"
224}
225
James Conroy919ec712022-07-13 12:57:53 +0100226usage()
227{
228 cat <<EOF
229build-armnn.sh - Build Arm NN and ACL
230build-armnn.sh [OPTION]...
Nikhil Raj542c8482023-04-26 16:22:10 +0100231 --tflite-classic-delegate
232 build the existing Arm NN TF Lite Delegate component
233 --tflite-opaque-delegate
234 build the new Arm NN opaque delegate component
James Conroy919ec712022-07-13 12:57:53 +0100235 --tflite-parser
236 build the Arm NN TF Lite Parser component
237 --onnx-parser
238 build the Arm NN ONNX parser component
239 --all
240 build all Arm NN components listed above
John Mcloughlin35bae832023-07-24 11:55:13 +0100241 --target-arch=[aarch64|android64|x86_64]
James Conroy919ec712022-07-13 12:57:53 +0100242 specify a target architecture (mandatory)
243 --neon-backend
244 build Arm NN with the NEON backend (CPU acceleration from ACL)
245 --cl-backend
246 build Arm NN with the OpenCL backend (GPU acceleration from ACL)
247 --ref-backend
248 build Arm NN with the reference backend (Should be used for verification purposes only. Does not provide any performance acceleration.)
249 --clean
250 remove previous Arm NN and ACL build prior to script execution (optional: defaults to off)
251 --debug
252 build Arm NN (and ACL) with debug turned on (optional: defaults to off)
253 --armnn-cmake-args=<ARG LIST STRING>
James Conroyc8d7a662022-11-18 10:17:27 +0000254 provide additional comma-separated CMake arguments string for building Arm NN (optional)
James Conroy919ec712022-07-13 12:57:53 +0100255 --acl-scons-params=<PARAM LIST STRING>
James Conroyc8d7a662022-11-18 10:17:27 +0000256 provide additional comma-separated scons parameters string for building ACL (optional)
James Conroy919ec712022-07-13 12:57:53 +0100257 --num-threads=<INTEGER>
258 specify number of threads/cores to build dependencies with (optional: defaults to number of online CPU cores on host)
259 -h, --help
260 print brief usage information and exit
261 -x
262 enable shell tracing in this script
263
Nikhil Raj542c8482023-04-26 16:22:10 +0100264At least one component (i.e. --tflite-classic-delegate, --tflite-opaque-delegate, --tflite-parser, --onnx-parser) must be provided or else provide --all to build all Arm NN components.
James Conroy919ec712022-07-13 12:57:53 +0100265At least one backend (i.e. --neon-backend, --cl-backend, --ref-backend) must be chosen.
266This script must be executed from the same root directory in which setup-armnn.sh was executed from.
267
James Conroy210897d2022-08-04 16:55:05 +0100268The first execution of this script will download the latest release branches of Arm NN and ACL, by default.
James Conroyc4fbbec2022-09-22 16:40:00 +0100269Alternatively, place custom/modified repositories named "armnn" and (optionally) "acl" in <ROOT_DIR>/source.
270Providing custom "acl" repo is optional since it is only required if backend flags --neon-backend or --cl-backend are chosen.
James Conroy919ec712022-07-13 12:57:53 +0100271
272By default, a tarball tar.gz archive of the Arm NN build will be created in the directory from which this script is called from.
273
274Examples:
275Build for aarch64 with all Arm NN components, NEON enabled and OpenCL enabled:
276 <PATH_TO>/build-armnn.sh --target-arch=aarch64 --all --neon-backend --cl-backend
277Build for aarch64 with TF Lite Delegate, OpenCL enabled and additional ACL scons params:
Nikhil Raj542c8482023-04-26 16:22:10 +0100278 <PATH_TO>/build-armnn.sh --target-arch=aarch64 --tflite-classic-delegate --cl-backend --acl-scons-params='compress_kernels=1,benchmark_examples=1'
James Conroye6f30ad2022-09-08 12:04:26 +0100279Setup for aarch64 with all Arm NN dependencies, OpenCL enabled and additional Arm NN cmake args:
James Conroyc8d7a662022-11-18 10:17:27 +0000280 <PATH_TO>/build-armnn.sh --target-arch=aarch64 --all --cl-backend --armnn-cmake-args='-DBUILD_SAMPLE_APP=1,-DBUILD_UNIT_TESTS=0'
James Conroy919ec712022-07-13 12:57:53 +0100281EOF
282}
283
284# This will catch in validation.sh if not set
285target_arch=""
286
287# Default flag values
Nikhil Raj542c8482023-04-26 16:22:10 +0100288flag_tflite_classic_delegate=0
289flag_tflite_opaque_delegate=0
James Conroy919ec712022-07-13 12:57:53 +0100290flag_tflite_parser=0
291flag_onnx_parser=0
292flag_neon_backend=0
293flag_cl_backend=0
294flag_ref_backend=0
295flag_clean=0
296flag_debug=0
Nikhil Raj0d294532023-04-20 15:19:05 +0100297flag_jni=0
James Conroy919ec712022-07-13 12:57:53 +0100298
299# Empty strings for optional additional args by default
300armnn_cmake_args=""
301acl_scons_params=""
302
303# If --num-threads is not set, the default NUM_THREADS value in common.sh will be used
304num_threads=0
305
306name=$(basename "$0")
307
308# If no options provided, show help
309if [ $# -eq 0 ]; then
310 usage
311 exit 1
312fi
313
Nikhil Raj542c8482023-04-26 16:22:10 +0100314args=$(getopt -ohx -l tflite-classic-delegate,tflite-opaque-delegate,tflite-parser,onnx-parser,all,target-arch:,neon-backend,cl-backend,ref-backend,clean,debug,armnn-cmake-args:,acl-scons-params:,num-threads:,help -n "$name" -- "$@")
James Conroy919ec712022-07-13 12:57:53 +0100315eval set -- "$args"
316while [ $# -gt 0 ]; do
317 if [ -n "${opt_prev:-}" ]; then
318 eval "$opt_prev=\$1"
319 opt_prev=
320 shift 1
321 continue
322 elif [ -n "${opt_append:-}" ]; then
323 if [ -n "$1" ]; then
324 eval "$opt_append=\"\${$opt_append:-} \$1\""
325 fi
326 opt_append=
327 shift 1
328 continue
329 fi
330 case $1 in
331 --tflite-parser)
332 flag_tflite_parser=1
333 ;;
334
Nikhil Raj542c8482023-04-26 16:22:10 +0100335 --tflite-classic-delegate)
Nikhil Raj365fa4b2023-05-03 09:39:56 +0100336 flag_tflite_classic_delegate=1
James Conroy919ec712022-07-13 12:57:53 +0100337 ;;
338
Nikhil Raj542c8482023-04-26 16:22:10 +0100339 --tflite-opaque-delegate)
340 flag_tflite_opaque_delegate=1
341 ;;
342
James Conroy919ec712022-07-13 12:57:53 +0100343 --onnx-parser)
344 flag_onnx_parser=1
345 ;;
346
347 --all)
Nikhil Raj542c8482023-04-26 16:22:10 +0100348 flag_tflite_classic_delegate=1
349 flag_tflite_opaque_delegate=1
James Conroy919ec712022-07-13 12:57:53 +0100350 flag_tflite_parser=1
351 flag_onnx_parser=1
352 ;;
353
354 --target-arch)
355 opt_prev=target_arch
356 ;;
357
358 --neon-backend)
359 flag_neon_backend=1
360 ;;
361
362 --cl-backend)
363 flag_cl_backend=1
364 ;;
365
366 --ref-backend)
367 flag_ref_backend=1
368 ;;
369
370 --clean)
371 flag_clean=1
372 ;;
373
374 --debug)
375 flag_debug=1
376 ;;
377
378 --armnn-cmake-args)
379 opt_prev=armnn_cmake_args
380 ;;
381
382 --acl-scons-params)
383 opt_prev=acl_scons_params
384 ;;
385
386 --num-threads)
387 opt_prev=num_threads
388 ;;
389
390 -h | --help)
391 usage
392 exit 0
393 ;;
394
395 -x)
396 set -x
397 ;;
398
399 --)
400 shift
401 break 2
402 ;;
403
404 esac
405 shift 1
406done
407
408# shellcheck source=common.sh
409source "$rel_path"/common.sh
410
411# Validation of chosen Arm NN backends
412if [ "$flag_neon_backend" -eq 0 ] && [ "$flag_cl_backend" -eq 0 ] && [ "$flag_ref_backend" -eq 0 ]; then
413 echo -e "\n$name: at least one of flags --neon-backend, --cl-backend or --ref-backend must be set."
414 exit 1
415fi
416
417if [ "$target_arch" == "x86_64" ]; then
418 if [ "$flag_neon_backend" -eq 1 ] || [ "$flag_cl_backend" -eq 1 ]; then
419 echo "$name: Accelerated backends --neon-backend and --cl-backend are supported on Arm targets only (x86_64 chosen)."
420 exit 1
421 fi
422fi
423
424# Verify that root source and build directories are present (post execution of setup-armnn.sh)
425if [ ! -d "$SOURCE_DIR" ]; then
426 echo -e "\nERROR: Root source directory does not exist at $SOURCE_DIR"
427 echo "Please check that:"
428 echo "1. setup-armnn.sh was executed successfully prior to running this script"
429 echo "2. This script is being executed in the same directory as setup-armnn.sh"
430
431 exit 1
432fi
433
434if [ ! -d "$BUILD_DIR" ]; then
435 echo -e "\nERROR: Root build directory does not exist at $BUILD_DIR"
436 echo "Please check that:"
437 echo "1. setup-armnn.sh was executed successfully prior to running this script"
438 echo "2. This script is being executed in the same directory as setup-armnn.sh"
439
440 exit 1
441fi
442
James Conroyc4fbbec2022-09-22 16:40:00 +0100443# Download Arm NN if not done already in a previous execution of this script
James Conroy210897d2022-08-04 16:55:05 +0100444# Check if Arm NN source directory exists AND that it is a repository (not empty)
445if [ -d "$ARMNN_SRC" ] && check_if_repository "$ARMNN_SRC"; then
446 echo -e "\n***** Arm NN source repository already located at $ARMNN_SRC. Skipping cloning of Arm NN. *****"
James Conroyc4fbbec2022-09-22 16:40:00 +0100447else
448 # Download latest release branch of Arm NN
449 download_armnn
450fi
James Conroy919ec712022-07-13 12:57:53 +0100451
James Conroyc4fbbec2022-09-22 16:40:00 +0100452# Download ACL if not done already in a previous execution of this script
453# Only download ACL if backend options --neon-backend and --cl-backend are chosen
454if [ "$flag_neon_backend" -eq 1 ] || [ "$flag_cl_backend" -eq 1 ]; then
455 # Check if Arm NN source directory exists AND that it is a repository (not empty)
James Conroy210897d2022-08-04 16:55:05 +0100456 if [ -d "$ACL_SRC" ] && check_if_repository "$ACL_SRC"; then
457 echo -e "\n***** ACL source repository already located at $ACL_SRC. Skipping cloning of ACL. *****"
458 else
James Conroyc4fbbec2022-09-22 16:40:00 +0100459 # Download latest release branch of ACL
460 download_acl
James Conroy919ec712022-07-13 12:57:53 +0100461 fi
James Conroy210897d2022-08-04 16:55:05 +0100462else
James Conroyc4fbbec2022-09-22 16:40:00 +0100463 echo -e "\n***** Backend options --neon-backend and --cl-backend not selected - skipping cloning of ACL *****"
James Conroy919ec712022-07-13 12:57:53 +0100464fi
465
466# Adjust output build directory names for Arm NN and ACL if debug is enabled
467DEBUG_POSTFIX=""
468if [ "$flag_debug" -eq 1 ]; then
469 DEBUG_POSTFIX="_debug"
470fi
471
James Conroyc8d7a662022-11-18 10:17:27 +0000472# Replace commas with spaces in additional Arm NN / ACL build args
473# shellcheck disable=SC2001
474armnn_cmake_args="$(echo "$armnn_cmake_args" | sed 's/,/ /g')"
475
476# shellcheck disable=SC2001
477acl_scons_params="$(echo "$acl_scons_params" | sed 's/,/ /g')"
478
James Conroy919ec712022-07-13 12:57:53 +0100479# Directories for Arm NN and ACL build outputs
480ARMNN_BUILD_ROOT="$BUILD_DIR"/armnn
481ARMNN_BUILD_DIR_NAME="$TARGET_ARCH"_build"$DEBUG_POSTFIX"
482ARMNN_BUILD_TARGET="$ARMNN_BUILD_ROOT"/"$ARMNN_BUILD_DIR_NAME"
483ACL_BUILD_TARGET="$BUILD_DIR"/acl/"$TARGET_ARCH"_build"$DEBUG_POSTFIX"
484
485echo -e "\nINFO: Displaying configuration information before execution of $name"
Nikhil Raj542c8482023-04-26 16:22:10 +0100486echo " target-arch: $TARGET_ARCH"
487echo " host-arch: $HOST_ARCH"
488echo "tflite-classic-delegate: $flag_tflite_classic_delegate"
489echo "tflite-opaque-delegate : $flag_tflite_opaque_delegate"
490echo " tflite-parser: $flag_tflite_parser"
491echo " onnx-parser: $flag_onnx_parser"
492echo " neon-backend: $flag_neon_backend"
493echo " cl-backend: $flag_cl_backend"
494echo " ref-backend: $flag_ref_backend"
495echo " clean: $flag_clean"
496echo " debug: $flag_debug"
497echo " armnn-cmake-args: $armnn_cmake_args"
498echo " acl-scons-params: $acl_scons_params"
499echo " num-threads: $NUM_THREADS"
500echo " root directory: $ROOT_DIR"
501echo " source directory: $SOURCE_DIR"
502echo " build directory: $BUILD_DIR"
503echo " armnn build dir: $ARMNN_BUILD_TARGET"
James Conroy919ec712022-07-13 12:57:53 +0100504echo -e "\nScript execution will begin in 10 seconds..."
505
506sleep 10
507
508if [ "$flag_neon_backend" -eq 1 ] || [ "$flag_cl_backend" -eq 1 ]; then
509 build_acl
510else
511 echo -e "\n***** Skipping ACL build: --neon-backend and --cl-backend not set in options. *****"
512fi
513
514build_armnn
515
Teresa Charlinad1b3d72023-03-14 12:10:28 +0000516exit 0