This example evaluates the inference speed on microcontrollers natively, and with WAMR interpreter and WAMR AoT (Ahead-of-Time compilation). The example uses RIOT-ML to generate the machine learning inference code.
You must install Apache TVM to be used by RIOT-ML. To do this, you can use an automated script available on:
bash ../../../scripts/install-RIOT-ML.bashTo generate native model example, run in the current folder:
../../../scripts/create_example_tinyml.bash
cp -r model-template/* modelIn each subfolder, you can:
- run
BOARD=arduino-nano-33-ble make clean all flash termto flash the inference and evaluation code on your board. It will display the time required to do inference with DS CNN model.- You can replace
arduino-nano-33-blewith your board, the full list of supported boards is available in RIOT-OS documentation.
- You can replace
- run
BOARD=arduino-nano-33-ble make clean bench-sizeto display the size of the different components in the produced image.