armdeveloperecosystem/sme-executorch-profiling/run-profiling
Claude Code and agent skill by armdeveloperecosystem/sme-executorch-profiling
- community
Checking that the SKILL.md file is still in the repository.
Run SME2-on versus SME2-off profiling experiments for an exported ExecuTorch .pte model on macOS or Android. Use when Codex needs to create or edit pipeline JSON configs, execute timing or XNNPACK trace runs, compare runner variants, collect ETDump artifacts, rerun analysis-only mode, or validate profiling output directories.
Install
npx vskill@latest install armdeveloperecosystem/sme-executorch-profiling/run-profilingSKILL.md
Run Profiling
Operating Rules
- Use timing mode for latency claims. Use
xnntracemode only to identify selected XNNPACK kernels because logging changes timing. - Keep SME2-on and SME2-off experiments in the same config so artifacts share model, runs, warmup, threads, and output root.
- Use
model_profiling/out_<model>/runs/<platform>/as the output root unless the user requests another layout. - Use a separate trace output root such as
model_profiling/out_<model>/runs/<platform>_trace/when collecting XNNPACK kernel evidence. - Validate the
.pteand runner paths before running long experiments. - If runners were built in an external checkout, keep
EXECUTORCH_DIR=/path/to/executorchexported soexecutorch/cmake-out/...config paths resolve correctly. - If a runner crashes but ETDump exists, report the crash separately from timing analysis; do not claim model correctness from timing alone.
Required Inputs
- Exported
.ptepath. - Built runner paths for the target platform.
- Target platform:
macorandroid. - Experiment count, warmup count, thread counts, and optional Android
cpu_affinity. - For Android execution: Android runner binaries built with
ANDROID_NDK/ANDROID_NDK_HOME, Android platform-tools soadbis available, and an authorized Armv9 SME2-capable Android device when SME2 kernel evidence is required.
Procedure
- Activate the environment:
``bash export EXECUTORCH_DIR=/path/to/executorch source .venv/bin/activate ``
- Start from the closest template:
``bash cp model_profiling/configs/templates/mac_template.json model_profiling/configs/my_experiment.json # or cp model_profiling/configs/templates/android_template.json model_profiling/configs/my_android_experiment.json ``
- Edit the config so
model,output_root,experiments[].runner_path,mode,runs,warmup, andthreadsmatch the task. A minimal macOS pair is:
``json { "model": "model_profiling/out_toy_cnn/artifacts/toy_cnn_xnnpack_fp16.pte", "output_root": "model_profiling/out_toy_cnn/runs/mac", "experiments": [ { "name": "mac_sme2_on", "runner_path": "executorch/cmake-out/mac-arm64/executor_runner", "mode": "timing", "runs": 10, "warmup": 1, "threads": [1] }, { "name": "mac_sme2_off", "runner_path": "executorch/cmake-out/mac-arm64-sme2-off/executor_runner", "mode": "timing", "runs": 10, "warmup": 1, "threads": [1] } ], "analysis": { "compare_pairs": [] } } ``
- Validate JSON before execution:
``bash python -m json.tool model_profiling/configs/my_experiment.json >/dev/null ``
- Run the pipeline:
``bash python model_profiling/scripts/mac_pipeline.py \ --config model_profiling/configs/my_experiment.json ``
Run XNNPACK trace separately when kernel-selection evidence is required. The toy smoke config is:
``bash python model_profiling/scripts/mac_pipeline.py \ --config model_profiling/configs/toy_cnn_trace_run.json ``
For Android:
``bash bash model_profiling/scripts/check_prereqs.sh --android-run python model_profiling/scripts/android_pipeline.py \ --config model_profiling/configs/my_android_experiment.json ``
For a remote Android device:
``bash bash model_profiling/scripts/check_prereqs.sh --android-run python model_profiling/scripts/android_pipeline.py \ --config model_profiling/configs/my_android_experiment.json \ --remote-device 192.168.1.100:5555 ``
- Re-run analysis without re-executing the model when needed:
``bash python model_profiling/scripts/mac_pipeline.py \ --config model_profiling/configs/my_experiment.json \ --analysis-only ``
- Validate the run directory:
``bash python model_profiling/scripts/validate_results.py \ --results model_profiling/out_toy_cnn/runs/mac ``
Validate XNNPACK trace evidence:
``bash python model_profiling/scripts/validate_results.py \ --results model_profiling/out_toy_cnn/runs/mac_trace \ --require-sme2-kernels ``
Success Criteria
manifest.jsonandmetrics.jsonexist under the run directory.manifest.jsonis the provenance/artifact index;metrics.jsonis measurement data with artifact references.- Each timing experiment produced
.etdump, latency log, and generated CSV files. validate_results.pyexits 0 for timing outputs.- When trace validation is requested, kernel CSVs exist and
validate_results.py --require-sme2-kernelsconfirms SME2-on selected at least one SME2 kernel while SME2-off did not. - Analysis outputs include
analysis_summary.jsonwhen ETDump conversion succeeded.
Failure Triage
- Missing runner: use
build-runners. - Missing
.pte: useexport-model. - Android device unavailable: run
adb devices, authorize the device, or use--remote-device. - Android runner missing: rebuild with
ANDROID_NDKorANDROID_NDK_HOMEset, then runvalidate_setup.py --require-xnntrace-runners --require-android-runners. - No CSV files after ETDump: rerun
analyze-resultsand capture the converter error. - Trace logs requested for latency: split into separate timing and
xnntraceexperiments before drawing conclusions.
Handoff
After profiling succeeds, use analyze-results for deeper operator/kernel views or generate-report for a shareable Markdown report.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingagent_skill_ml_profiling/run-profiling/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/armdeveloperecosystem/sme-executorch-profiling/run-profiling)