Skip to content

Commit 74acf92

Browse files
tugsbayasgalanpytorchmergebot
authored andcommitted
Forward fix inductor failure (pytorch#165363) (pytorch#165443)
Summary: Title Test Plan: CI Differential Revision: D84615478 Pull Request resolved: pytorch#165443 Approved by: https://github.com/angelayi
1 parent cbf212e commit 74acf92

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

torch/export/_trace.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -698,9 +698,11 @@ def _restore_state_dict(
698698
param_buffer_table_reverse = {v: k for k, v in param_buffer_table.items()}
699699

700700
# Replace state dict attr names with the fqn
701-
for name, _ in chain(
702-
original_module.named_parameters(remove_duplicate=False),
703-
original_module.named_buffers(remove_duplicate=False),
701+
for name, _ in list(
702+
chain(
703+
original_module.named_parameters(remove_duplicate=False),
704+
original_module.named_buffers(remove_duplicate=False),
705+
)
704706
):
705707
if name in param_buffer_table_reverse:
706708
dynamo_name = param_buffer_table_reverse[name]

0 commit comments

Comments
 (0)