Torch.compile generated output files understanding

sabiha_afroz: <p>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?<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/7/d/7ddf738cf7ceb2860c6674da64e82f3e5747ab71.png" data-download-href="https://discuss.pytorch.org/uploads/default/7ddf738cf7ceb2860c6674da64e82f3e5747ab71" title="Screenshot (582)"><img src="https://discuss.pytorch.org/uploads/default/original/3X/7/d/7ddf738cf7ceb2860c6674da64e82f3e5747ab71.png" alt="Screenshot (582)" data-base62-sha1="hXwqq9m7RMJWvqkZBLSyvJa8n2p" width="316" height="500" data-dominant-color="222527"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Screenshot (582)</span><span class="informations">387×612 10.7 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>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?</p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/4/1/41d1002d20257bc1aabde6ff756db85445dad851.png" data-download-href="https://discuss.pytorch.org/uploads/default/41d1002d20257bc1aabde6ff756db85445dad851" title="Screenshot (603)"><img src="https://discuss.pytorch.org/uploads/default/original/3X/4/1/41d1002d20257bc1aabde6ff756db85445dad851.png" alt="Screenshot (603)" data-base62-sha1="9oeOGqAkx9a4NAnkUqlnEf6dSRb" width="690" height="38" data-dominant-color="2D2D2D"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Screenshot (603)</span><span class="informations">1594×88 8.54 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/6/4/640696c4ec23dcb7d2c72b711ad310325f09630b.png" data-download-href="https://discuss.pytorch.org/uploads/default/640696c4ec23dcb7d2c72b711ad310325f09630b" title="Screenshot (604)"><img src="https://discuss.pytorch.org/uploads/default/original/3X/6/4/640696c4ec23dcb7d2c72b711ad310325f09630b.png" alt="Screenshot (604)" data-base62-sha1="egRRyp1EGvP566F6oEFUNsXNTpV" width="690" height="70" data-dominant-color="2A2B29"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Screenshot (604)</span><span class="informations">1200×122 12.1 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>

111357: <p>Hope this tutorial can help you. <a href="https://pytorch.org/tutorials/intermediate/inductor_debug_cpu.html" class="inline-onebox" rel="noopener nofollow ugc">Inductor CPU backend debugging and profiling — PyTorch Tutorials 2.3.0+cu121 documentation</a></p>
<p>Copied from tutorial:</p>
<div class="md-table">
<table>
<thead>
<tr>
<th>File</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>fx_graph_runnable.py</code></td>
<td>Executable FX graph, after decomposition, before pattern match</td>
</tr>
<tr>
<td><code>fx_graph_transformed.py</code></td>
<td>Transformed FX graph, after pattern match</td>
</tr>
<tr>
<td><code>ir_post_fusion.txt</code></td>
<td>Inductor IR before fusion</td>
</tr>
<tr>
<td><code>ir_pre_fusion.txt</code></td>
<td>Inductor IR after fusion</td>
</tr>
<tr>
<td><code>output_code.py</code></td>
<td>Generated Python code for graph, with C++/Triton kernels</td>
</tr>
</tbody>
</table>
</div>