defines
Classes
ModelArgs
Model configuration for the conversion process.
Attributes:
-
path(Path) –Path to the model file.
-
subgraph(int) –Subgraph index to process.
-
type(str | None) –Type of the model (e.g., tflite, litert)
-
name(str) –Name of the model.
-
description(str | None) –Optional description of the model.
-
version(str | None) –Version of the model.
ModuleArgs
Module configuration for the conversion process.
Attributes:
-
path(Path) –Output path for the generated module. Use a directory for an unpacked module, a
.zipsuffix for a generic zip archive, or a.packsuffix for an Open-CMSIS-Pack archive (requiresmodule.type=cmsis_pack). Defaults to"output.zip". -
type(ModuleType) –Type of the module (e.g., neuralspot, zephyr, cmake, nsx, cmsis_pack). Defaults to neuralspot.
-
name(ValidModuleNameType) –Name of the module. Defaults to "helia_aot_nn".
-
prefix(ValidCVarNameType) –Prefix added to sources for unique namespace. Defaults to "aot".
TestArgs
Test configuration for the conversion process.
Attributes:
-
enabled(bool) –Include test case. Defaults to False.
-
tolerance(float | int) –Test tolerance. Defaults to 1.0.
-
skip_verification(bool) –Skip runtime output verification.
-
golden_data(Path | None) –Optional path to golden input/output npz file.
-
num_iterations(int) –Number of times to run the same stimulus through the model. Defaults to 1.
MemoryArgs
Memory configuration for the conversion process.
Attributes:
-
planner(MemoryPlannerType) –Memory planner strategy. Defaults to greedy.
-
constraints(list[MemoryConstraint] | None) –Memory constraints (ordered by preference). Defaults to None.
-
tensors(list[AttributeRuleset]) –Per-tensor attribute rulesets.
-
allocate_arenas(bool) –If true, generated module declares its own arena buffers.
-
auto_hydrate_constants(bool) –Deprecated — retained for backwards compatibility but no longer changes generated runtime behavior.
<prefix>_model_initalways invokes<prefix>_hydrate_constantsbetween<prefix>_context_initand the operator init loop, so kernels that read constants in their_inithook always observe hydrated arenas. Override the weak<prefix>_hydrate_constantssymbol for DMA / async pre-stage / model-swap behavior;model_initcalls the override at the same fixed point.
PlatformArgs
Platform configuration for the conversion process.
Attributes:
-
name(str) –Target platform name. Defaults to "apollo510_evb".
-
cpu(str | None) –CPU core type (e.g., cortex-m55). Optional for built-ins.
-
speeds(list[int]) –Supported clock speeds in MHz.
-
memories(dict[MemoryType, int]) –Memory sizes in bytes.
-
capabilities(list[SocCapability]) –Available SoC capabilities.
-
preferred_memory_order(list[MemoryType]) –Placement preference for planner.
-
min_alignment(int | None) –Minimum alignment in bytes.
DocumentationArgs
Documentation configuration for the generated module.
Attributes:
-
html(bool) –Generate html documentation site (experimental).
ConvertArgs
Configuration for the conversion process.
Attributes:
-
path(Path) –Path to yaml configuration.
-
model(ModelArgs) –Model configuration.
-
module(ModuleArgs) –Module configuration.
-
test(TestArgs) –Test configuration.
-
transforms(list[TransformSpec]) –Transforms configuration.
-
memory(MemoryArgs) –Memory configuration.
-
platform(PlatformArgs) –Target platform configuration.
-
verbose(int) –Verbosity level (0-3).
-
log_file(Path | None) –Optional log file path.