Configuration#
heliaPROFILER uses a layered configuration system: a YAML file merged with CLI flags, resolved once at startup into an immutable config object.
For the complete key-by-key schema, see the
Configuration Reference. Calling
heliaPROFILER from Python directly? See the
Python API configuration reference for
ProfileConfig and its section classes.
Config file#
Create an hpx.yml (any name works — pass it with --config):
model:
path: my_model.tflite # (1)!
arena_size: 131072 # (2)!
engine:
type: helia-rt # (3)!
config: # (4)!
variant: release-with-logs
target:
board: apollo510_evb # (5)!
toolchain: arm-none-eabi-gcc # (6)!
jlink_serial: "" # (7)!
profiling:
pmu_counters: # (8)!
cpu: all
memory: all
mve: all
per_layer: true # (9)!
iterations: 5 # (10)!
warmup: 2
power:
enabled: false # (11)!
driver: joulescope
mode: external
duration_s: 30
io_voltage: 1.8
output:
format: csv # (12)!
dir: ./results
model_explorer: true # (13)!
detailed: false # (14)!
- Path to the
.tflitemodel file. - Optional tensor arena override in bytes. Start with the default, then tune
from the reported
allocated_arena. heliaAOT uses its own memory plan. - Engine:
tflm,helia-rt,helia-aot, orexecutorch. - Engine-specific config (passed through to the adapter).
- Target board — run
hpx boardsto see options. - Toolchain selection. GCC and armclang are discovered on
PATH; ATfE is resolved throughATFE_ROOT. - Optional — select a specific J-Link probe by serial number.
- PMU counter groups and selections. See PMU Counters.
- Per-layer breakdown (vs. whole-model aggregate).
- Inference iterations per PMU pass (averaged in results).
- Enable Joulescope power capture. See Power Measurement.
- Output format:
csvorjson. - Generate Model Explorer overlay JSONs. See Model Explorer.
- Emit detailed per-preset CSVs and memory breakdown (
--detailed).
CLI overrides#
CLI flags override YAML values. Anything you can set in YAML can also be specified on the command line:
hpx profile --config hpx.yml \
--board apollo3p_evb \
--iterations 50 \
--engine helia-aot \
--output-dir ./my_results
The model path can also be a positional argument:
Config resolution order#
- Load YAML config file (if
--configprovided) - Override with CLI flags
- Apply defaults for any unset fields
- Freeze into an immutable
ProfileConfigdataclass
After this point, the config is never mutated. Every stage reads from the same frozen object.
Field notes#
The complete key-by-key schema (types, defaults, deprecations) lives in the generated Configuration Reference. The notes below cover behavior that a schema table can't express.
heliaRT config notes#
engine.config.resolver_opsnow defaults toautoforhelia-rt. Leave it unset unless you specifically want the broaderallresolver surface.- With no engine path override, HPX resolves the pinned
nsx-helia-rtmodule through the NSX registry. Usesource_path,dist_path, orsourceonly for an explicit local/custom runtime. target.clock.cpuis the supported way to choose CPU frequency. Set it to one of the board's named speeds (lp/hp, orulp/lp/hpon Atomiq); HPX validates the selection against the chosen board's platform registry entry and maps it onto the correct NSX perf mode in the generated firmware. Leave it unset to use the board's lowest-power tier.- Models with
CALL_ONCE,VAR_HANDLE,ASSIGN_VARIABLE, orREAD_VARIABLEdo not need special-case firmware patches in config; HPX now enables the resource-variable runtime automatically when model analysis sees those ops. - If a
helia-rtrun succeeds, use the reportedallocated_arenato tightenmodel.arena_sizeinstead of growing the arena blindly.
Advanced target overrides#
target.custom_boardsadds config-scoped board definitions without editing the built-in platform registry.target.custom_socsadds config-scoped SoC definitions for bring-up cases where the built-in SoC metadata is not sufficient.target.custom_boards.<name>.based_onclones an existing built-in board and lets you override fields likechannel,psram_kb, anddefault_sync_gpio_pin.target.custom_boards.<name>.starter_profile_boardreuses the NSX starter profile from a built-in board when the custom board should inherit its module graph.target.custom_boards.<name>.ble_reset_gpio_pinis the GPIO wired to an onboard Cooper BLE controller's reset line on a "Blue" board, held low during power captures. Inherited frombased_on; leave it unset (or writenull) on boards with no onboard radio. Unlike its three sibling pin keys,0does not mean "disabled" here and is rejected as ambiguous — see Boards → Adding a new board.- The four
target.custom_boards.<name>.*_gpio_pinkeys take a plain integer pad number. Booleans are rejected rather than resolving to pads 1 and 0: these pins are driven for the duration of a power capture, so a typo'dtruewould silently put an unrelated GPIO inside your measurement. target.custom_socs.<name>.app_flash_load_addrdeclares the first flash address above the part's bootloader-reserved region. It is inherited frombased_onwhen you name one; with neither — or with an explicitnull, which overrides inheritance — HPX treats the address as unknown and refuses the fallback flash rather than guessing fromfamily. This changed: an entry with nobased_onpreviously inherited its family's address. See Boards → App flash load address for the upgrade note.- Unrecognized keys in
target.custom_socsandtarget.custom_boardsare rejected with the list of supported keys, a close-match suggestion where one applies, and no silent discarding. Both blocks accept a free-formdescription:.
Build-resolution notes#
- By default, generated profiler apps keep the board's normal NSX
channel, but HPX pins the verified peeled commits forneuralspotx-v0.7.17(8b5a7fa9…b44f) andnsx-ambiq-sdkv5.2.24 (a9f4ec25…1132) in the qualified compatibility baseline. build.nsx_modules.<module>.refor.versionoverrides win over that default for the owning project.build.nsx_modules.<module>.pathinstalls a local module checkout into the generated app and bypasses registry resolution for that module only.- Ordinary profiles reuse a compatible
nsx.lockbyte-for-byte and runnsx sync --frozen; they do not check or advance upstream refs. A lock is resolved only when missing or structurally incompatible. - Set
build.update_dependencies: true(CLI:--update-dependencies) for the explicit operation that refreshes refs and rewrites the lock. It cannot be combined with offline mode. - Set
build.offline: true(CLI:--offline) to require both a compatible lock and already-materialized exact module trees. The legacy--frozenflag is retained as an alias for this strict mode. - Cached applications are isolated by a deterministic workspace fingerprint covering the compatibility baseline and registry hashes, target/toolchain, engine backend/variant/version, overrides (including local content hashes), and module-relevant build settings.
Compiler-launcher notes#
auto(the default) wraps every compile withsccacheorccacheif either is found onPATH, and does nothing otherwise — so simply installing the binary opts you in. Caching is correctness-safe (the launcher hashes the full compile inputs) and only accelerates the compile step, not NSX lock/sync/configure or flash.none(alsooff/false) disables the launcher.- An explicit tool name or path (e.g.
sccache) is required: the build fails if it cannot be found. - The
HPX_COMPILER_LAUNCHERenvironment variable overrides this field, and the--compiler-launcher/--no-compiler-launcherCLI flags override both.
Validation#
- Unknown keys anywhere in the config tree are rejected at load time, with did-you-mean suggestions based on the real field names.
- Every config error raised is a
ConfigErrorcarrying ahintdescribing how to fix it.