From ccdf163d0458d8afbb79e1ed08b4cedf01ac8be9 Mon Sep 17 00:00:00 2001 From: Mikolaj Klikowicz Date: Thu, 14 Nov 2024 11:46:45 +0100 Subject: [PATCH] [#68736] kenning-scenarios: Add TVM LLEXT ZephyrRuntimeBuilder scenario Signed-off-by: Mikolaj Klikowicz --- ...r-tvm-llext-auto-magic-wand-inference.json | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 kenning-scenarios/renode-zephyr-tvm-llext-auto-magic-wand-inference.json diff --git a/kenning-scenarios/renode-zephyr-tvm-llext-auto-magic-wand-inference.json b/kenning-scenarios/renode-zephyr-tvm-llext-auto-magic-wand-inference.json new file mode 100644 index 0000000..2b7197b --- /dev/null +++ b/kenning-scenarios/renode-zephyr-tvm-llext-auto-magic-wand-inference.json @@ -0,0 +1,55 @@ +{ + "dataset": { + "type": "kenning.datasets.magic_wand_dataset.MagicWandDataset", + "parameters": { + "dataset_root": "./build/MagicWandDataset" + } + }, + "model_wrapper": { + "type": "kenning.modelwrappers.classification.tflite_magic_wand.MagicWandModelWrapper", + "parameters": { + "model_path": "kenning:///models/classification/magic_wand.h5" + } + }, + "optimizers": [ + { + "type": "kenning.optimizers.tvm.TVMCompiler", + "parameters": { + "compiled_model_path": "./build/microtvm-magic-wand.graph_data", + "model_framework": "keras", + "target": "zephyr", + "target_microtvm_board": "stm32f746g_disco", + "zephyr_llext_source_template": "./lib/kenning_inference_lib/runtimes/tvm/llext/model_impl.llext.template" + } + } + ], + "runtime_builder": { + "type": "kenning.runtimebuilders.zephyr.ZephyrRuntimeBuilder", + "parameters": { + "workspace": ".", + "board": "stm32f746g_disco", + "extra_targets": ["board-repl"], + "use_llext": true + } + }, + "runtime": { + "type": "kenning.runtimes.renode.RenodeRuntime", + "parameters": { + "runtime_binary_path": "./build/zephyr/zephyr.elf", + "platform_resc_path": "./renode/scripts/stm32f746g_disco.resc", + "resc_dependencies": ["./build/stm32f746g_disco.repl"], + "runtime_log_uart": "/tmp/uart-log", + "runtime_log_init_msg": "Inference server started", + "profiler_dump_path": "./build/profiler.dump", + "llext_binary_path": "./build/llext/tvm.llext" + } + }, + "protocol": { + "type": "kenning.protocols.uart.UARTProtocol", + "parameters": { + "port": "/tmp/uart", + "baudrate": 115200, + "endianness": "little" + } + } +}