trt-perf-analysis

Installation
SKILL.md

TRT Perf Analysis

Workflow

Use scripts/run.sh on Unix-like systems or scripts\run.cmd on Windows for Python scripts. These wrappers do best-effort Python 3.8+ discovery; set SKILL_PYTHON to a Python executable to override discovery. Replace placeholders with platform-native paths.

  1. Choose the input scope. Use one folder that directly contains layers_*.json and/or profile_*.json. Do not call the packager on a parent folder that only contains component subfolders. For model suites with separate encoder, transformer, decoder, VAE, or similar components, handle each component folder separately.

  2. Infer model identity and components. Prefer an explicit model name from the user prompt and pass it with --model-name. Otherwise rely on the analyzer/packager to inspect likely config files, the input directory name, and layer/profile filenames. Keep the name empty when confidence is low. Serialized JSON records the inferred model identity at the top level and in each successful backend's model object.

  3. Run deterministic analysis. Run scripts/analyze_trt_perf.py first when you need an integrity gate before interpretation. The script uses only Python built-in modules, extracts structured analysis data, and serializes it as JSON. This JSON is the authoritative analyzer output for validation, packaging, and AI diagnosis.

  4. Check validation before interpreting. The analyzer exits 0 when it can emit structured validation data, even if one or more backends fail validation. Read the generated JSON validation object to decide which backend reports are usable. If the analyzer exits nonzero, stop because it could not emit structured data. If the schema validator exits nonzero, stop because the generated JSON contract is invalid. Do not continue into performance interpretation for a backend unless its validation status is passed, its analysis mode is layer_profile, the layer graph is a DAG, and the layer/profile names match. For layer_only backends, graph and layer inspection are available but latency/performance interpretation is not.

Installs
5
Repository
nvidia/tensorrt
GitHub Stars
13.3K
First Seen
Aug 24, 2026
trt-perf-analysis — nvidia/tensorrt