How to understand the files generated by TORCH_COMPILE_DEBUG

I use torch.compile to run the resnet50 model. The env are:

TORCH_COMPILE_DEBUG=1 INDUCTOR_ORIG_FX_SVG=1 INDUCTOR_POST_FUSION_SVG=1 TORCHINDUCTOR_FX_GRAPH_CACHE=0

then I get some files:

I know orig_fx_graph_diagram.svg is compute graph before Inductor, and graph_diagram.svg is graph after Inductor.

but how can I find the relation between the op in orig_fx_graph_diagram and the op in graph_diagram ?

Dose the relation show in inductor_provenance_tracking_node_mappings.json or inductor_triton_kernel_to_post_grad_nodes.json ?

1 Like