Lines Matching +full:runs +full:- +full:on

3 # SPDX-FileCopyrightText: Copyright 2024 Arm Limited and/or its affiliates <open-source-office@arm.…
5 # SPDX-License-Identifier: Apache-2.0
11 # www.apache.org/licenses/LICENSE-2.0
14 # distributed under the License is distributed on an AS IS BASIS, WITHOUT
20 # Date: 2024-05-21
21 # This bash script downloads unit test dependencies, builds unit tests and also runs the tests.
23 CPU="cortex-m55"
24 OPTIMIZATION="-Ofast"
39 Helper script to setup, build and run CMSIS-NN unit tests
42 -h Display this message.
43-c Target cpu. Takes multiple arguments as a comma seperated list. eg cortex-m3,cortex-m7,cortex-
44 -o Optimization level. (default: '-Ofast')
45-q Quiet mode. This reduces the amount of info printed from building and running cmsis-unit tests.
46-b Disable CMake build. Only works with previously built targets. Designed to quickly rerun cpu t…
47-r Disable running the unit tests. Designed to test build only or allow user to manually run indi…
48-e Disable environment setup. This flag will stop the script from attempting to download dependen…
49-a Use Arm Compiler that is previously available on machine. Ensure compiler directory is added t…
50-p Disable the usage of python venv from download directory. Requires dependencies to be install …
51-f Disable the usage of FVP from download directory. Requires FVP to be in path before calling sc…
52 -u Path to ethos-u-core-platform
53-g Disable the usage of GCC that is already from download directory. Requires gcc to be in path b…
54 -C Path to cmsis 5
56 example usage: $(basename "$0") -c cortex-m3,cortex-m4 -o '-O2' -q
80 set -e
82 if [[ -d ${WORKING_DIR}/corstone300_download ]]; then
86 …ONE_URL=https://developer.arm.com/-/media/Arm%20Developer%20Community/Downloads/OSS/FVP/Corstone-3…
88 …ONE_URL=https://developer.arm.com/-/media/Arm%20Developer%20Community/Downloads/OSS/FVP/Corstone-3…
91 TEMPFILE=$(mktemp -d)/temp_file
92 wget ${CORSTONE_URL} -O ${TEMPFILE} >&2
94 TEMPDIR=$(mktemp -d)
95 tar -C ${TEMPDIR} -xvzf ${TEMPFILE} >&2
97 …${TEMPDIR}/FVP_Corstone_SSE-300.sh --i-agree-to-the-contained-eula --no-interactive -d ${WORKING_D…
101 if [[ -d ${WORKING_DIR}/arm_gcc_download ]]; then
105 …_URL="https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.…
107 …URL="https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2…
110 TEMPFILE=$(mktemp -d)/temp_file
111 wget ${GCC_URL} -O ${TEMPFILE} >&2
114 tar -C ${WORKING_DIR}/arm_gcc_download --strip-components=1 -xJf ${TEMPFILE} >&2
117 echo "++ Cloning CMSIS-5"
118 if [[ -d ${WORKING_DIR}/CMSIS_5 ]]; then
119 …echo "CMSIS-5 already installed. If you wish to install a new version, please delete the old folde…
121 git clone https://github.com/ARM-software/CMSIS_5.git
124 echo "++ Cloning Ethos-U core platform"
125 if [[ -d ${WORKING_DIR}/ethos-u-core-platform ]]; then
126 …echo "Ethos-U core platform already installed. If you wish to install a new version, please delete…
128 git clone https://review.mlplatform.org/ml/ethos-u/ethos-u-core-platform
132 if [[ -d ${WORKING_DIR}/cmsis_nn_venv ]]; then
135 python3 -m venv cmsis_nn_venv
137 pip3 install -r ../requirements.txt
143 set -e
145 if [[ ${QUIET} -eq 0 ]]; then
146 …cmake -S ./ -B build-${cpu}-${compiler} -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} -DTARGET_CPU=${cp…
147 cmake --build build-${cpu}-${compiler}/
149 echo "Built successfully into build-${cpu}-${compiler}"
151 …mmand=$(cmake -S ./ -B build-${cpu}-${compiler} -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} -DTARGET_…
152 make_command=$(cmake --build build-${cpu}-${compiler}/ 2>&1)
153 echo "${cmake_command}" > build-${cpu}-${compiler}/cmake_command.txt
154 echo "${make_command}" > build-${cpu}-${compiler}/make_command.txt
156 echo "Built successfully into build-${cpu}-${compiler}"
163 readarray -d '' tests < <(find ./build-${cpu}-${compiler}/ -iname "*.elf" -print0)
167-300_Ethos-U55 -C mps3_board.uart0.shutdown_on_eot=1 -C mps3_board.visualisation.disable-visualisa…
168 echo "$output" | grep "0 Failures" -vqz
169 if [[ $? -eq 0 ]]; then
173 elif [[ ${QUIET} -eq 0 ]]; then
180 if [[ ${BUILD} -eq 0 && ${RUN} -eq 0 && ${SETUP_ENVIRONMENT} -eq 0 ]]; then
185 UNAME_M=$(uname -m)
186 UNAME_S=$(uname -s)
193 mkdir -p downloads
197 if [[ ${SETUP_ENVIRONMENT} -eq 1 ]]; then
202 if [[ ${USE_PYTHON_VENV} -eq 1 ]]; then
206 if [[ -z "${ETHOS_U_CORE_PLATFORM_PATH}" ]]; then
207 ETHOS_U_CORE_PLATFORM_PATH="${WORKING_DIR}/ethos-u-core-platform"
210 if [[ -z "${CMSIS_5_PATH}" ]]; then
215 IFS=',' read -r -a cpu_array <<< "$CPU"
217 if [[ ${BUILD} -eq 1 || ${RUN} -eq 1 ]]; then
221 if [[ ${USE_ARM_COMPILER} -eq 1 ]]; then
222 compiler="arm-compiler"
225 if [[ ${USE_GCC_FROM_DOWNLOAD} -eq 1 ]]; then
229 TOOLCHAIN_FILE=${ETHOS_U_CORE_PLATFORM_PATH}/cmake/toolchain/arm-none-eabi-gcc.cmake
232 if [[ $USE_FVP_FROM_DOWNLOAD -eq 1 ]]; then
234 export PATH=${WORKING_DIR}/corstone300_download/models/Linux64_GCC-9.3/:${PATH}
236 … export PATH=${WORKING_DIR}/corstone300_download/models/Linux64_armv8l_GCC-9.3/:${PATH}
240 if [[ ${BUILD} -eq 1 ]]; then
244 if [[ ${RUN} -eq 1 ]]; then
252 if [[ ${USE_PYTHON_VENV} -eq 1 ]]; then