From aa6faf923313478570a1c80d9097095ccf7f3d38 Mon Sep 17 00:00:00 2001 From: Mikolaj Klikowicz Date: Thu, 14 Nov 2024 11:59:13 +0100 Subject: [PATCH] [#68736] README: Describe RuntimeBuilder scenarios Signed-off-by: Mikolaj Klikowicz --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/README.md b/README.md index 2ddbf2e..c26cd13 100644 --- a/README.md +++ b/README.md @@ -232,6 +232,17 @@ kenning optimize test report \ The model performance report in Markdown will be available under `reports/stm32-renode-tflite-magic-wand/report.md`. The HTML version of the report will be accessible from `reports/stm32-renode-tflite-magic-wand/report/report.html`. +The above two steps (`west build` and `kenning ...`) can be also performed by Kenning automatically using `ZephyrRuntimeBuilder` block, e.g. as in the scenario located in `kenning-scenarios/renode-zephyr-auto-tflite-magic-wand-inference.json`: + +```bash +kenning optimize test report \ + --json-cfg kenning-scenarios/renode-zephyr-auto-tflite-magic-wand-inference.json \ + --measurements results.json --verbosity INFO \ + --report-path reports/stm32-renode-auto-tflite-magic-wand/report.md \ + --to-html \ + --verbosity INFO +``` + #### Using microTVM To build the `kenning-zephyr-runtime` app to work with microTVM runtime, set `-DEXTRA_CONF_FILE` to `tvm.conf`, e.g. by executing: @@ -251,6 +262,17 @@ kenning optimize test report \ --verbosity INFO ``` +The above two steps (`west build` and `kenning ...`) can be also performed by Kenning automatically using `ZephyrRuntimeBuilder` block: + +```bash +kenning optimize test report \ + --json-cfg kenning-scenarios/renode-zephyr-auto-tvm-magic-wand-inference.json \ + --measurements results.json --verbosity INFO \ + --report-path reports/stm32-renode-auto-tvm-magic-wand/report.md \ + --to-html \ + --verbosity INFO +``` + ##### Building runtime with microTVM backend using custom model This step requires Kenning to be installed. @@ -307,6 +329,17 @@ kenning optimize test report \ --verbosity INFO ``` +The above two steps (`west build` and `kenning ...`) can be also performed by Kenning automatically using `ZephyrRuntimeBuilder`: + +```bash +kenning optimize test report \ + --json-cfg kenning-scenarios/renode-zephyr-auto-tvm-llext-magic-wand-inference.json \ + --measurements results.json --verbosity INFO \ + --report-path reports/stm32-renode-auto-tvm-llext-magic-wand/report.md \ + --to-html \ + --verbosity INFO +``` + ## Evaluating a model in Kenning using actual hardware Kenning can evaluate the runtime running on a physical device.