ANE (Apple Neural Engine) profiler for Core ML models. Analyzes per-op cost estimates, device placement, and measures actual prediction throughput.
Designed for agent and developer workflows when profiling and optimizing Apple Neural Engine Core ML models. The text report is human-readable, and the JSON export is intended to make it easy for agents to inspect placement, interruptions, fallbacks, and measured performance.
For a compact agent-oriented workflow, see AGENTS.md.
brew install anemll/tap/anemll-profileOr build from source:
make && sudo make installIf installed with Homebrew:
brew update && brew upgrade anemll/tap/anemll-profileIf installed from source:
git pull
make && sudo make installVerify the installed version:
anemll-profile --version- Agent guide (
AGENTS.md) — a first-class workflow guide for agents, including install steps, required dependencies, recommended JSON usage, and how to interpret profiler output for optimization work - ANE graph interruptions — interruption analysis highlights non-ANE islands that break continuous ANE execution; the detour can be CPU or GPU, not just CPU
- Latency-ranked interruption hot spots — interruptions are ranked by estimated switch penalty plus island runtime to highlight the most expensive detours first
- Function timeline view — each function now shows a compact accelerator timeline with labeled interruption islands and ignored leading/trailing non-accelerator runs
- Configurable switch heuristic — use
--interrupt-ms/--interrupt-boundary-msto tune the estimated cost per accelerator boundary - Structured JSON export — use
-j/--json FILEto write a machine-readable report for agents and downstream tooling
anemll-profile model.mlmodelc
anemll-profile model.mlpackage
anemll-profile /path/to/model # auto-detects .mlmodelc or .mlpackage
anemll-profile -a model.mlmodelc # include GPU in device assignment
anemll-profile --interrupt-ms 150 model.mlmodelc # change heuristic ANE boundary cost
anemll-profile -j report.json model.mlmodelc # write structured JSON report- Op-Type Runtime Breakdown — per-op-type estimated runtime, GFLOP/s, GB/s, memory/compute bound
- ANE Graph Interruptions — detects non-ANE islands that interrupt ANE execution, ranks them by estimated latency tax, and shows a function timeline of where they occur
- Measured Prediction — actual wall-clock time, iter/s, weight bandwidth GB/s
- Top Expensive Ops — the 20 slowest operations
- Conv Detail — convolution ops with channel counts and work unit efficiency
- CPU/GPU Fallback — ops not on ANE with specific compiler reasons (e.g., "Cannot support standalone slice_update", "Unsupported tensor data type: int32")
- Loads
MLComputePlanto get per-op device assignment and cost weights - Captures Espresso
[CostModelFeature]logs via forked/usr/bin/log stream - Parses
Unsupported opcompiler messages for ANE fallback reasons - Analyzes ordered MLComputePlan ops to find ANE graph interruption islands, including CPU or GPU detours
- Applies a heuristic ANE boundary penalty (300 ms by default) to rank interruption hot spots
- Runs actual predictions with dummy inputs to measure real throughput
- Computes weight-only DRAM bandwidth (excludes L2-resident activations)
- macOS 14+ (Sonoma) — requires
MLComputePlanAPI - Xcode Command Line Tools
FoundationandCoreMLsystem frameworks included with macOS
Recommended for agent automation:
jqfor parsing-jJSON reports
MIT