-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#68736] kenning-scenarios: Add TVM and TFLite ZephyrRuntimeBuilder s…
…cenarios Signed-off-by: Mikolaj Klikowicz <[email protected]>
- Loading branch information
1 parent
303ec7c
commit cce2e6c
Showing
2 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
kenning-scenarios/renode-zephyr-auto-tflite-magic-wand-inference.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"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.tflite.TFLiteCompiler", | ||
"parameters": | ||
{ | ||
"compiled_model_path": "./output/tflite-magic-wand.tflite", | ||
"inference_input_type": "float32", | ||
"inference_output_type": "float32" | ||
} | ||
} | ||
], | ||
"runtime_builder": { | ||
"type": "kenning.runtimebuilders.zephyr.ZephyrRuntimeBuilder", | ||
"parameters": { | ||
"workspace": ".", | ||
"board": "stm32f746g_disco", | ||
"extra_targets": ["board-repl"], | ||
"run_west_update": false, | ||
"output_path": "./output" | ||
} | ||
}, | ||
"runtime": { | ||
"type": "kenning.runtimes.renode.RenodeRuntime", | ||
"parameters": { | ||
"runtime_binary_path": "output/zephyr/zephyr.elf", | ||
"platform_resc_path": "renode/scripts/stm32f746g_disco.resc", | ||
"runtime_log_init_msg": "I: Inference server started", | ||
"profiler_dump_path": "output/profiler.dump", | ||
"runtime_log_uart": "/tmp/uart-log" | ||
} | ||
}, | ||
"protocol": { | ||
"type": "kenning.protocols.uart.UARTProtocol", | ||
"parameters": { | ||
"port": "/tmp/uart", | ||
"baudrate": 115200, | ||
"endianness": "little" | ||
} | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
kenning-scenarios/renode-zephyr-auto-tvm-magic-wand-inference.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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": "./output/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"], | ||
"run_west_update": false, | ||
"output_path": "./output" | ||
} | ||
}, | ||
"runtime": { | ||
"type": "kenning.runtimes.renode.RenodeRuntime", | ||
"parameters": { | ||
"runtime_binary_path": "./output/zephyr/zephyr.elf", | ||
"platform_resc_path": "./renode/scripts/stm32f746g_disco.resc", | ||
"resc_dependencies": ["./output/stm32f746g_disco.repl"], | ||
"runtime_log_uart": "/tmp/uart-log", | ||
"runtime_log_init_msg": "Inference server started", | ||
"profiler_dump_path": "./output/profiler.dump" | ||
} | ||
}, | ||
"protocol": { | ||
"type": "kenning.protocols.uart.UARTProtocol", | ||
"parameters": { | ||
"port": "/tmp/uart", | ||
"baudrate": 115200, | ||
"endianness": "little" | ||
} | ||
} | ||
} |