Skip to content
heliaAOT
HELIA HUB

schema

The optimization plan and report files, as typed models with JSON schemas.

<prefix>_plan.json is normative: the resolved choice of every knob for every operator, what was requested and by which rule, the choices that are not knobs yet, and the identity of the model and target the plan belongs to. It is what an optimizer rewrites and what heliaAOT will reproduce.

<prefix>_report.json is non-normative: MACs, alternatives and whether they apply, measurements, constant placement facts and the hints the results print. Its content may change between releases, and a plan reader ignores it.

Versioning: both files carry schema_version. Adding an optional field, a knob, a knob value or an enum member keeps the version; renaming or removing a field, or changing what a field means, bumps it.

Knob names and each knob’s values come from the registry, KNOBS: the models reject any other, and the exported JSON schemas list them per knob. The exported schemas therefore belong to the heliaAOT release that produced a file (generator.helia_aot); a consumer validates against that release’s schema and does not pin one across releases.

Some members and fields are reserved and never written today: plan as a knob source, resolved_by and set_by (a choice taken from an input plan), auto_heuristic as resolved_by (auto consulting the operator or target rather than the goal table), model-level optimization.knobs and per-tensor tensors.

Copyright 2025 Ambiq. All Rights Reserved.

Machine-readable model

  • RuleRefclassThe operators[] rule that set a knob.
  • KnobSourceclassWho asked for a knob's value; rule is set exactly when kind is operator.
  • KnobChoiceclassThe resolved value of one knob for one operator.
  • PlanOperatorclassOne operator's choices.
  • OptimizationPlanclassThe normative optimization plan, <prefix>plan.json.
  • ConstantPlacementclassConstants outside TCM against DTCM left free, within memory.constraints.
  • HintclassOne optimization hint: a fact about an alternative that applies.
  • OptimizationReportclassThe non-normative optimization report, <prefix>report.json.
class

Who asked for a knob's value; rule is set exactly when kind is operator.

helia_aot/optimization/schema.py:122

KnobSource()

Who asked for a knob’s value; rule is set exactly when kind is operator.

attribute

kind

Python

helia_aot/optimization/schema.py:127

kind: Literal['operator', 'model', 'default', 'plan'] = Field(..., description='An operators[] rule, the model-wide optimization section, or neither; plan (an input plan) is reserved')
class

The resolved value of one knob for one operator.

helia_aot/optimization/schema.py:155

KnobChoice()

The resolved value of one knob for one operator.

resolved_by agrees with requested: explicit means a value was asked for and used as given (value equals requested); auto_table and auto_heuristic mean requested is auto.

attribute

helia_aot/optimization/schema.py:167

resolved_by: Literal['explicit', 'auto_table', 'auto_heuristic', 'plan'] = Field(..., description='explicit when a value was asked for; auto_table when auto chose it from the goal; auto_heuristic and plan are reserved')
class

One operator's choices.

helia_aot/optimization/schema.py:197

PlanOperator()

One operator’s choices.

attribute

id

Python

helia_aot/optimization/schema.py:200

id: str = Field(..., description="Stable id: '<subgraph>:<first output tensor name>', or a fallback; operators[].id matches it. For every id_source except node_id, split on the first colon only (tensor names can contain ':'); a node_id id is the opaque AIR node id")
attribute

id_source

Python

helia_aot/optimization/schema.py:208

id_source: Literal['tensor_name', 'tensor_name+ordinal', 'index', 'node_id'] = Field(..., description='How the id was derived; node_id when the stable id would also match another operator, so the id is the AIR node id')
attribute

knobs

Python

helia_aot/optimization/schema.py:218

knobs: dict[str, KnobChoice] = Field(default_factory=dict, description='Resolved choice per knob, for the knobs that exist for this operator', json_schema_extra=_per_knob(_choice_enums))
class

The normative optimization plan, <prefix>plan.json.

helia_aot/optimization/schema.py:271

OptimizationPlan()

The normative optimization plan, <prefix>_plan.json.

class

Constants outside TCM against DTCM left free, within memory.constraints.

helia_aot/optimization/schema.py:334

ConstantPlacement()

Constants outside TCM against DTCM left free, within memory.constraints.

class

Hint

Python

One optimization hint: a fact about an alternative that applies.

helia_aot/optimization/schema.py:345

Hint()

One optimization hint: a fact about an alternative that applies.

class

The non-normative optimization report, <prefix>report.json.

helia_aot/optimization/schema.py:358

OptimizationReport()

The non-normative optimization report, <prefix>_report.json.

attribute

helia_aot/optimization/schema.py:365

measurements: dict[str, list[MeasurementRecord]] = Field(..., description='Measurements for this target and core, keyed by setting; every setting has an entry', json_schema_extra=_per_setting)