10000 fix internal error with reorder submodules (#146181) · pytorch/pytorch@cde5ddf · GitHub
[go: up one dir, main page]

Skip to content

Commit cde5ddf

Browse files
avikchaudhuripytorchmergebot
authored andcommitted
fix internal error with reorder submodules (#146181)
Test Plan: hard to isolate as small repro Differential Revision: D68963033 Pull Request resolved: #146181 Approved by: https://github.com/angelayi
1 parent 35f113e commit cde5ddf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torch/export/unflatten.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1389,7 +1389,7 @@ def _reorder_submodules(
13891389
if child is None:
13901390
continue
13911391
fqn = prefix + name
1392-
_reorder_submodules(child, fqn_order, prefix=fqn + ".")
1392+
_reorder_submodules(child, fqn_order, prefix=fqn.split("@")[0] + ".")
13931393
delattr(parent, name)
13941394
children.append((fqn_order[fqn], name, child))
13951395
children.sort(key=operator.itemgetter(0))

0 commit comments

Comments
 (0)
0