MemoryArgs
PythonMemory configuration for the conversion process.
MemoryArgs()Memory configuration for the conversion process.
planner
Pythonplanner: MemoryPlannerType = Field(default=MemoryPlannerType.HILL_CLIMB, description='Memory planner strategy', json_schema_extra=stability(experimental_values=[MemoryPlannerType.GREEDY_BY_SIZE]))Memory planner strategy. Defaults to
hill_climb, which keeps greedy’s plan unless its own uses
fewer scratch bytes in total and no more in any memory;
greedy_by_size is 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.
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.')If true, write <prefix>_residency.json
alongside the emitted module.