Skip to content
heliaAOT
API Reference
HELIA HUB

knobs

The knob registry: each optimization knob declared once.

Copyright 2025 Ambiq. All Rights Reserved.

Machine-readable model

  • KNOBSconstantProvisional: importable, but outside the compatibility promise; a minor release can change or remove it.
  • KnobSpecclassOne optimization knob.
  • knob_namesfunctionThe names of all knobs.
  • knobfunctionLook up a knob by name.
  • default_knob_valuesfunctionEach knob's default value, the choice an operator makes without a handler.
constant

KNOBS

Python

Provisional: importable, but outside the compatibility promise; a minor release can change or remove it.

helia_aot/optimization/knobs.py:125

KNOBS: tuple[KnobSpec, ...] = (ACCUMULATION, KERNEL)

Provisional: importable, but outside the compatibility promise; a minor release can change or remove it.

class

KnobSpec

Python

One optimization knob.

helia_aot/optimization/knobs.py:16

KnobSpec(
name: str,
values: tuple[str, ...],
default: str,
approximate_values: frozenset[str],
auto: Mapping[OptimizationGoal, str],
applies_to: frozenset[str],
summary: str,
operator_auto: Mapping[str, Mapping[OptimizationGoal, str]] = dict(),
) -> None

dataclass

One optimization knob.

Provisional: importable, but outside the compatibility promise; a minor release can change or remove it.

method

resolve

Python

Resolve a requested value; auto follows the static table.

helia_aot/optimization/knobs.py:44

resolve(requested: str, goal: OptimizationGoal, allow_approximate: bool, *, op_type: str | None = None) -> str

Resolve a requested value; auto follows the static table.

An explicit value is used as given. auto takes the goal’s value, unless that value is approximate and the gate is closed, in which case it takes default.

Parameters of resolve
NameTypeDefaultDescription
requestedstrRequiredThe requested value, possibly ``auto``.
goalOptimizationGoalRequired``optimization.goal``.
allow_approximateboolRequired``optimization.allow_approximate``.
op_typestr | NoneNoneCanonical operator type for its auto-policy override, if any.
Returns of resolve
ValueTypeDescription
strstrA value from ``values``.
Errors raised by resolve
TypeDescription
ValueErrorIf ``requested`` is neither ``auto`` nor one of ``values``.
function

The names of all knobs.

helia_aot/optimization/knobs.py:128

knob_names() -> frozenset[str]

The names of all knobs.

Provisional: importable, but outside the compatibility promise; a minor release can change or remove it.

function

knob

Python

Look up a knob by name.

helia_aot/optimization/knobs.py:133

knob(name: str) -> KnobSpec

Look up a knob by name.

Provisional: importable, but outside the compatibility promise; a minor release can change or remove it.

Parameters of knob
NameTypeDefaultDescription
namestrRequiredThe knob's name.
Returns of knob
ValueTypeDescription
KnobSpecKnobSpecThe knob.
Errors raised by knob
TypeDescription
KeyErrorWhen no knob has that name.
function

Each knob's default value, the choice an operator makes without a handler.

helia_aot/optimization/knobs.py:151

default_knob_values() -> dict[str, str]

Each knob’s default value, the choice an operator makes without a handler.

Provisional: importable, but outside the compatibility promise; a minor release can change or remove it.