Full graph capture records an entire model computation as one graph, including its operations and dependencies. The result is a complete representation of the model’s behavior, but it requires a static computation graph. section 17.3.1
Full graph capture matters because it:
- Represents the model’s computation as a complete graph rather than separate fragments. section 17.3.1
- Cannot correctly capture input-dependent conditionals or loops, because an example input would expose only one execution path. section 17.3.1
- Contrasts with torch.compile, which can break the graph into smaller pieces when unsupported operations or dynamic behavior appear. section 17.3.1 section 17.3
A conditional model
A model that chooses one linear layer when x.sum() > 0 and another otherwise contains input-dependent control flow. Calling torch.export.export(model, (example_input,)) raises “Dynamic control flow is not supported at the moment,” because full graph capture cannot represent both conditional paths in one static graph.
