You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by ar...@apache.org on 2021/10/14 04:17:02 UTC

[tvm] branch main updated: [CI] Pre-build Reference System Dependencies (#9270)

This is an automated email from the ASF dual-hosted git repository.

areusch 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 4c00264  [CI] Pre-build Reference System Dependencies (#9270)
4c00264 is described below

commit 4c0026495551d2797bf5df016386c712ba6f4a05
Author: Christopher Sidebottom <ch...@arm.com>
AuthorDate: Thu Oct 14 05:16:39 2021 +0100

    [CI] Pre-build Reference System Dependencies (#9270)
    
    Building these dependencies from scratch in each test was taking much
    longer than really necessary.
    
    Before:
    ```
    $ time python3 -m pytest tests/python/contrib/test_ethosu/test_codegen.py::test_tflite_depthwise_conv2d[strides0-dilation0-SAME-kernel_shape0-relu-ifm_shape0-ethos-u55-256]
    real    0m19.982s
    user    0m13.255s
    sys     0m3.403s
    ```
    
    After:
    ```
    $ time python3 -m pytest tests/python/contrib/test_ethosu/test_codegen.py::test_tflite_depthwise_conv2d[strides0-dilation0-SAME-kernel_shape0-relu-ifm_shape0-ethos-u55-256]
    real    0m10.963s
    user    0m5.516s
    sys     0m2.232s
    ```
---
 docker/install/ubuntu_install_ethosu_driver_stack.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/docker/install/ubuntu_install_ethosu_driver_stack.sh b/docker/install/ubuntu_install_ethosu_driver_stack.sh
index c5ab20e..db8b473 100755
--- a/docker/install/ubuntu_install_ethosu_driver_stack.sh
+++ b/docker/install/ubuntu_install_ethosu_driver_stack.sh
@@ -92,3 +92,13 @@ cd "${ethosu_dir}"
 git clone "https://github.com/ARM-software/CMSIS_5.git" cmsis
 cd cmsis
 git checkout -f tags/${cmsis_ver}
+
+# Build Driver
+mkdir ${ethosu_dir}/core_driver/build && cd ${ethosu_dir}/core_driver/build
+cmake -DCMAKE_TOOLCHAIN_FILE=${ethosu_dir}/core_platform/cmake/toolchain/arm-none-eabi-gcc.cmake -DETHOSU_LOG_SEVERITY=debug -DTARGET_CPU=cortex-m55 ..
+make
+
+# Build NN Library
+mkdir ${ethosu_dir}/cmsis/CMSIS/NN/build/ && cd ${ethosu_dir}/cmsis/CMSIS/NN/build/
+cmake .. -DCMAKE_TOOLCHAIN_FILE=${ethosu_dir}/core_platform/cmake/toolchain/arm-none-eabi-gcc.cmake -DTARGET_CPU=cortex-m55 -DBUILD_CMSIS_NN_FUNCTIONS=YES
+make