diff --git a/Jenkinsfile b/Jenkinsfile index 1cd8575fa3fd..8d94775e8557 100755 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -369,6 +369,10 @@ stage('Build') { script: "${docker_run} ${ci_qemu} ./tests/scripts/task_python_microtvm.sh", label: 'Run microTVM tests', ) + sh ( + script: "${docker_run} ${ci_qemu} ./tests/scripts/task_demo_microtvm.sh", + label: 'Run microTVM demos', + ) junit 'build/pytest-results/*.xml' } } diff --git a/apps/microtvm/ethosu/run_demo.sh b/apps/microtvm/ethosu/run_demo.sh index 5dd23bc12df8..57fa09222c2a 100755 --- a/apps/microtvm/ethosu/run_demo.sh +++ b/apps/microtvm/ethosu/run_demo.sh @@ -128,9 +128,7 @@ mobilenet_url='https://storage.googleapis.com/download.tensorflow.org/models/mob curl --retry 64 -sSL ${mobilenet_url} | gunzip | tar -xvf - ./mobilenet_v1_1.0_224_quant.tflite # Compile model for Arm(R) Cortex(R)-M55 CPU and Ethos(TM)-U55 NPU -# An alternative to using "python3 -m tvm.driver.tvmc" is to call -# "tvmc" directly once TVM has been pip installed. -python3 -m tvm.driver.tvmc compile --target="ethos-u -accelerator_config=ethos-u55-256, c" \ +tvmc compile --target="ethos-u -accelerator_config=ethos-u55-256, c" \ --target-c-mcpu=cortex-m55 \ --runtime=crt \ --executor=aot \ diff --git a/tests/scripts/task_ci_setup.sh b/tests/scripts/task_ci_setup.sh index 33ea484a5268..9218a3892aa9 100755 --- a/tests/scripts/task_ci_setup.sh +++ b/tests/scripts/task_ci_setup.sh @@ -39,3 +39,6 @@ python3 -m pip install --user tlcpack-sphinx-addon==0.2.1 synr==0.6.0 # Ensure no stale pytest-results remain from a previous test run. (cd build && rm -rf pytest-results) + +# Install tvm as a local package to allow tvmc to work +python3 -m pip install --user -e ./python diff --git a/tests/scripts/task_cpp_unittest.sh b/tests/scripts/task_cpp_unittest.sh index e6c3669c7605..3df7b580d79d 100755 --- a/tests/scripts/task_cpp_unittest.sh +++ b/tests/scripts/task_cpp_unittest.sh @@ -45,17 +45,3 @@ cd apps/bundle_deploy rm -rf build make test_dynamic test_static cd ../.. - -# Test Arm(R) Cortex(R)-M55 CPU and Ethos(TM)-U55 NPU demo app -FVP_PATH="/opt/arm/FVP_Corstone_SSE-300" - -# TODO(@grant-arm): Remove once ci_cpu docker image has been updated to FVP_Corstone_SSE -if test ! -d $FVP_PATH; then - FVP_PATH="/opt/arm/FVP_Corstone_SSE-300_Ethos-U55" -fi - -if test -d $FVP_PATH && pip3 list | grep vela; then - cd apps/microtvm/ethosu - ./run_demo.sh --fvp_path $FVP_PATH --cmake_path /opt/arm/cmake/bin/cmake - cd ../../.. -fi diff --git a/tests/scripts/task_demo_microtvm.sh b/tests/scripts/task_demo_microtvm.sh new file mode 100755 index 000000000000..79fa5996848e --- /dev/null +++ b/tests/scripts/task_demo_microtvm.sh @@ -0,0 +1,23 @@ +#!/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 -euxo pipefail + +pushd apps/microtvm/ethosu +./run_demo.sh --cmake_path /opt/arm/cmake/bin/cmake +popd