Loading...
Loading...
Enable and interpret TensorRT-LLM AutoDeploy FX graph text dumps via AD_DUMP_GRAPHS_DIR. Use when you need before/after graphs per transform, to locate subgraphs, or to confirm a rewrite ran. Paths and behavior are grounded in tensorrt_llm/_torch/auto_deploy (GraphWriter, BaseTransform). Complements ad-add-fusion-transformation.
npx skill4agent add nvidia/skills ad-graph-dumpAD_DUMP_GRAPHS_DIRexamples/auto_deploy/tensorrt_llm/getitemviewreshape| Skill | Use it for |
|---|---|
| ad-layer-visualizer | Extracting and visualizing a single decoder layer from a dump as a DOT/PNG diagram. |
| ad-add-fusion-transformation | Implementing or reviewing fusion passes once you know what the graphs show. |
| trtllm-codebase-exploration | Searching the TRT-LLM tree for transforms, custom ops, and patterns. |
| trtllm-code-contribution | Tests and contribution hygiene after you change TRT-LLM. |
export AD_DUMP_GRAPHS_DIR=/path/to/output/dirGraphWriter.DUMP_GRAPHS_ENV == "AD_DUMP_GRAPHS_DIR"tensorrt_llm/_torch/auto_deploy/utils/graph_writer.pyBaseTransformgraph_writer.dump_graph(mod, t_name, self.config.stage.value)tensorrt_llm/_torch/auto_deploy/transform/interface.py_visualize_graphGraphWriter.dump_graphAD_DUMP_GRAPHS_DIRADLogger.rank0GraphWriterAD_DUMP_GRAPHS_DIR{NNN}_{<stage.value>}_{<transform_key>}.txtNNNconfig.stagedefault.yamlstage:transform_namedump_graph# Transform: <transform_key>
# Stage: <stage.value>
# GraphModules found: <count>torch.fx.GraphModulemod.named_modules()dump_ssa_with_meta()node.metaAD_DUMP_GRAPHS_DIR=/tmp/ad-graphs \
python examples/auto_deploy/build_and_run_ad.py --model <hf-model-id> --use-registryAD_DUMP_GRAPHS_DIR[stage=<stage.value>, transform=<transform_key>]with_transform_loggingtransform/interface.py[SUMMARY]matches=<n>skippeddisabled_log_transform_summaryAD_DUMP_GRAPHS_DIRGraphModuledump_graphgraph_writer.pytensorrt_llm/_torch/auto_deploy/utils/graph_writer.pytensorrt_llm/_torch/auto_deploy/transform/interface.py