Skip to content

Commit

Permalink
Revert "Make torch_geometric models compatible with export (#123403)"…
Browse files Browse the repository at this point in the history
… (#128377)

Summary:
This reverts commit d78991a7381adb3df5e9b63c365db4506643edce.

This PR reverts pytorch/pytorch#123403 to fix the performance regression as discussed in pytorch/pytorch#127513 (comment).

X-link: pytorch/pytorch#128377
Approved by: https://github.com/jgong5, https://github.com/angelayi, https://github.com/desertfire

Reviewed By: clee2000

Differential Revision: D58501783

fbshipit-source-id: 1e55cc2c0b315ed6869195ee6730e72eb6be9da9
  • Loading branch information
chunyuan-w authored and facebook-github-bot committed Jun 13, 2024
1 parent 55c975e commit f29ff89
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions userbenchmark/dynamo/dynamobench/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1184,12 +1184,14 @@ def load(cls, model, example_inputs, device):
else:
_register_dataclass_output_as_pytree(example_outputs)

gm = torch.export._trace._export(
# TODO(angelayi): change this to predispatch
# https://github.com/pytorch/pytorch/issues/127513 needs to be fixed before changing
# to predispatch to avoid performance regressions
gm = torch.export._trace._export_to_torch_ir(
model,
example_args,
example_kwargs,
pre_dispatch=True,
).module()
)
with torch.no_grad():
so_path = torch._inductor.aot_compile(
gm, example_args, example_kwargs
Expand Down

0 comments on commit f29ff89

Please sign in to comment.