zephyr/samples/modules/tflite-micro/tflm_ethosu
Lauren Murphy d0ae602cef tflite-micro: update README to pull optional module
tflite-micro is an optional module now, and needs to be
pulled for the sample to build.

Fixes #69942.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2024-03-19 14:31:15 -04:00
..
src treewide: Add CODE_UNREACHABLE after k_thread_abort(current) 2023-10-24 09:04:42 +02:00
CMakeLists.txt samples and tests: Add REQUIRED to Zephyr find_package call 2023-03-02 09:58:27 +01:00
Kconfig samples: Add a TFLU Ethos-U sample program 2022-11-15 14:47:43 +01:00
linker.ld samples: Add a TFLU Ethos-U sample program 2022-11-15 14:47:43 +01:00
prj.conf samples: tflite-micro: update samples for latest tflite-micro 2023-09-25 09:46:33 +02:00
README.rst tflite-micro: update README to pull optional module 2024-03-19 14:31:15 -04:00
sample.yaml hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00

.. _tflm_ethosu:

Arm(R) Ethos(TM)-U Tensorflow Lite for Microcontrollers test application
########################################################################

A sample application that demonstrates how to run an inference using the TFLM
framework and the Arm Ethos-U NPU.

The sample application runs a model that has been downloaded from the
`Arm model zoo <https://github.com/ARM-software/ML-zoo>`_. This model has then
been optimized using the
`Vela compiler <https://git.mlplatform.org/ml/ethos-u/ethos-u-vela.git>`_.

Vela takes a tflite file as input and produces another tflite file as output,
where the operators supported by Ethos-U have been replaced by an Ethos-U custom
operator. In an ideal case the complete network would be replaced by a single
Ethos-U custom operator.

Building and running
********************

Add the tflite-micro module to your West manifest and pull it:

.. code-block:: console

    west config manifest.project-filter -- +tflite-micro
    west update

This application can be built and run on any Arm Ethos-U capable platform, for
example Corstone(TM)-300. A reference implementation of Corstone-300 can be
downloaded either as a FPGA bitfile for the
`MPS3 FPGA prototyping board <https://developer.arm.com/tools-and-software/development-boards/fpga-prototyping-boards/mps3>`_,
or as a
`Fixed Virtual Platform <https://developer.arm.com/tools-and-software/open-source-software/arm-platforms-software/arm-ecosystem-fvps>`_
that can be emulated on a host machine.

Assuming that the Corstone-300 FVP has been downloaded, installed and added to
the ``PATH`` variable, then building and testing can be done with following
commands.

.. code-block:: bash

    $ west build -b mps3/an547 zephyr/samples/modules/tflite-micro/tflm_ethosu
    $ FVP_Corstone_SSE-300_Ethos-U55 build/zephyr/zephyr.elf