Skip to content
heliaPROFILER
Reference
HELIA

hpx profile

Profile a model on target hardware

function

Profile a model on target hardware

src/helia_profiler/cli/app.py:89

hpx profile [OPTIONS] [MODEL]
hpx profile arguments
ArgumentTypeDescription
modelOptional[Path]Path to .tflite or .pte model file
hpx profile options
OptionTypeDefaultDescription
--configOptional[Path]YAML config file (hpx.yml)
--verbose, -vint0Increase verbosity
hpx profile advanced
OptionTypeDefaultDescription
--work-dirOptional[Path]Working directory for generated firmware
--cleanboolfalseWipe cached build directory before building (forces full rebuild)
hpx profile build overrides
OptionTypeDefaultDescription
--offlineboolfalseRequire exact compatible lock/module reuse without network resolution.
--update-dependenciesboolfalseExplicitly re-resolve dependency refs and rewrite nsx.lock.
--nsx-channelOptional[str]NSX channel for module resolution (default: the board's registered channel).
--nsx-moduleOptional[list[str]]Override an NSX module's source. Repeatable. Keys: path (local dir), ref (git ref/tag), version (pin). Examples: --nsx-module nsx-core:path=/my/nsx-core --nsx-module nsx-cmsis-core:ref=feat/new-cmsis --nsx-module nsx-gpio:version=2.0.0 Repeatable.
--compiler-launcherOptional[str]CMake compiler launcher to cache compiles (e.g. sccache, ccache). 'auto' (default) uses sccache/ccache if installed; a name or path requires it to be found. Overrides build.compiler_launcher; the HPX_COMPILER_LAUNCHER env var overrides both.
--no-compiler-launcherboolfalseDisable the compiler launcher (equivalent to --compiler-launcher none).
hpx profile engine
OptionTypeDescription
--enginetflm | helia-rt | helia-aot | executorchInference engine (default: helia-rt)
--engine-configOptional[Path]Engine-specific YAML config
--arena-sizeOptional[int]Tensor arena size in bytes
--arena-locationtcm | sram | psramTensor arena placement. helia-rt: places the single runtime tensor arena. helia-aot: use engine.config.aot_args.memory.tensors instead. Omit to let the engine and memory planner choose.
--weights-locationtcm | sram | mram | psramModel weights placement. helia-rt: places the model flatbuffer (psram requires J-Link upload via the RTT transport). helia-aot: use engine.config.aot_args.memory.tensors instead. Omit to let the engine and memory planner choose.
--core-overridecm4 | cm55Select the core library in an explicit heliaRT prebuilt distribution. Unsupported for registry and local source builds.
hpx profile output
OptionTypeDefaultDescription
--output-dirOptional[Path]Results output directory
--output-formatcsv | jsonOutput format
--no-model-explorerboolfalseSkip Model Explorer overlay generation
--detailedboolfalseEmit detailed per-preset/group CSVs and memory breakdown
--fail-on-invalidboolfalseExit 3 when the run evaluates INVALID (artifacts still written)
hpx profile pmu profiling
OptionTypeDescription
--pmu-countersOptional[list[str]]PMU counter selection per compute unit. Repeatable. Format: GROUP:SELECT where GROUP is a supported group for the target SoC (for example cpu/mve/memory on Cortex-M55) and SELECT is 'default', 'all', or comma-separated counter names. Examples: --pmu-counters cpu:default --pmu-counters mve:all, --pmu-counters mve:ARM_PMU_MVE_INST_RETIRED,ARM_PMU_MVE_STALL Repeatable.
--per-layer, --no-per-layerOptional[bool]Per-layer breakdown (default)
--iterationsOptional[int]Inference iterations (default: 100)
--warmupOptional[int]Warmup iterations (default: 5)
--aggregationmean | median | trimmedHow per-layer counters are aggregated across iterations (default: median). 'median' rejects corrupted iterations; 'trimmed' drops extremes then means; 'mean' is the raw average.
hpx profile power measurement
OptionTypeDefaultDescription
--powerboolfalseEnable power capture
--power-driverina228 | joulescopePower driver (default: joulescope = auto-detect JS110/JS220/JS320)
--power-modeexternal | internalPower mode (default: external)
--power-durationOptional[int]Upper bound on the power capture, in seconds; a gated capture raises it to fit the planned window, and it does not set the window length (default: auto-tuned from profile timing)
--power-firmwarededicated | sharedWhich binary is on target during power capture (default: dedicated). 'dedicated' flashes the transport-free hpx_profiler_power image to avoid SWO/UART/RTT/USB current contamination (measured on AP510 EVBs); 'shared' reuses the already-flashed transport binary.
--power-reset-strategyauto | power_cycle | none | debug_reset | swpoi_reset | debug_reset+swpoi_resetReset strategy before power capture (default: auto). Use explicit values only for board bring-up or controlled experiments.
--sync-gpioOptional[int]GPIO pin for external power sync (default: per-board; 10 only for boards without a registered override)
--ensure-powerboolfalseScan for a Joulescope at start-up and enable current passthrough so the board powers on before flashing. Off by default; only needed when the board's power genuinely comes from the Joulescope rail (--power already implies this).
--no-ensure-powerboolfalseExplicitly skip the auto power-on step, overriding --ensure-power or a config file's ensure_board_powered: true.
--power-serialOptional[str]Power instrument serial number to disambiguate when multiple devices are connected (e.g. Joulescope serial '004204'). Alias: --js-serial.
hpx profile target hardware
OptionTypeDefaultDescription
--boardOptional[str]Target board (default: apollo510_evb)
--toolchainOptional[str]Toolchain (default: arm-none-eabi-gcc)
--jlink-serialOptional[str]J-Link probe serial number (default: auto-detect)
--transportrtt | usb_cdc | swo | uartData transport (default: rtt). RTT is recommended for lossless capture.
--usb-portOptional[str]Explicit USB CDC device path for --transport usb_cdc (for example /dev/ttyACM1).
--rtt-buffer-size-upOptional[int]SEGGER RTT up-buffer size for generated RTT firmware. If too small, non-blocking writes during timed inference may be dropped, while blocking CSV/HPX_END writes may stall long enough to hit host timeouts. If omitted, hpx uses a toolchain-aware default.
--cpu-clockOptional[str]CPU clock speed for generated firmware (board-specific, e.g. 'lp'/'hp'). Default: the board's lowest-power tier.
--frozenboolfalseDeprecated alias for --offline: require the compatible lock and materialized module state without dependency resolution.
hpx profile examples
Quick start:
hpx profile my_model.tflite
hpx profile --config hpx.yml
hpx profile my_model.tflite --engine helia-rt --power -vv

Machine-readable: cli.json · profile.md, complete and lossless.