MVP Python Wrapper¶
This allows for running the MVP-accelerated Tensorflow-Lite Micro (TFLM) kernels from a Python script.
This is useful as it allows for running
.tflite model files in the MVP simulator and determining values such as:
Required runtime memory (i.e. RAM)
Number of MVP clock cycles required to execute model
Which parts the model were not able to be accelerated
This wrapper is not used directly. Instead, it is loaded by the TfliteMicro Python package when specifying the
accelerator = mvp.
Python wrapper - This makes the MVP-accelerated TFLM kernels accessible to Python
MVP Tensorflow-Lite Micro Kernels - The MVP-accelerated Tensorflow-Lite Micro kernels. These run on the embedded device or in the MVP simulator
Building the Wrapper¶
This wrapper comes pre-built when installing the MLTK Python package, e.g.:
pip install silabs-mltk
This wrapper is automatically built when installing from source, e.g.:
git clone https://github.com/siliconlabs/mltk.git cd mltk pip install -e .
Manual build via MLTK command¶
To manually build this wrapper, issue the MLTK command:
mltk build mvp_wrapper
Manual build via CMake¶
To build the wrapper, the build_options.cmake file needs to be modified.
Create the file
<mltk repo root>/user_options.cmake and add:
You must remove this option and clean the build directory before building the example applications
Then configure the CMake project using the Window/Linux GCC toolchain and build the target: