MemoryArgs
PythonMemory configuration for the conversion process.
MemoryArgs()Memory configuration for the conversion process.
planner
Pythonplanner: 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.
planner_options
Pythonplanner_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}'.
constraints
Pythonconstraints: list[MemoryConstraint] | None = Field(None, description='Memory constraints (ordered by preference)')Memory constraints (ordered by preference). Defaults to None.
tensors
Pythontensors: list[AttributeRuleset] = Field(..., description='Tensor attributes', default_factory=list)Per-tensor attribute rulesets.
allocate_arenas
Pythonallocate_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.
auto_hydrate_constants
Pythonauto_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.
dump_residency_json
Pythondump_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.')