CLI Guide
Use the core mlia CLI for Ethos-U runs. This guide focuses on the command patterns that are most useful in practice.
If you are starting from scratch
A sensible first sequence is:
- List what is installed with
mlia target listandmlia backend list. - Run one compatibility command.
- Run one performance command with
vela. - Only then add a target-compatible Corstone backend or
--json.
Compatibility
Use compatibility when the first question is whether the model can map cleanly to the selected Ethos-U target profile.
mlia check my_model.tflite --target-profile ethos-u55-256 --compatibility
If you want to make the backend path explicit during investigation, add Vela:
mlia check my_model.tflite \
--target-profile ethos-u65-512 \
--compatibility \
--backend vela
Fast performance estimate
For most day-to-day work, start with vela:
mlia check my_model.tflite \
--target-profile ethos-u55-256 \
--performance \
--backend vela
Use this when you want the quickest answer about whether the model looks promising and where the main cost seems to be.
Deeper performance investigation
Use a target-compatible Corstone backend when you want more detail than the quick estimate gives you:
mlia check my_model.tflite \
--target-profile ethos-u65-512 \
--performance \
--backend corstone-310
If you are trying to decide whether the deeper path changes your view of the model, run both backends in one invocation:
mlia check my_model.tflite \
--target-profile ethos-u65-512 \
--performance \
--backend vela \
--backend corstone-310
ExecuTorch AOT through Corstone
The Corstone path can also run supported ExecuTorch workloads. If
mlia-converters-pytorch is installed, MLIA can accept a .pt2 input and
convert it to .pte before running the Corstone backend:
mlia check my_model.pt2 \
--target-profile ethos-u55-256 \
--performance \
--backend corstone-300
If you already have a prepared .pte artifact, you can run it directly:
mlia check my_model.pte \
--target-profile ethos-u85-256 \
--performance \
--backend corstone-320
ExecuTorch performance is supported only on Ethos-U55 with corstone-300 and
Ethos-U85 with corstone-320. For Ethos-U65 .pt2 inputs, use --performance
with --backend vela; Ethos-U65 .pte performance is unsupported. See the
support matrix.
JSON output
Use --json when you want to save results, compare runs, or inspect output more
carefully later.
mlia check my_model.tflite \
--target-profile ethos-u55-256 \
--performance \
--backend vela \
--json
When a run is confusing
If the result is not making sense, try this sequence:
- Rerun with one explicit backend at a time.
- Start with compatibility if unsupported mapping looks likely.
- Compare the top-level cycle counts before reading deeper detail.
- Use a Corstone backend only after you know what the quick estimate is telling you.
Quick rules of thumb
- Use
--compatibilityfirst if you suspect unsupported operators. - Use
--backend velafirst if you want the fastest useful answer. - Use a target-compatible Corstone backend such as
--backend corstone-300,--backend corstone-310, or--backend corstone-320when you need deeper evidence before deciding what to change. - Use
.pt2or.ptewith Corstone only when you are explicitly exercising the ExecuTorch AOT path. - Use
--jsonwhen the result is something you expect to compare or archive.