Skip to content

converter

AotModel API

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

Classes:

Copyright 2025 Ambiq. All Rights Reserved.

Classes

AotConverter

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

Initialize the AOT converter.

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

Parameters:

  • config

    (ConvertArgs) –

    Conversion parameters.

  • registry_context

    (RegistryContext | None, default: None ) –

    Optional registry context for parser/operator/transform dispatch. If omitted, a fresh default frozen context is created.

Functions

convert
convert() -> CodeGenContext

Convert the model to an AOT module.

The conversion process consists of six stages
  1. Load (Backend → AIR)
  2. Transform (Graph-Level Optimizations)
  3. Resolve (Final AIR Structure)
  4. Plan (Memory & Handler Planning)
  5. Emit (Code Generation)
  6. Export (Module Export)

Returns:

Functions