heliaAOT

# Optimize ahead of time. Built for Ambiq silicon.

heliaAOT is an ahead-of-time neural network compiler for Ambiq silicon. It turns trained LiteRT models into optimized C modules, transforming the graph, selecting kernels and planning memory before deployment. Build the generated module into your firmware without an on-device interpreter.

[Get started](/helia-aot/getting-started/)

[Explore examples](/helia-aot/examples/)

[v0.24.0](/helia-aot/reference/changelog/)

### Optimize before it runs.

Transform supported graph patterns and select target-aware kernels.

[Explore graph optimization](/helia-aot/guide/how-it-works/#analyze-and-transform-the-model)

### Make memory explicit.

Plan arenas and reuse scratch buffers across tensor lifetimes.

[Explore memory planning](/helia-aot/guide/memory/)

### Bring C to your firmware.

Generate source, headers and build assets ready to integrate.

[Integrate a C module](/helia-aot/getting-started/integrate/)

[No on-device interpreter ↗](/helia-aot/guide/how-it-works/)

[Planned memory ↗](/helia-aot/guide/memory/)

[Firmware-ready C ↗](/helia-aot/getting-started/integrate/)

[Ambiq targets ↗](/helia-aot/getting-started/targets/)

## Key features

From optimized kernels to explicit memory placement, keep control of how your model runs.

### Optimize ahead of time

Transform the graph and select kernels before deployment. Generate a model-specific execution schedule without an on-device interpreter.

[Explore graph optimization](/helia-aot/guide/how-it-works/#analyze-and-transform-the-model)

### Powered by heliaCORE

Match supported operations to optimized heliaCORE kernels, selected for your Ambiq target, model shapes and precision.

[How kernels are selected](/helia-aot/guide/how-it-works/#select-an-implementation-for-each-operation)

### Make memory go further

Reuse scratch buffers and share identical constants. Plan separate arenas for weights, temporary data and persistent state.

[Understand memory planning](/helia-aot/guide/memory/)

### Control the tradeoffs

Tune for size and speed. Set memory budgets, pin tensors to banks and control where model weights live.

[Control tensor placement](/helia-aot/guide/memory-placement/)

### See what inference costs

Pair with heliaPROFILER for model and layer timing. Measure power and energy with a supported hardware measurement setup.

[Profile your model](/helia-aot/guide/measure/)

### Integrate with your build

Generate C modules for CMake, Zephyr, neuralSPOT or CMSIS-Pack. Build with your application, selected kernels and platform support.

[Integrate a generated module](/helia-aot/getting-started/integrate/)

## How it works

[Inside the compiler](/helia-aot/guide/how-it-works/)

Start with a trained LiteRT model and a configuration for your target. heliaAOT optimizes the model on your development machine and generates a C module that you build into your firmware.

Your inputs`model.tflite`

### Model + configuration

Choose an Ambiq target, an output format and any application-specific constraints.

On your development machine

### heliaAOT compiler

* 01Analyze and transform the graph
* 02Select target-aware kernels
* 03Plan memory and generate C

Generated module`C + headers + build files`

### Ready to integrate

Build and link the module into your firmware. Initialize it, supply inputs, run inference and validate outputs on your target.

Conversion produces a C module. Your firmware build produces the device executable.[Explore supported targets](/helia-aot/getting-started/targets/)

Start simple.\
Tune what matters.
------------------

Convert with the CLI, then add memory controls, profiling or Python automation as your application needs them.

### Convert your first model

Follow the example configuration to select your model, target and module format. One command produces the C module and its build assets.

```
helia-aot convert --path kws.yaml
```

[First conversion](/helia-aot/getting-started/convert/)

### Fine-tune size, speed and memory

Set arena budgets, pin tensors to specific memory banks and choose whether constants are read in place or staged. Use residency reports to inspect the layout, then measure the tradeoffs on your target.

[Control memory placement](/helia-aot/guide/memory-placement/)

### Profile, compare and improve

Use heliaPROFILER to inspect inference timing and per-layer behavior. Compare the same model and target across configurations or engines to see what your changes deliver.

[Measure a conversion](/helia-aot/guide/measure/)

### Automate and extend

Use the Python API for repeatable conversions and configuration sweeps. Register custom operators or kernel implementations to support your application.

[Use the Python API](/helia-aot/guide/python-api/)

## Explore the docs

### [Getting started](/helia-aot/getting-started/)

[Install, convert and run your first model.](/helia-aot/getting-started/)

### [Examples](/helia-aot/examples/)

[Adapt working models and configurations.](/helia-aot/examples/)

### [Memory planning](/helia-aot/guide/memory/)

[Manage arenas, budgets and tensor placement.](/helia-aot/guide/memory/)

### [Supported targets](/helia-aot/getting-started/targets/)

[Find the capabilities of your Ambiq target.](/helia-aot/getting-started/targets/)

### [Profiling](/helia-aot/guide/measure/)

[Measure a conversion and compare results.](/helia-aot/guide/measure/)

### [API & reference](/helia-aot/reference/)

[Explore the CLI, configuration and Python API.](/helia-aot/reference/)
