# helia_aot.cli.defines.MemoryArgs

## helia_aot.cli.defines.MemoryArgs

`class` · `python`

```python
MemoryArgs()
```

Memory configuration for the conversion process.

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

### helia_aot.cli.defines.MemoryArgs.planner

`attribute` · `python`

```python
planner: MemoryPlannerType = Field(default=MemoryPlannerType.greedy, description='Memory planner strategy (greedy_by_size and hill_climb are experimental)')
```

Memory planner strategy. Defaults to
``greedy``; ``greedy_by_size`` and ``hill_climb`` are experimental
and opt-in.

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

### helia_aot.cli.defines.MemoryArgs.planner_options

`attribute` · `python`

```python
planner_options: dict[str, Any] = Field(default_factory=dict, description="Planner tunables as JSON, validated against the selected planner's option schema (hill_climb: iterations, seed, max_stall_iterations)")
```

Tunables forwarded to the selected
planner, validated against that planner's option schema. Unknown
keys are rejected with a did-you-mean hint. ``hill_climb`` accepts
``iterations``, ``seed``, and ``max_stall_iterations``; ``greedy``
and ``greedy_by_size`` accept none. On the CLI this is a JSON
object: ``--memory.planner-options '{"iterations": 2000}'``.

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

### helia_aot.cli.defines.MemoryArgs.constraints

`attribute` · `python`

```python
constraints: list[MemoryConstraint] | None = Field(None, description='Memory constraints (ordered by preference)')
```

Memory constraints (ordered by preference). Defaults to None.

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

### helia_aot.cli.defines.MemoryArgs.tensors

`attribute` · `python`

```python
tensors: list[AttributeRuleset] = Field(..., description='Tensor attributes', default_factory=list)
```

Per-tensor attribute rulesets.

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

### helia_aot.cli.defines.MemoryArgs.allocate_arenas

`attribute` · `python`

```python
allocate_arenas: bool = Field(True, description='If true, the module will use internal, statically allocated arenas. If false, the caller must bind every region via <prefix>_bind_arena() / <prefix>_bind_arenas() before model_init.')
```

If true, generated module declares its own arena buffers.

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

### helia_aot.cli.defines.MemoryArgs.auto_hydrate_constants

`attribute` · `python`

```python
auto_hydrate_constants: bool = Field(True, description='Deprecated — retained for backwards compatibility but no longer changes generated runtime behavior. model_init always invokes hydrate_constants between context_init and the operator init loop. Override the weak hydrate_constants symbol for custom hydration mechanisms (DMA / async pre-stage / model swap).')
```

**Deprecated** — retained for
backwards compatibility but no longer changes generated
runtime behavior. ``<prefix>_model_init`` always invokes
``<prefix>_hydrate_constants`` between
``<prefix>_context_init`` and the operator init loop, so
kernels that read constants in their ``_init`` hook always
observe hydrated arenas. Override the weak
``<prefix>_hydrate_constants`` symbol for DMA / async
pre-stage / model-swap behavior; ``model_init`` calls the
override at the same fixed point.

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

### helia_aot.cli.defines.MemoryArgs.dump_residency_json

`attribute` · `python`

```python
dump_residency_json: bool = Field(False, description='If true, write a machine-readable residency report (``<prefix>_residency.json``) alongside the emitted module. Mirrors the verbose log summary as JSON for tooling that needs to introspect arena layout, staged-vs-cold residency, and per-tensor placement post-planning.')
```

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