ad-layer-visualizer

Visualize a transformer decoder layer from an AutoDeploy FX graph dump as a hierarchical diagram.

Updated May 23, 2026
One-click install
npx skills add https://github.com/yo-steven/skills-exploration-20260522 --skill ad-layer-visualizer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ad-layer-visualizer
Source: https://github.com/yo-steven/skills-exploration-20260522/tree/main/skills/TensorRT-LLM/ad-layer-visualizer
Command: npx skills add https://github.com/yo-steven/skills-exploration-20260522 --skill ad-layer-visualizer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires graphviz, nsys, and includes scripts (resource) components.

What problem does it solve?

It helps you inspect a single transformer decoder layer inside an AutoDeploy FX/SSA graph dump by producing a clear hierarchical diagram, and (optionally) overlaying real GPU kernel names and timings from an nsys trace for performance debugging.

Core Features & Use Cases

  • Layer-focused visualization: Select a specific decoder layer number and produce a DOT/PNG diagram from an AutoDeploy graph dump.
  • Graph-to-layer extraction logic: Builds the layer subgraph by following SSA dataflow from layer-specific weight references and residual boundaries.
  • Optional trace annotation: When you provide an nsys trace, it extracts per-layer kernel sequences and maps them onto diagram nodes to highlight what actually ran and how long it took.

Quick Start

Run the skill and ask it: "Visualize layer 5 from my AutoDeploy graph dumps in /path/to/dumps, and annotate it using /path/to/trace.sqlite, saving the rendered PNGs next to the JSON outputs."

Frequently Asked Questions about ad-layer-visualizer

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

FAQPage Schema
How do I visualize a specific transformer decoder layer from an AutoDeploy FX graph dump?

To visualize a transformer decoder layer from an AutoDeploy FX graph dump, you select a dump directory and layer number. The tool extracts the layer subgraph by following SSA dataflow from weight references, producing a hierarchical DOT or PNG diagram.

Can I annotate transformer layer diagrams with real GPU kernel names and durations from an nsys trace?

Yes, you can annotate transformer layer diagrams with real GPU kernel names and durations from an nsys trace. The tool extracts per-layer kernel sequences from the trace and maps them onto the diagram nodes to show execution time.

Do I need graphviz and nsys installed to generate and annotate layer diagrams?

You need graphviz installed to render the layer diagrams into DOT or PNG files. You also need nsys if you want to extract GPU kernel timings from trace files and overlay them onto the graph nodes for performance debugging.

How does graph debugging extract a single layer subgraph from SSA-form dumps?

Graph debugging extracts a single layer subgraph from SSA-form dumps by following the SSA dataflow starting from layer-specific weight references and residual boundaries. This isolates the targeted decoder layer structure from the full model graph.

What is the best way to debug layer-level performance issues using graph dumps and nsys traces?

The best way to debug layer-level performance is to map nsys trace kernels onto a visualized layer diagram. This highlights what actually ran on the GPU and how long it took, allowing you to inspect structural and performance bottlenecks simultaneously.

Does this tool support rendering hierarchical layer diagrams as PNG files?

Yes, the tool supports rendering hierarchical layer diagrams as PNG files. It generates a layer JSON schema from the extracted SSA subgraph, which the renderer then uses to produce the visual DOT or PNG output next to your JSON outputs.