Provides profiling tools for ExecuTorch to analyze model performance and timing.

Install

mkdir -p .claude/skills/profile && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/7228" && unzip -o skill.zip -d .claude/skills/profile && rm skill.zip

Installs to .claude/skills/profile

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Profile ExecuTorch model execution. Use when measuring performance, analyzing operator timing, or debugging slow models.
120 chars✓ has a “when” trigger
Advanced

Key capabilities

  • Extracts operator timing data from ExecuTorch models
  • Exports tabular reports for performance bottleneck identification
  • Initializes debug buffers for runtime execution tracing
  • Correlates model execution with ETRecord data

How it works

It attaches to the ExecuTorch runtime to dump execution traces into a buffer, which are then analyzed and formatted into a readable performance table.

Inputs & outputs

You give it
Model.pte file path and method name
You get back
Tabular operator timing and performance report

When to use profile

  • Analyze operator timing in ExecuTorch models
  • Debug slow model execution
  • Generate performance reports for ML models

About this skill

Profile

1. Enable ETDump when loading

program = runtime.load_program("model.pte", enable_etdump=True, debug_buffer_size=int(1e7))

2. Execute and save

outputs = program.load_method("forward").execute(inputs)
program.write_etdump_result_to_file("etdump.etdp", "debug.bin")

3. Analyze with Inspector

from executorch.devtools import Inspector
inspector = Inspector(etrecord="model.etrecord", etdump_path="etdump.etdp")
inspector.print_data_tabular()

When not to use it

  • Profiling high-level Python code unrelated to ExecuTorch
  • Situations where runtime memory overhead is constrained

Prerequisites

ExecuTorch runtime environmentCaptured model.pte and.etrecord files

Limitations

  • Requires model compilation with debug symbols
  • Significant output volume for complex models

How it compares

It provides operator-level granularity for compiled models that generic Python profilers miss.

Compared to similar skills

profile side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
profile (this skill)16moNo flagsAdvanced
gguf-quantization67moReviewIntermediate
pytorch-fsdp266moNo flagsAdvanced
huggingface-accelerate37moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

gguf-quantization

davila7

GGUF format and llama.cpp quantization for efficient CPU/GPU inference. Use when deploying models on consumer hardware, Apple Silicon, or when needing flexible quantization from 2-8 bit without GPU requirements.

629

pytorch-fsdp2

Orchestra-Research

Adds PyTorch FSDP2 (fully_shard) to training scripts with correct init, sharding, mixed precision/offload config, and distributed checkpointing. Use when models exceed single-GPU memory or when you need DTensor-based sharding with DeviceMesh.

627

huggingface-accelerate

davila7

Simplest distributed training API. 4 lines to add distributed support to any PyTorch script. Unified API for DeepSpeed/FSDP/Megatron/DDP. Automatic device placement, mixed precision (FP16/BF16/FP8). Interactive config, single launch command. HuggingFace ecosystem standard.

328

model-pruning

davila7

Reduce LLM size and accelerate inference using pruning techniques like Wanda and SparseGPT. Use when compressing models without retraining, achieving 50% sparsity with minimal accuracy loss, or enabling faster inference on hardware accelerators. Covers unstructured pruning, structured pruning, N:M sparsity, magnitude pruning, and one-shot methods.

222

metal-kernel

pytorch

Write Metal/MPS kernels for PyTorch operators. Use when adding MPS device support to operators, implementing Metal shaders, or porting CUDA kernels to Apple Silicon. Covers native_functions.yaml dispatch, host-side operators, and Metal kernel implementation.

316

optimizing-attention-flash

davila7

Optimizes transformer attention with Flash Attention for 2-4x speedup and 10-20x memory reduction. Use when training/running transformers with long sequences (>512 tokens), encountering GPU memory issues with attention, or need faster inference. Supports PyTorch native SDPA, flash-attn library, H100 FP8, and sliding window attention.

316

Search skills

Search the agent skills registry