Rate this Page

torch.fx.experimental.optimization.extract_subgraph#

torch.fx.experimental.optimization.extract_subgraph(orig_module, nodes, inputs, outputs)[source]#

Given lists of nodes from an existing graph that represent a subgraph, returns a submodule that executes that subgraph.