mcpbeat Sign in

Perf Analysis Agent Skill

> Performance analysis coordination workflow. Guides profiling delegation, bottleneck classification (compute/memory/launch/communication/sync), and structured report generation. Use when the user asks to analyze performance, profile a workload, check MFU/SOL, or diagnose bottlenecks.

2k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
14292
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/NVIDIA/TensorRT-LLM --skill perf-analysis

The instruction itself

12 sections, as written by the author

Performance Analysis

Principles

  • Delegate profiling, own analysis. You coordinate the analysis workflow

but do not run profiling tools directly. Delegate all profiling and

measurement tasks to perf-profiling-specialist or other domain specialists.

  • Metrics from tools, never invented. All performance numbers must come

from profiling tool output. Never fabricate metrics.

  • Classify before recommending. Identify the bottleneck type before

suggesting optimizations. The wrong classification leads to wasted effort.

  • Structured reports. Every analysis produces a report with Summary,

Metrics, Findings, and Recommendations.

Key Performance Metrics

  • Throughput: samples/sec, tokens/sec, iterations/sec
  • Latency: end-to-end time, kernel time, communication time
  • MFU (Model FLOPs Utilization): actual FLOPs / theoretical peak FLOPs
  • % of SOL (Speed of Light): current perf / hardware peak perf
  • GPU Utilization: SM occupancy, tensor core usage
  • Memory Bandwidth: DRAM bandwidth utilization vs peak

Analysis Workflow

  • Understand: Clarify what metrics the user needs (MFU, SOL, latency, etc.)
  • Plan: Plan your profiling and analysis steps before starting
  • Profile: Delegate to perf-profiling-specialist for actual measurements
  • Measure: Extract requested metrics from profiling results
  • Classify: If diagnosing issues, determine primary bottleneck type
  • Report: Generate performance analysis report with findings

Bottleneck Classification

When diagnosing performance issues, classify the primary bottleneck:

| Type | Indicator | Description |

|------|-----------|-------------|

| Compute-bound | High GPU utilization, low memory bandwidth usage | Limited by compute capacity (FLOPs) |

| Memory-bound | High memory bandwidth, low compute utilization | Limited by DRAM throughput |

| Launch-overhead | Many small kernels, high CPU time | CPU becoming bottleneck from kernel launch overhead |

| Communication-bound | Significant time in collective operations | Limited by inter-GPU or inter-node communication |

| Sync-bound | Excessive CPU-GPU synchronization points | Stalls from unnecessary synchronization |

Delegation Guidelines

When delegating to specialists, describe the desired outcome -- not the

tool methodology.

DO include:

  • The workload: file path, code snippet, or command to profile
  • Problem context: dimensions, dtypes, FLOPs calculations, batch sizes
  • Desired metrics: SOL%, MFU, throughput, occupancy, bottleneck classification
  • Any constraints: specific kernel to target, profiling region markers

DO NOT include:

  • Specific tool flags or command patterns (e.g., --set=full, --section SpeedOfLight)
  • Step-by-step tool usage instructions
  • Fallback strategies for tool failures
  • Example commands
  • Output file paths or artifact locations (specialists create their own workspace artifacts)

Specialists have their own skills that encode best practices for tool usage

and their own workspace artifacts for output. Prescribing commands in the

delegation overrides their skills and may lead to suboptimal profiling

strategies (e.g., collecting 8000+ metrics with --set=full when a targeted

section analysis would be faster and more surgical).

Good Example

Profile the batched GEMM kernel in bmm_workload.py with NCU.
The workload uses cudaProfilerStart/Stop markers to isolate the region of interest.
Collect kernel-level metrics: SOL%, compute/memory throughput, DRAM bandwidth,
tensor core utilization, occupancy, warp stall reasons, and roofline classification.
The batched GEMM performs 68.72 GFLOP per call (B=32, M=512, N=1024, K=2048, FP16).
Calculate MFU against the GPU's peak FP16 tensor core TFLOP/s.

Bad Example

