Skip to content

Commit 7553088

Browse files
Revert "[BE] Add type annotation to eliminate_dead_code (pytorch#142251)"
This reverts commit 3d04de6. Reverted pytorch#142251 on behalf of https://github.com/jeanschmidt due to checking if reverting will fix 'FAILED [5.0221s] test_dataloader.py::TestIndividualWorkerQueue::test_ind_worker_queue' on windows ([comment](pytorch#142251 (comment)))
1 parent a3abe1a commit 7553088

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/expect/TestFXAPIBackwardCompatibility.test_function_back_compat-fx_backcompat_function_signatures.expect

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ torch.fx.graph.Graph.call_function(self, the_function: Callable[..., Any], args:
1212
torch.fx.graph.Graph.call_method(self, method_name: str, args: Optional[Tuple[Argument, ...]] = None, kwargs: Optional[Dict[str, Argument]] = None, type_expr: Optional[Any] = None) -> torch.fx.node.Node
1313
torch.fx.graph.Graph.call_module(self, module_name: str, args: Optional[Tuple[Argument, ...]] = None, kwargs: Optional[Dict[str, Argument]] = None, type_expr: Optional[Any] = None) -> torch.fx.node.Node
1414
torch.fx.graph.Graph.create_node(self, op: str, target: 'Target', args: Optional[Tuple[Argument, ...]] = None, kwargs: Optional[Dict[str, Argument]] = None, name: Optional[str] = None, type_expr: Optional[Any] = None) -> torch.fx.node.Node
15-
torch.fx.graph.Graph.eliminate_dead_code(self, is_impure_node: Optional[Callable[[torch.fx.node.Node], bool]] = None) -> bool
15+
torch.fx.graph.Graph.eliminate_dead_code(self, is_impure_node: Optional[Callable[[torch.fx.node.Node], bool]] = None)
1616
torch.fx.graph.Graph.erase_node(self, to_erase: torch.fx.node.Node) -> None
1717
torch.fx.graph.Graph.get_attr(self, qualified_name: str, type_expr: Optional[Any] = None) -> torch.fx.node.Node
1818
torch.fx.graph.Graph.graph_copy(self, g: 'Graph', val_map: Dict[torch.fx.node.Node, torch.fx.node.Node], return_output_node = False) -> 'Optional[Argument]'

torch/fx/graph.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1815,7 +1815,7 @@ def check_arg(arg: Node, n: Optional[Node] = None) -> None:
18151815
@compatibility(is_backward_compatible=True)
18161816
def eliminate_dead_code(
18171817
self, is_impure_node: Optional[Callable[[Node], bool]] = None
1818-
) -> bool:
1818+
):
18191819
"""
18201820
Remove all dead code from the graph, based on each node's number of
18211821
users, and whether the nodes have any side effects. The graph must be

0 commit comments

Comments
 (0)