Skip to content

HeliosAOT Overview

HeliosAOT is a Python-based CLI ahead-of-time compiler that transforms LiteRT (formerly TensorFlow Lite) flatbuffers into highly optimized, standalone C modules tailored specifically for Ambiq’s ultra low-power System-on-Chips (SoCs). By shifting neural network inference code generation to build time, HeliosAOT delivers compact, efficient, and readable C output with zero runtime overhead.

Core Workflow

  1. Model Ingestion: Accepts a LiteRT FlatBuffer (.tflite) and a YAML configuration file defining module parameters (e.g., memory planner type, module prefix, test harness inclusion).
  2. Code Generation: Analyzes the model’s subgraphs, operators, and tensor shapes, then emits C source and header files that mirror the network topology—no interpreters or dynamic allocators required.
  3. Optimization Passes:
  • Kernel Selection & Fusion: Chooses from an expanded library of Ambiq‑tuned CMSIS‑NN kernels, applying layer fusion and operator grouping to minimize function calls and data movement.
  • Memory Planning: Automatically schedules tensor lifetimes across SRAM, TCM, and MRAM with a greedy planner (or custom strategy) so you never have to guess arena sizes.
  • Code Size Minimization: Performs dead‑code elimination and fine‑grain operator inclusion, yielding binaries up to 10× smaller than generic TFLM. 4. Integration Artifacts: Produces a self‑contained Zephyr module (with module.yml) or plain C library, complete with test stubs, configuration headers, and a comprehensive README for easy onboarding.

Key Benefits

  • Ultra‑Compact Footprint: Flash usage slashed, unlocking advanced inference on resource‑constrained devices.
  • Performance‑Optimized: Leverage Helium (M55) and M4 DSP extensions with a wider operator set than stock TFLM.
  • Deterministic, Readable Code: Network structure and buffer lifetimes are explicit in the generated sources, simplifying code review and debugging.
  • Flexible Customization: Tweak planner algorithms, enable or disable operators, or extend support for new ambiq‑specific accelerators.
  • Seamless Toolchain Integration: Out‑of‑the‑box Zephyr module support and compatibility with neuralSPOT’s profiling ecosystem.

Who Should Use HeliosAOT?

  • Embedded AI Engineers looking to deploy machine learning models on battery‑powered, resource‑limited Cortex‑M devices.
  • Firmware Developers who need predictable memory usage and minimal runtime overhead.
  • System Architects aiming to benchmark and compare model footprints and latency across Ambiq’s SoC lineup.

Next Steps