perf-analyze

Diagnoses TensorRT-LLM serving deployments via benchmarking, SOL projection, and kernel-level profiling.

14.5k|2.7k|Updated Aug 16, 2023
One-click install
npx skills add https://github.com/NVIDIA/TensorRT-LLM --skill perf-analyze
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: perf-analyze
Source: https://github.com/NVIDIA/TensorRT-LLM/tree/main/agent-flow/.claude/skills/perf-analyze
Command: npx skills add https://github.com/NVIDIA/TensorRT-LLM --skill perf-analyze

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Identifying the dominant performance bottleneck in a TensorRT-LLM serving deployment requires coordinating benchmarking, analytical speed-of-light projection, and multi-tool profiling (nsys, torch profiler, ncu) — a complex, error-prone process when done manually. This Skill drives the repo's perf-analyze workflow to produce a diagnosis report naming the single dominant bottleneck, without modifying the deployment.

Core Features & Use Cases

  • Automated Benchmarking: Benchmarks trtllm-serve at a single concurrency point or a Pareto curve of points (tok/s/user vs tok/s/gpu) with configurable ISL/OSL, datasets, and request rates.
  • Analytical SOL Projection: Derives a speed-of-light ceiling via the internal-perf-sol-analysis skill and correlates measured per-op times against it.
  • Deep Kernel Profiling: Runs nsys, torch profiler, and a bounded ncu per-kernel deep dive on top kernels, then writes a performance report (Markdown + HTML) naming the single dominant bottleneck.
  • Use Case: A user serving a model with trtllm-serve sees low throughput at concurrency 64. They run perf-analyze with their checkpoint and repo paths, and receive a report identifying the dominant bottleneck (e.g., KV-cache bound decode) with trace evidence and recommendations — nothing applied.

Quick Start

Ask the assistant to run perf-analyze on your trtllm-serve deployment by providing the model checkpoint path and TensorRT-LLM repo path, optionally with a concurrency list for Pareto-curve mode.

Frequently Asked Questions about perf-analyze

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I profile TensorRT-LLM serving performance?

Run the perf-analyze workflow with a task.yaml specifying your checkpoint path and TensorRT-LLM repo path. It benchmarks the server, profiles with nsys, torch profiler, and ncu, and writes a performance report naming the single dominant bottleneck.

What is the difference between perf-analyze and perf-optimize?

perf-analyze is diagnosis-only: it benchmarks and profiles a trtllm-serve deployment and reports the dominant bottleneck without applying changes. perf-optimize applies and verifies optimizations; use it after perf-analyze if you want recommendations acted on.

Can perf-analyze benchmark multiple concurrency levels?

Yes. Set concurrency to a list of integers in task.yaml to enable Pareto-curve mode, which benchmarks each point over the same server and profiles at the largest point. num_prompts can also be a list paired index-by-index with the concurrency list.

Does perf-analyze work on a Slurm cluster without local GPUs?

Yes. Add a slurm-environment block with slurm_partition and docker_image to route the server and benchmark through a Slurm-launched container. Size the benchmark to the partition's walltime limit, since allocation expiry kills the workflow.

What happens if the perf-analyze run is interrupted?

Re-running the identical command resumes from the workspace's .perf_analyze_state.json checkpoint at the interrupted stage. Pass the same --task file when resuming, or use --clean to wipe the checkpoint and start fresh.

Why is the SOL projection stage missing from my perf-analyze report?

The SOL projector depends on the internal-perf-sol-analysis skill, which open-source builds of the trtllm-agent-toolkit plugin strip. Without it, the projector falls back to a coarse ceiling from named sources; set sol: {enabled: false} to skip the stage entirely.