# helia_aot.cli.defines.OptimizationArgs

## helia_aot.cli.defines.OptimizationArgs

`class` · `python`

```python
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``.

Source: `helia_aot/cli/defines.py:353`

### helia_aot.cli.defines.OptimizationArgs.goal

`attribute` · `python`

```python
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.

Source: `helia_aot/cli/defines.py:379`

### helia_aot.cli.defines.OptimizationArgs.allow_approximate

`attribute` · `python`

```python
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.

Source: `helia_aot/cli/defines.py:383`

### helia_aot.cli.defines.OptimizationArgs.accumulation

`attribute` · `python`

```python
accumulation: Accumulation = Field(default=Accumulation.AUTO, description="FP16 accumulation: precise (standard layout, the library's default accumulation), fast (packed FP16 weights, one FP16 chain per output) or auto")
```

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

Source: `helia_aot/cli/defines.py:387`

### helia_aot.cli.defines.OptimizationArgs.kernel

`attribute` · `python`

```python
kernel: KernelChoice = Field(default=KernelChoice.AUTO, description='Int8 convolution and depthwise 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 and depthwise entry:
``specialized``, ``generic`` or ``auto``.

Source: `helia_aot/cli/defines.py:394`

### helia_aot.cli.defines.OptimizationArgs.budget

`attribute` · `python`

```python
budget: dict[str, float] | None = Field(None, description='Reserved: constraints for the optimizer, e.g. accuracy_drop or tcm_bytes', json_schema_extra={'cli': False})
```

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

Source: `helia_aot/cli/defines.py:402`

### helia_aot.cli.defines.OptimizationArgs.plan

`attribute` · `python`

```python
plan: Path | None = Field(None, description='Reserved: path to a resolved optimization plan to reproduce', json_schema_extra={'cli': False})
```

Reserved: a resolved plan to reproduce; setting it
is an error.

Source: `helia_aot/cli/defines.py:407`
