agentleFS
NVIDIAKnown publisherNVIDIA/TensorRT/.agents/skills/trt-perf-analysis/SKILL.md

trt-perf-analysis

Skill13k starsChanged 5 months agoApache-2.0View on GitHub

Generate an interactive HTML performance report from existing TensorRT (TRT) layer-info and profile/latency JSON pairs, commonly named `layers_*.json` and `profile_*.json`. Use when the user has such dumps and wants to analyze or diagnose inference performance, including hot layers, per-layer-type latency breakdowns, fusion and other optimization opportunities, or comparison across engines, builds, or configurations.

1 other project uses a version of this.

Trending

Quiet this year.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the NVIDIA/TensorRT repository that our weekly crawl found: only 4 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use <runner> below as scripts/run.sh on Unix-like systems or scripts\run.cmd on Windows.

    line 10
  2. Distinctive:

    Treat each step as a gate.

    line 12
  3. Distinctive:

    Use JSON pairs explicitly provided by the user.

    line 16
  4. Very specific:

    Create one report per model or component with scripts/package_report.py.

    line 39

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

TRT Perf Analysis

Workflow

Use <runner> below as scripts/run.sh on Unix-like systems or scripts\run.cmd on Windows. Set SKILL_PYTHON to override Python 3.8+ discovery.

Treat each step as a gate. On failure, stop, report the error, clean up temporary outputs, and do not create or preview a report.

  1. Resolve inputs in this order:

    1. Use JSON pairs explicitly provided by the user; preserve their pairing. Filenames may be arbitrary.
    2. For a provided folder, find complete pairs there. Match conventional layers_<label>.json and profile_<label>.json names first; use JSON structure and layer names for nonstandard names. Handle component subfolders separately.
    3. With no explicit path, infer only from clear context: attachments, discussed paths, or the active workspace. Fail if no unambiguous pair is found.

    Require at least one readable layer-info and profile/latency pair. Accept raw detailed TensorRT inspector output as either a layer array or a TensorRT 11 object containing Layers. Do not use analyze-data.json as layer-info input. Reject missing, ambiguous, layer-only, or profile-only inputs.

  2. Analyze in staging. Run scripts/analyze_trt_perf.py before interpretation. Use repeated --data <layer.json> <profile.json> for explicit or nonstandard pairs; use folder mode only for conventionally named pairs. Pass a user-provided model name with --model-name; otherwise use analyzer inference. Write analyze-data.json outside the final report folder and use it as the source for all conclusions.
  3. Validate. The analyzer may exit 0 for invalid inputs. Require its output and run scripts/validate_analyze_data.py --require-passed. Continue only when it reports both SCHEMA PASS and SEMANTIC PASS; otherwise surface the validation messages and stop.

    Treat TensorRT inspector names as authoritative. Match repeated layer/profile names by occurrence, and treat every repeated tensor output name as one logical tensor. For topology, fail only when the resulting graph is not a DAG or a declared graph input is also produced by a layer; a declared graph output may still feed another layer.

  4. Write the diagnosis. First understand the report scope, graph, timing distribution, backend differences, hot layers, fusion clues, and caveats. Ground analyze.md in the generated JSON, and treat the analyzer's model category as a hypothesis no stronger than its evidence. Use exactly:

    1. ## Summary — high-confidence findings and top optimization leads.
    2. ## Details — interpretation, comparisons, hypotheses, and ranked experiments.

    Focus on conclusions not already rendered from analyze-data.json; omit validation checklists, full tables, and path dumps. Rank recommendations by impact and confidence, separate facts from hypotheses, and support each with evidence and a next experiment. Use one analysis per report scope; compare multiple pairs only when they belong to that scope.

  5. Package. Create one report per model or component with scripts/package_report.py. For explicit or nonstandard pairs, keep validated analyzer JSON in staging and pass it with --analyze-data plus the final --report-dir.

    Honor explicit output locations: use --report-dir for an exact folder and --output-parent for an auto-named child. Otherwise use the active workspace; when running inside this skill, let the packager fall back to the system temp directory. Remove incomplete report artifacts if packaging fails.

  6. Preview. Serve only the completed report folder when requested.

Common Commands

<runner> <skill-dir>/scripts/analyze_trt_perf.py --data <layer-info-a.json> <profile-a.json> --data <layer-info-b.json> <profile-b.json> --output <staging-folder>/analyze-data.json
<runner> <skill-dir>/scripts/analyze_trt_perf.py <model-folder> --output <analysis.json>
<runner> <skill-dir>/scripts/validate_analyze_data.py <staging-folder>/analyze-data.json --require-passed
<runner> <skill-dir>/scripts/package_report.py <model-folder> --report-dir <exact-report-folder> [--model-name <model>] [--analyze-md <final-analysis.md>]
<runner> <skill-dir>/scripts/package_report.py --analyze-data <staging-folder>/analyze-data.json --report-dir <exact-report-folder> --analyze-md <final-analysis.md>
<runner> -m http.server 8765 --bind 127.0.0.1 --directory <report-folder>

Then open http://127.0.0.1:8765/.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.