Skip to content
heliaAOT
HELIA HUB

converter

The AotConverter class is responsible for converting a model into an AOT inference C module.

Classes

Name Description
AotConverter Performs the AOT conversion process.

Copyright 2025 Ambiq. All Rights Reserved.

Machine-readable model

  • AotConverterclassConverts a trained model into a self-contained AOT inference C module.
class

Converts a trained model into a self-contained AOT inference C module.

helia_aot/converter.py:56

AotConverter(config: ConvertArgs, registry_context: RegistryContext | None = None)

Converts a trained model into a self-contained AOT inference C module.

The converter owns the six-stage pipeline (Load, Transform, Resolve, Plan, Emit, Export) described on convert(), which is the single entry point; the CLI is a thin wrapper around it. All behavior is driven by the ConvertArgs config supplied at construction, and every dispatch (parsers, operator classes, transforms) goes through the registry context, so a caller can extend the compiler without patching it.

Parameters of AotConverter
NameTypeDefaultDescription
configConvertArgsRequiredConversion parameters.
registry_contextRegistryContext | NoneNoneOptional registry context for parser/operator/transform dispatch. If omitted, a fresh default frozen context is created.
method

convert

Python

Convert the model to an AOT module.

helia_aot/converter.py:87

convert() -> CodeGenContext

Convert the model to an AOT module.

Code is generated in a temporary work directory that is removed once the conversion ends, whether it succeeds or fails, unless keep_work_dir is set.

Returns of convert
ValueTypeDescription
CodeGenContextCodeGenContextCode generation context. Its ``work_path`` no
CodeGenContextlonger exists unless ``keep_work_dir`` is set.