# Runtime selection

This repo has three supported local FVP runtime engines:

- `litert`
- `helia_rt`
- `helia_aot`

The rule is:

- pick `defaults.fvp.runtime_engine`
- then add only the fields for that engine

LiteRT uses Arm CMSIS-NN. heliaRT and heliaAOT use heliaCORE (`ns-cmsis-nn`).
heliaRT defaults to heliaCORE; the optional explicit setting is
`helia_rt_backend: helia-core`, with `helia` and `ns-cmsis-nn` accepted as aliases.
The former RT `cmsis_nn` and `reference` selections are rejected. Generic/reference
LiteRT support is deferred. Historical result bundles remain readable with their
original runtime/backend values.

## Quick Start

LiteRT:

```bash
uv sync
uv run helx setup
uv run helx run --config examples/at110/kws_litert.yaml
```

heliaRT:

```bash
uv sync
uv run helx setup
uv run helx run --config examples/at110/kws_helia_rt.yaml
```

heliaAOT:

```bash
uv sync --extra aot
uv run --extra aot helx setup
uv run --extra aot helx run --config examples/at110/kws_helia_aot.yaml
uv run --extra aot helx run-case --runtime-engine helia_aot
```

## YAML Pattern

LiteRT:

```yaml
defaults:
  fvp:
    enabled: true
    run: true
    runtime_engine: litert
```

heliaRT:

```yaml
defaults:
  fvp:
    enabled: true
    run: true
    runtime_engine: helia_rt
    helia_rt_backend: helia-core
```

heliaAOT:

```yaml
defaults:
  fvp:
    enabled: true
    run: true
    runtime_engine: helia_aot
    helia_aot:
      platform:
        name: atomiq110
      module:
        name: my_model_aot
        prefix: mymodel
```

## Engine-Specific Fields

Use `helia_rt_backend` only with `runtime_engine: helia_rt`.

Use `helia_aot:` only with `runtime_engine: helia_aot`.

Do not use `helia_aot.enabled`. It is no longer supported.

For `helx run-case --runtime-engine helia_aot`, the CLI generates a minimal `helia_aot:` block with:

- `platform.name: atomiq110`
- `module.name: <model_name>_aot`
- `module.prefix: <model_name>`

## Checked-In Examples

- LiteRT: examples/at110/kws_litert.yaml (`../examples/at110/kws_litert.yaml` in the supplied checkout)
- heliaRT: examples/at110/kws_helia_rt.yaml (`../examples/at110/kws_helia_rt.yaml` in the supplied checkout)
- heliaAOT KWS: examples/at110/kws_helia_aot.yaml (`../examples/at110/kws_helia_aot.yaml` in the supplied checkout)
