ValidCVarNameType
PythonValidCVarNameType = Annotated[str, StringConstraints(pattern=C_IDENTIFIER_PATTERN)]Classes
| Name | Description |
|---|---|
ModuleType |
Enum representing the type of exported module. |
Copyright 2025 Ambiq. All Rights Reserved.
ValidCVarNameTypeattributeValidModuleNameTypeattributeModuleTypeclassExported module typeScheduleModeclassOperator dispatch shape emitted into <prefix>model.c.OptimizationGoalclassWhat the static auto choices of the optimization knobs favor.AccumulationclassThe accumulation knob: how FP16 kernels that offer a choice accumulate.KernelChoiceclassThe kernel knob: which ns-cmsis-nn entry an int8 convolution or depthwise layer calls.ValidCVarNameType = Annotated[str, StringConstraints(pattern=C_IDENTIFIER_PATTERN)]ValidModuleNameType = Annotated[str, StringConstraints(pattern=MODULE_NAME_PATTERN)]Exported module type
ModuleType()Exported module type
neuralspot: str = auto()NeuralSpot module
zephyr: str = auto()Zephyr RTOS module
cmake: str = auto()CMake module
nsx: str = auto()NSX module (neuralspotx build system)
cmsis_pack: str = auto()CMSIS-Pack distribution (Open-CMSIS-Pack .pdsc)
Operator dispatch shape emitted into <prefix>model.c.
ScheduleMode()Operator dispatch shape emitted into <prefix>_model.c.
Selects how model_init / model_run invoke each operator. Both modes
preserve the public ABI (signatures, status enum, lifecycle latch and
constant hydration); only the internal dispatch differs.
table: str = auto()Runtime function-pointer table iterated by a for loop,
with the per-node ctx->callback instrumentation seam preserved.
The integration shape for RTOS scheduling / PMU sampling.
static: str = auto()A straight-line sequence of direct calls to each
operator’s _run (and _init) symbol. No function-pointer
table, no loop, no indirect dispatch — the AOT-correct shape that is
fully optimizer-visible. The per-node callback seam is omitted.
What the static auto choices of the optimization knobs favor.
OptimizationGoal()What the static auto choices of the optimization knobs favor.
LATENCY = 'latency'BALANCED = 'balanced'SIZE = 'size'ACCURACY = 'accuracy'Faster inference, allowing approximate values when ``optimization.allow_approximate`` is true.
helia_aot/defines/OptimizationGoal:1
latencyFaster inference, allowing approximate values when
optimization.allow_approximate is true.
Today's defaults: no approximate knob values, and packed layouts only where they keep the default numerics and are faster.
helia_aot/defines/OptimizationGoal:1
balancedToday’s defaults: no approximate knob values, and packed layouts only where they keep the default numerics and are faster.
Smaller code and constants.
helia_aot/defines/OptimizationGoal:1
sizeSmaller code and constants. No knob has a size-specific value
yet, so today it resolves like balanced.
The most accurate value of every knob.
helia_aot/defines/OptimizationGoal:1
accuracyThe most accurate value of every knob.
The accumulation knob: how FP16 kernels that offer a choice accumulate.
Accumulation()The accumulation knob: how FP16 kernels that offer a choice accumulate.
precise keeps the standard weight layout and the kernel library’s
default accumulation: today FP16 partial sums in vector lanes on MVE, and
blockwise FP16 partials folded into FP32 once ns-cmsis-nn provides it.
fast packs the weights so output channels become vector lanes and
accumulates each output in one long FP16 chain; it is approximate relative
to precise. Both accumulate in FP16 on MVE today. auto follows
optimization.goal.
AUTO = 'auto'PRECISE = 'precise'FAST = 'fast'The kernel knob: which ns-cmsis-nn entry an int8 convolution or depthwise layer calls.
KernelChoice()The kernel knob: which ns-cmsis-nn entry an int8 convolution or depthwise layer calls.
specialized calls a shape-specialized direct entry where one applies
(for example arm_convolve_s8_small_cin or
arm_depthwise_conv_s8_opt_3x3). generic keeps the general entry
(arm_convolve_s8, arm_depthwise_conv_s8_opt), so a model links
fewer distinct kernels. Both give identical output. auto follows
optimization.goal.
AUTO = 'auto'SPECIALIZED = 'specialized'GENERIC = 'generic'