Understanding FX Graphs in PyTorch
Topics covered in this part:
- What an FX Graph is
- Why PyTorch represents models as graphs instead of Python code
- Nodes and data dependencies
- Different FX node types (placeholder, call_module, call_function, call_method, output)
- Inspecting a real FX Graph using symbolic_trace
- Reading print(graph.graph) output
- Why FX Graphs are the intermediate representation for torch.compile
- How TorchInductor uses the FX Graph as its compiler input