Skip to content
heliaAOT
HELIA HUB

defines

Classes

Name Description
ModuleType Enum representing the type of exported module.

Copyright 2025 Ambiq. All Rights Reserved.

Machine-readable model

class

Exported module type

helia_aot/defines.py:73

ModuleType()

Exported module type

class

Operator dispatch shape emitted into <prefix>model.c.

helia_aot/defines.py:91

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.

attribute

table

Python

helia_aot/defines.py:108

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.

attribute

static

Python

helia_aot/defines.py:109

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.

class

What the static auto choices of the optimization knobs favor.

helia_aot/defines.py:164

OptimizationGoal()

What the static auto choices of the optimization knobs favor.

attribute

latency

Python

Faster inference, allowing approximate values when ``optimization.allow_approximate`` is true.

helia_aot/defines/OptimizationGoal:1

latency

Faster inference, allowing approximate values when optimization.allow_approximate is true.

attribute

balanced

Python

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

balanced

Today’s defaults: no approximate knob values, and packed layouts only where they keep the default numerics and are faster.

attribute

size

Python

Smaller code and constants.

helia_aot/defines/OptimizationGoal:1

size

Smaller code and constants. No knob has a size-specific value yet, so today it resolves like balanced.

attribute

accuracy

Python

The most accurate value of every knob.

helia_aot/defines/OptimizationGoal:1

accuracy

The most accurate value of every knob.

class

The accumulation knob: how FP16 kernels that offer a choice accumulate.

helia_aot/defines.py:183

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.

class

The kernel knob: which ns-cmsis-nn entry an int8 convolution or depthwise layer calls.

helia_aot/defines.py:200

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.