This is an automated email from the ASF dual-hosted git repository.
lukhut pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push:
new 5d3f3dd644 [microTVM] Check the output of microNPU demos in CI (#15667)
5d3f3dd644 is described below
commit 5d3f3dd644d092f8d082dd0992c08601176e6d83
Author: Luke Hutton <[email protected]>
AuthorDate: Wed Sep 6 15:09:42 2023 +0100
[microTVM] Check the output of microNPU demos in CI (#15667)
This is a followup from #15649 which caught a misclassification
issue when running the microNPU demo. While #15649 fixes the issue
and results in the correct classification, this commit ensures the
demo does not regress again in the future.
---
tests/scripts/task_demo_microtvm.sh | 31 ++++++++++++++++++++++++++++---
1 file changed, 28 insertions(+), 3 deletions(-)
diff --git a/tests/scripts/task_demo_microtvm.sh
b/tests/scripts/task_demo_microtvm.sh
index eca7a0f623..19ae297480 100755
--- a/tests/scripts/task_demo_microtvm.sh
+++ b/tests/scripts/task_demo_microtvm.sh
@@ -20,8 +20,21 @@ set -euxo pipefail
source tests/scripts/setup-pytest-env.sh
+TMP_LOG_FILE=/tmp/$$.out.log
+
+cleanup()
+{
+ rm -f $TMP_LOG_FILE
+}
+trap cleanup 0
+
pushd apps/microtvm/cmsisnn
- timeout 5m ./run_demo.sh
+timeout 5m ./run_demo.sh > $TMP_LOG_FILE
+cat $TMP_LOG_FILE
+if ! grep -q "Person detected." $TMP_LOG_FILE; then
+ echo "The demo returned the wrong result"
+ exit 1
+fi
popd
# TODO(mehrdadh): disabled due to https://github.com/apache/tvm/issues/13856
@@ -34,6 +47,18 @@ FVP_PATH="/opt/arm/FVP_Corstone_SSE-300_Ethos-U55"
CMAKE_PATH="/opt/arm/cmake/bin/cmake"
FREERTOS_PATH="/opt/freertos/FreeRTOSv202112.00"
- timeout 5m ./run_demo.sh --fvp_path $FVP_PATH --cmake_path $CMAKE_PATH
- timeout 5m ./run_demo.sh --fvp_path $FVP_PATH --cmake_path $CMAKE_PATH
--freertos_path $FREERTOS_PATH
+timeout 5m ./run_demo.sh --fvp_path $FVP_PATH --cmake_path $CMAKE_PATH >
$TMP_LOG_FILE
+cat $TMP_LOG_FILE
+if ! grep -q "The image has been classified as 'tabby'" $TMP_LOG_FILE; then
+ echo "The demo returned the wrong result"
+ exit 1
+fi
+
+timeout 5m ./run_demo.sh --fvp_path $FVP_PATH --cmake_path $CMAKE_PATH
--freertos_path $FREERTOS_PATH > $TMP_LOG_FILE
+cat $TMP_LOG_FILE
+if ! grep -q "The image has been classified as 'tabby'" $TMP_LOG_FILE; then
+ echo "The demo returned the wrong result"
+ exit 1
+fi
+
popd