Run NCU with --set=full --profile-from-start off --target-processes all.
If --set=full fails, try --set=detailed. Parse the CSV output for
sm__throughput.avg.pct_of_peak_sustained_elapsed.
Save raw NCU output to /workspace/.../ncu_output.txt.

Remote Profiling

When profiling on a remote SLURM cluster, include the

Remote Execution Context block in the delegation prompt with the SSH+srun

wrapper for the target cluster. The perf-profiling-specialist will prefix its

commands (nsys, ncu, nvidia-smi) with this wrapper.

The perf-profiling-specialist does not need the remote-slurm skill — the

context block provides everything it needs to execute remotely.

Available Specialists

Delegate profiling and domain-specific analysis to these specialists:

  • perf-profiling-specialist: Runs nvidia-smi, nsys, ncu, torch.profiler. Use for ALL profiling tasks.
  • perf-torch-cuda-graph-specialist: Analyzes CUDA Graph compatibility and applies capture workflows

Report Format

Structure every analysis report with these four sections:

  • Summary: High-level performance status or bottleneck classification
  • Metrics: Key performance numbers from profiling
  • Findings: Detailed observations with evidence
  • Recommendations: Prioritized list of optimizations (if applicable)

Example Report

## Summary
Training at 42% MFU, memory-bound due to large attention tensors.

## Metrics
- Throughput: 1,247 samples/sec
- MFU: 42% (vs 65% theoretical for this model)
- % of SOL: 58% (room for 1.7x improvement)
- GPU Utilization: 45%
- Memory Bandwidth: 850 GB/s (89% of peak)
- Kernel Count: 1,247 per iteration

## Findings
1. Self-attention consumes 60% of memory bandwidth
2. Optimizer step has 3 unnecessary synchronizations
3. Batch size could be increased by 2x

## Recommendations
1. Enable FlashAttention (expected: +15% MFU)
2. Remove synchronizations in optimizer (expected: +5% throughput)
3. Increase batch size to improve GPU utilization

Other skills for the same job

different authors, same section of the catalogue
XLSX
by anthropics
vendor ×15

Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas

5k tokens scripts
XLSX
by w95
×7

Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like \"the xlsx in my downloads\") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.

3k tokens
Raffle Winner Picker
by frostant
×5

Picks random winners from lists, spreadsheets, or Google Sheets for giveaways, raffles, and contests. Ensures fair, unbiased selection with transparency.

949 tokens
Fda Database
by christophacham
×4

Query openFDA API for drugs, devices, adverse events, recalls, regulatory submissions (510k, PMA), substance identification (UNII), for FDA regulatory data analysis and safety research.

32k tokens scripts
Matlab
by christophacham
×4

MATLAB and GNU Octave numerical computing for matrix operations, data analysis, visualization, and scientific computing. Use when writing MATLAB/Octave scripts for linear algebra, signal processing, image processing, differential equations, optimization, statistics, or creating scientific visualizations. Also use when the user needs help with MATLAB syntax, functions, or wants to convert between MATLAB and Python code. Scripts can be executed with MATLAB or the open-source GNU Octave interpreter.

25k tokens
Umap Learn
by ComeOnOliver
×4

UMAP dimensionality reduction. Fast nonlinear manifold learning for 2D/3D visualization, clustering preprocessing (HDBSCAN), supervised/parametric UMAP, for high-dimensional data.

14k tokens
D3 Viz
by chrisvoncsefalvay
×3

Creating interactive data visualisations using d3.js. This skill should be used when creating custom charts, graphs, network diagrams, geographic visualisations, or any complex SVG-based data visualisation that requires fine-grained control over visual elements, transitions, or interactions. Use this for bespoke visualisations beyond standard charting libraries, whether in React, Vue, Svelte, vanilla JavaScript, or any other environment.

20k tokens
Alphafold Database
by christophacham
×3

Access AlphaFold 200M+ AI-predicted protein structures. Retrieve structures by UniProt ID, download PDB/mmCIF files, analyze confidence metrics (pLDDT, PAE), for drug discovery and structural biology.

7k tokens

How to use it

Copy the folder

Take nvidia/perf-analysis from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.