Sample RISC-V Zephyr Tracing Report¶
This section contains a sample complete report with Zephyr tracing section on RISC-V platform, generated by Kenning using Zephelin.
Testing configuration:
Environment: Github Actions
Task: Gesture recognition on Magic Wand dataset
Tracing tool: Zephelin
Compiler framework:
TVMPlatform: SiFive HiFive Unmatched
Sample RISC-V Zephyr Tracing Report¶
Commands used¶
Note
This section was generated using:
python -m kenning.__init__ \
optimize \
test \
report \
--cfg \
/home/runner/work/kenning/kenning/scripts/configs/zephyr-tvm-magic-wand-hifive-unmatched-report.yml \
--measurements \
./results.json \
--report-path \
/home/runner/work/kenning/kenning/docs/source/generated/sample-riscv-zephyr-tracing-report.md \
--report-types \
classification \
performance \
renode_stats \
zephyr_traces \
model \
--root-dir \
/home/runner/work/kenning/kenning/docs/source/ \
--img-dir \
/home/runner/work/kenning/kenning/docs/source/generated/img/ \
--report-name \
Sample RISC-V Zephyr Tracing Report \
--verbosity \
INFO \
--to-html
General information for results.json¶
Model framework:
torch ver. 2.13.0+cu130
Input JSON:
{
"dataset": {
"type": "kenning.datasets.magic_wand_dataset.MagicWandDataset",
"parameters": {
"window_size": 128,
"window_shift": 128,
"noise_level": 20,
"dataset_root": "build/data",
"inference_batch_size": 1,
"download_dataset": true,
"force_download_dataset": false,
"external_calibration_dataset": null,
"split_fraction_test": 0.2,
"split_fraction_val": null,
"split_seed": 1234,
"reduce_dataset": 1.0
}
},
"dataconverter": {
"type": "kenning.dataconverters.modelwrapper_dataconverter.ModelWrapperDataConverter",
"parameters": {}
},
"optimizers": [
{
"type": "kenning.optimizers.tvm.TVMCompiler",
"parameters": {
"model_framework": "any",
"target": null,
"target_attrs": "",
"target_microtvm_board": "hifive_unmatched/fu740/u74",
"target_host": null,
"zephyr_header_template": "gh://antmicro:kenning-zephyr-runtime/lib/kenning_inference_lib/runtimes/tvm/generated/model_impl.h.template;branch=main",
"zephyr_llext_source_template": null,
"opt_level": 3,
"libdarknet_path": "/usr/local/lib/libdarknet.so",
"compile_use_vm": false,
"output_conversion_function": "default",
"conv2d_data_layout": "",
"conv2d_kernel_layout": "",
"use_fp16_precision": false,
"use_int8_precision": false,
"int8_calibrate_chunk_by": -1,
"use_tensorrt": false,
"dataset_percentage": 0.25,
"module_name": null,
"compiled_model_path": "./build/compiled-model-magic-wand.graph_data",
"location": "host"
}
}
],
"platform": {
"type": "kenning.platforms.zephyr.ZephyrPlatform",
"parameters": {
"zephyr_build_path": "build/hifive_unmatched",
"llext_binary_path": null,
"sensors": null,
"sensors_frequency": null,
"enable_zephelin_gdb": false,
"enable_zephelin": true,
"zephyr_base": null,
"uart_port": "/tmp/renode_uart_t8ssqn1d/uart",
"uart_baudrate": 115200,
"uart_log_port": "/tmp/renode_uart_t8ssqn1d/uart_log",
"uart_log_baudrate": 115200,
"auto_flash": false,
"openocd_path": "openocd",
"sensor": null,
"number_of_batches": 16,
"simulated": true,
"runtime_binary_path": null,
"platform_resc_path": null,
"resc_dependencies": [],
"post_start_commands": [
"logLevel 3 sysbus.uart1"
],
"disable_opcode_counters": false,
"disable_profiler": false,
"profiler_dump_path": "/tmp/renode_profiler_ewsnvacx.dump",
"profiler_interval_step": 10.0,
"runtime_init_log_msg": "Inference server started",
"runtime_init_timeout": 30,
"gdb_port": 3333,
"renode_log_lines_single_read_limit": 5000,
"name": "hifive_unmatched/fu740/u74",
"platforms_definitions": [
"kenning:///platforms/platforms.yml",
"/home/runner/work/kenning/kenning/kenning/resources/platforms/platforms.yml"
]
}
},
"protocol": {
"type": "kenning.protocols.uart.UARTProtocol",
"parameters": {
"port": "/tmp/renode_uart_t8ssqn1d/uart",
"baudrate": 115200,
"error_recovery": true,
"timeout": 30
}
},
"model_wrapper": {
"type": "kenning.modelwrappers.classification.pytorch_magic_wand.PyTorchMagicWandModelWrapper",
"parameters": {
"batch_size": null,
"learning_rate": null,
"num_epochs": null,
"window_size": 128,
"logdir": null,
"export_dict": false,
"model_path": "kenning:///models/classification/magic_wand.pth",
"model_name": null
}
},
"runtime": {
"type": "kenning.runtimes.tvm.TVMRuntime",
"parameters": {
"save_model_path": "./build/compiled-model-magic-wand.graph_data",
"target_device_context": "cpu",
"target_device_context_id": 0,
"runtime_use_vm": false,
"llext_binary_path": null,
"batch_size": 1,
"disable_performance_measurements": false
}
},
"runtime_builder": {
"type": "kenning.runtimebuilders.zephyr.ZephyrRuntimeBuilder",
"parameters": {
"board": "hifive_unmatched/fu740/u74",
"application_dir": "/home/runner/work/kenning/kenning/zephyr-workspace/kenning-zephyr-runtime/app",
"build_dir": "/home/runner/work/kenning/kenning/zephyr-workspace/kenning-zephyr-runtime/build",
"venv_dir": "/home/runner/work/kenning/kenning/zephyr-workspace/kenning-zephyr-runtime/.west-venv",
"extra_targets": [
"board-repl"
],
"extra_build_args": [
"-DCONFIG_KENNING_TVM_MODEL_PRE_GEN=y"
],
"use_llext": false,
"run_west_update": false,
"workspace": "/home/runner/work/kenning/kenning/zephyr-workspace/kenning-zephyr-runtime",
"output_path": "build/hifive_unmatched",
"model_framework": "tvm"
}
}
}
Inference quality metrics for results.json¶
Figure 19 Confusion matrix¶
Statistic |
Value |
|---|---|
Accuracy |
1.000000 |
Mean precision |
1.000000 |
Mean sensitivity |
1.000000 |
G-mean |
1.000000 |
Inference performance metrics for results.json¶
Inference time¶
Figure 20 Inference time¶
Statistic |
Time [s] |
|---|---|
First inference duration |
0.008941 |
Mean |
0.009581 |
Median |
0.009567 |
Standard deviation |
0.000339 |
Minimum |
0.008941 |
Maximum |
0.010706 |
Renode performance measurements for results.json¶
Count of instructions used during inference¶
Figure 21 Histogram of used instructions during inference¶