Skip to content

Commit

Permalink
Fix S367052 to unblock ICVR MC3 (pytorch#109853)
Browse files Browse the repository at this point in the history
Summary: Somehow "getitem" started to get Tensor starting from ads_ranking:996 and broke SDD pipelining FX-transformer. We need to skip the Tensor node in annotation.

Test Plan:
N4326037

# Before
 {F1099052907}

# With this diff

 {F1099052270}

Differential Revision: D49528046

Pull Request resolved: pytorch#109853
Approved by: https://github.com/jackiexu1992, https://github.com/lanza, https://github.com/xush6528
  • Loading branch information
ge0405 authored and pytorchmergebot committed Sep 23, 2023
1 parent 06aa696 commit d7f3986
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion torch/fx/passes/annotate_getitem_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ def annotate_getitem_nodes(graph: torch.fx.Graph) -> None:
# container types
if hasattr(sequence_node.type, "_name"):
parameterized_types = sequence_node.type.__args__
if sequence_node.type._name == "Tuple":
if sequence_node.type._name == "Tensor":
continue
elif sequence_node.type._name == "Tuple":
if len(parameterized_types) == 2 and isinstance(
parameterized_types[1], type(...)
):
Expand Down

0 comments on commit d7f3986

Please sign in to comment.