Torch.compile generated output files understanding

When I am using torch.compiler and torch._dynamo for a model training, it generates FX graphs in three directories. 1) model_backward, 2) model_forward, 3) model_inference. Directory 1 contains the FX graphs for backward propagation operations, directory 2 contains the FX graphs for forward propagation operations. What about the third directory? Is it about parameter updates after backward propagation? Is there any documentation to understand these generated FX graphs outputs? (I have attached one screenshot). What are those fx_graph_readable.py, fx_graph_runnable.py, fx_graph_transformed.py files?

torch_compile_debug/resnet_50/torchinductor/model__0_backward_12.1/fx_graph_transformed.py returns some tensors (second screenshot). Are these tensors being used in torch_compile_debug/resnet_50/torchinductor/model__4_inference_13.2/fx_graph_transformed.py (third screenshot) forward function as parameters?

Hope this tutorial can help you. Inductor CPU backend debugging and profiling — PyTorch Tutorials 2.3.0+cu121 documentation

Copied from tutorial:

File Description
fx_graph_runnable.py Executable FX graph, after decomposition, before pattern match
fx_graph_transformed.py Transformed FX graph, after pattern match
ir_post_fusion.txt Inductor IR before fusion
ir_pre_fusion.txt Inductor IR after fusion
output_code.py Generated Python code for graph, with C++/Triton kernels
1 Like