Skip to main content

Profile LiteRT models on Ambiq Apollo hardware

Project description

heliaPROFILER

hpx profiles LiteRT (.tflite) models on real Ambiq Apollo silicon — one command builds temporary firmware, flashes it, and returns per-layer PMU counter breakdowns plus optional Joulescope power/energy per inference.

Alpha. heliaPROFILER is pre-1.0. Breaking changes may land on minor versions until v1.0. Pin an exact version in production pipelines.

📖 Full docs: https://ambiqai.github.io/helia-profiler/

Why hpx

  • Per-layer PMU breakdowns — cycles, instructions, cache, and (on Cortex-M55 boards) MVE and memory counter groups, one row per layer.
  • Power & energy per inference — GPIO-gated Joulescope capture (JS110/JS220) isolates the inference window from setup/teardown noise.
  • Three enginestflm (vanilla TFLM baseline), helia-rt (Ambiq's optimized TFLM interpreter), and helia-aot (Ambiq's ahead-of-time model compiler), selected explicitly per run.
  • Multiple toolchainsarm-none-eabi-gcc, armclang, and ATfE, so you can compare build/runtime trade-offs without changing your model.
  • Memory placement control — pin the tensor arena and model weights to TCM, SRAM, MRAM, or PSRAM independently.
  • Model Explorer overlays — export per-layer metrics as JSON overlays for Model Explorer.
  • Config-file driven — a frozen, immutable hpx.yml schema merges with CLI flags, with strict validation and did-you-mean suggestions for typos.
  • Multi-board — Apollo3, Apollo4, and Apollo5-family EVBs. Run hpx boards for the exact list your install supports.

Install

pip install helia-profiler
# or
uv tool install helia-profiler

Extras: helia-profiler[aot] adds the heliaAOT compiler; helia-profiler[analysis] enables model compute/parameter analysis without hardware.

Hardware prerequisites (ARM toolchain, SEGGER J-Link, and optional Joulescope drivers) are covered step by step in Getting Started.

Quick taste

hpx doctor                                   # check toolchain + dependencies
hpx profile model.tflite                     # profile with defaults
hpx profile model.tflite --power             # add Joulescope power capture
hpx profile --config hpx.yml                 # reproducible, config-driven run
  Layer  Op                  ARM_PMU_CPU_CYCLES  ARM_PMU_INST_RETIRED
  0      CONV_2D                        123,456                98,765
  1      DEPTHWISE_CONV_2D               45,678                34,567
  ...
  Power:  1.234 mA avg   12.345 mW avg   x.xxx µJ / inference

(Illustrative sample only — see Getting Started for a real walkthrough.)

Development

uv sync --locked --all-groups
uv run ruff check src tests tools
uv run pytest -q
uv run mkdocs build --strict

Repository workflows use the committed uv.lock for reproducibility. PyPI installations continue to resolve the compatible dependency ranges published in pyproject.toml.

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

helia_profiler-0.1.1.tar.gz (503.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

helia_profiler-0.1.1-py3-none-any.whl (464.5 kB view details)

Uploaded Python 3

File details

Details for the file helia_profiler-0.1.1.tar.gz.

File metadata

  • Download URL: helia_profiler-0.1.1.tar.gz
  • Upload date:
  • Size: 503.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for helia_profiler-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ad4944a7b43885dbcb5db200939b39b0b2fdcb6ef43ef77c2dce7e3fd1f5cb8c
MD5 75a4672ab45e87a344a4b53a55bc319c
BLAKE2b-256 8b2db91139ad1c25e98e5ac2449347d2e79a7117b620b95afca69efb96628d32

See more details on using hashes here.

File details

Details for the file helia_profiler-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: helia_profiler-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 464.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for helia_profiler-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c2eaa80db10822126b82e05416dd338f0b75a73e67398c0ac3f50dd392d153b5
MD5 70a5108745cbb4fda643ef4a160cac81
BLAKE2b-256 fa052290c3f1cc9fe281a8ebf315915ef14f5982a781a6a5a85c0a8b755912fa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page