trt-perf-analysis
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.
-
Choose the input scope. Use one folder that directly contains
layers_*.jsonand/orprofile_*.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. -
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'smodelobject. -
Run deterministic analysis. Run
scripts/analyze_trt_perf.pyfirst 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. -
Check validation before interpreting. The analyzer exits
0when it can emit structured validation data, even if one or more backends fail validation. Read the generated JSONvalidationobject 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 ispassed, its analysis mode islayer_profile, the layer graph is a DAG, and the layer/profile names match. Forlayer_onlybackends, graph and layer inspection are available but latency/performance interpretation is not.