Skip to content
heliaAOT
API Reference
HELIA HUB

OptimizationArgs

Machine-readable model

  • OptimizationArgsclassModel-wide optimization settings: the goal, the approximation gate and the knobs.
class

Model-wide optimization settings: the goal, the approximation gate and the knobs.

helia_aot/cli/defines.py:530

OptimizationArgs()

Model-wide optimization settings: the goal, the approximation gate and the knobs.

Every knob defaults to auto, which a static table resolves from goal and allow_approximate; operators[].optimization overrides a knob per operator type or id. The resolved choice of every operator is written to <prefix>_plan.json. Knob fields mirror the knob registry, helia_aot.optimization.KNOBS.

attribute

goal

Python

helia_aot/cli/defines.py:560

goal: OptimizationGoal = Field(default=OptimizationGoal.BALANCED, description="What auto knob values favor: latency, balanced (today's defaults), size or accuracy")

What auto favors. balanced keeps today’s defaults.

attribute

helia_aot/cli/defines.py:564

allow_approximate: bool = Field(default=False, description="Allow auto knob values that change numerics relative to the knob's default (e.g. fast accumulation)")

Allow auto to choose knob values that change numerics relative to the knob’s default. An explicit knob value is used as given.

attribute

helia_aot/cli/defines.py:568

accumulation: Accumulation = Field(default=Accumulation.AUTO, description='FP16 fully connected and depthwise accumulation: precise (four-tap FP32 folding on eligible packed fully connected layers, otherwise standard; the default depthwise entry), fast (legacy fully connected routing; the FP16-lane depthwise entry; approximate where alternatives apply) or auto; FP16 convolution packs at every setting')

FP16 accumulation for kernels that offer a choice: precise, fast or auto.

attribute

kernel

Python

helia_aot/cli/defines.py:577

kernel: KernelChoice = Field(default=KernelChoice.AUTO, description='Int8 convolution, depthwise, fully connected and bilinear resize entry: specialized (shape-specialized ns-cmsis-nn direct entries where they apply), generic (the general entries, fewer kernels linked) or auto; both are exact')

Int8 convolution, depthwise and fully connected entry: specialized, generic or auto.

attribute

budget

Python

helia_aot/cli/defines.py:585

budget: dict[str, float] | None = Field(None, description='Constraints for the optimizer, e.g. accuracy_drop or tcm_bytes', json_schema_extra=stability('reserved'))

Reserved for the optimizer’s constraints (for example accuracy_drop in points or tcm_bytes); setting it is an error.

attribute

plan

Python

helia_aot/cli/defines.py:590

plan: Path | None = Field(None, description='Path to an optimization plan to read as input: its schedule section is applied, and every other section must describe the conversion the configuration produces', json_schema_extra=stability('experimental'))

An optimization plan to read as input. Its schedule section is applied; every other section must describe the conversion the configuration produces, by the comparison rule of helia_aot.aot.plan_input. A path in a configuration file resolves relative to that file; the command line flag resolves relative to the working directory.