mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
[BE] Add type annotation to eliminate_dead_code (#142251)
Test Plan: CI Reviewed By: evanleed Differential Revision: D66887283 Pull Request resolved: https://github.com/pytorch/pytorch/pull/142251 Approved by: https://github.com/ezyang, https://github.com/Skylion007
This commit is contained in:
parent
539286a67b
commit
3d04de6b2f
2 changed files with 2 additions and 2 deletions
|
|
@ -12,7 +12,7 @@ torch.fx.graph.Graph.call_function(self, the_function: Callable[..., Any], args:
|
|||
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
|
||||
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
|
||||
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
|
||||
torch.fx.graph.Graph.eliminate_dead_code(self, is_impure_node: Optional[Callable[[torch.fx.node.Node], bool]] = None)
|
||||
torch.fx.graph.Graph.eliminate_dead_code(self, is_impure_node: Optional[Callable[[torch.fx.node.Node], bool]] = None) -> bool
|
||||
torch.fx.graph.Graph.erase_node(self, to_erase: torch.fx.node.Node) -> None
|
||||
torch.fx.graph.Graph.get_attr(self, qualified_name: str, type_expr: Optional[Any] = None) -> torch.fx.node.Node
|
||||
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]'
|
||||
|
|
|
|||
|
|
@ -1815,7 +1815,7 @@ class Graph:
|
|||
@compatibility(is_backward_compatible=True)
|
||||
def eliminate_dead_code(
|
||||
self, is_impure_node: Optional[Callable[[Node], bool]] = None
|
||||
):
|
||||
) -> bool:
|
||||
"""
|
||||
Remove all dead code from the graph, based on each node's number of
|
||||
users, and whether the nodes have any side effects. The graph must be
|
||||
|
|
|
|||
Loading…
Reference in a new issue