Skip to content

Commit

Permalink
Revert "[export] Copy gm before calling PassManager" for test or buil…
Browse files Browse the repository at this point in the history
…d failures (pytorch#108441)

Test Plan: CI

Differential Revision: D48916322

Pull Request resolved: pytorch#108441
Approved by: https://github.com/cccclai
  • Loading branch information
digantdesai authored and pytorchmergebot committed Sep 5, 2023
1 parent 0b44fdf commit a9a6423
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torch/export/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ def _transform(self, *passes: PassType) -> "ExportedProgram":
)

pm = PassManager(list(passes))
res = pm(copy.deepcopy(self.graph_module))
res = pm(self.graph_module)
transformed_gm = res.graph_module if res is not None else self.graph_module
assert transformed_gm is not None

Expand Down

0 comments on commit a9a6423

Please sign in to comment.