Skip to content

Commit

Permalink
[#68736] kenning-scenarios: Add TVM and TFLite ZephyrRuntimeBuilder s…
Browse files Browse the repository at this point in the history
…cenarios

Signed-off-by: Mikolaj Klikowicz <[email protected]>
  • Loading branch information
mikolaj-klikowicz committed Nov 14, 2024
1 parent 303ec7c commit cce2e6c
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 0 deletions.
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 kenning-scenarios/renode-zephyr-auto-tvm-magic-wand-inference.json
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"
}
}
}

0 comments on commit cce2e6c

Please sign in to comment.