Aleksei-grovety commented on code in PR #15303:
URL: https://github.com/apache/tvm/pull/15303#discussion_r1267696259


##########
apps/microtvm/ethosu/README.md:
##########
@@ -56,43 +54,57 @@ For example if you've installed these in ```/opt/arm``` , 
then you would do the
 ```bash
 export 
PATH=/opt/arm/FVP_Corstone_SSE-300/models/Linux64_GCC-6.4:/opt/arm/cmake/bin:$PATH
 ```
+If you are going to compile and run the demo on [Alif 
DevKit](https://alifsemi.com/support/kits/ensemble-devkit/) you will also need 
[Alif's SETools](https://alifsemi.com/support/software-tools/ensemble/) 
installed and configured.

Review Comment:
   Can we add a script to install the required software?



##########
apps/microtvm/ethosu/run_demo.sh:
##########
@@ -132,10 +149,35 @@ done
 # Directories
 script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
 
-# Make build directory
 make cleanall
-mkdir -p build
-cd build
+
+if [ -n "${ALIF_TARGET_BOARD+x}" ]; then
+    mkdir -p ${script_dir}/build/dependencies
+    cd ${script_dir}/build/dependencies
+
+    # Clone Alif's evaluation kit
+    ALIF_ML_KIT_VERSION="cb583e4cfb34dccb683717513ec94beacb6957ab"
+    wget -q 
https://github.com/Grovety/alif_ml-embedded-evaluation-kit/archive/${ALIF_ML_KIT_VERSION}.zip
 -O ALIF_Ml_KIT.zip
+    unzip -q ALIF_Ml_KIT.zip -d .
+    mv alif_ml-embedded-evaluation-kit-${ALIF_ML_KIT_VERSION} 
alif_ml-embedded-evaluation-kit
+    rm ALIF_Ml_KIT.zip
+
+    ALIF_CMSIS_VERSION="dd07ce1b3f25cf588455167a3583e8579c6dca8b"
+    wget -q 
https://github.com/alifsemi/alif_ensemble-cmsis-dfp/archive/${ALIF_CMSIS_VERSION}.zip
 -O ALIF_CMSIS.zip
+    unzip -q ALIF_CMSIS.zip -d .
+    mv alif_ensemble-cmsis-dfp-${ALIF_CMSIS_VERSION} alif_ensemble-cmsis-dfp
+    rm ALIF_CMSIS.zip
+
+    # Clone the latest version of vela compiler

Review Comment:
   I suppose there should be TODO to remove this code after the necessary 
changes will be included in released version.



##########
apps/microtvm/ethosu/Makefile_alif.mk:
##########
@@ -0,0 +1,132 @@
+# 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.
+
+
+.PHONY: clean
+
+CC := arm-none-eabi-gcc
+CXX := arm-none-eabi-g++
+AR := arm-none-eabi-ar
+OBJCOPY := arm-none-eabi-objcopy
+
+PWD := $(abspath $(shell pwd))
+BUILD_DIR := $(PWD)/build
+PLATFORM ?= RTSS_HP

Review Comment:
   Maybe add information in the README that we can choose between RTSS_HP and 
RTSS_HE



##########
apps/microtvm/ethosu/README.md:
##########
@@ -56,43 +54,57 @@ For example if you've installed these in ```/opt/arm``` , 
then you would do the
 ```bash
 export 
PATH=/opt/arm/FVP_Corstone_SSE-300/models/Linux64_GCC-6.4:/opt/arm/cmake/bin:$PATH
 ```
+If you are going to compile and run the demo on [Alif 
DevKit](https://alifsemi.com/support/kits/ensemble-devkit/) you will also need 
[Alif's SETools](https://alifsemi.com/support/software-tools/ensemble/) 
installed and configured.
 
-Running the demo application
-----------------------------
-Type the following command to run the bare metal demo application 
([src/demo_bare_metal.c](./src/demo_bare_metal.c)):
+Understanding the demo application
+----------------------------------
+This demo will:
+- Download a quantized (int8) mobilenet v2 model
+- Use tvmc to compile the model for Cortex(R)-M55 CPU, Ethos(TM)-U55 NPU and 
CMSIS-NN

Review Comment:
   Maybe add more details: we specify for tvmc --target=ethos-u,cmsis-nn,c and 
first the operations that can be performed on ethos-u are offloaded from the 
model, then the same for cmsis-nn and c.



##########
apps/microtvm/ethosu/run_demo.sh:
##########
@@ -148,6 +190,7 @@ python3 -m tvm.driver.tvmc compile 
--target=ethos-u,cmsis-nn,c \
     --target-ethos-u-accelerator_config=ethos-u55-256 \
     --target-cmsis-nn-mcpu=cortex-m55 \
     --target-c-mcpu=cortex-m55 \
+    --target-ethos-u-disable_copying_constants=1 \

Review Comment:
   Maybe add information in the README that we use mode when weights should be 
placed in the SRAM.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to