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
dist_path: path/to/helia_rt_dist
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. - Tensor arena size in bytes. Required for heliaRT. heliaAOT can auto-size.
- Engine:
tflm,helia-rt, orhelia-aot. - Engine-specific config (passed through to the adapter).
- Target board — run
hpx boardsto see options. - Toolchain prefix (must be on PATH).
- 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.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.
Build-resolution notes#
- By default, generated profiler apps keep the board's normal NSX
channel, but HPX explicitly resolves bothneuralspotxandnsx-ambiq-sdkfrommain. 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.
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.