Skip to content

Conversation

@angelayi
Copy link
Contributor

@angelayi angelayi commented Oct 2, 2023

Summary:
https://docs.google.com/document/d/1QJJEGnj2nHGPODlw38BEG3KLLCOTfdOVjPrNQbz_LM8/edit#bookmark=id.lp80wfshq130
Changes:

  • torch.export will return a functional ATen graph w/o decompositions
  • exported_program.run_decompositions(decomposition_table) will optionally take a decomposition table, and run decompositions on the exported program, returning a new exported program. By default we will run the Core ATen decomposition table.

Calling convention for Executorch stays the same:

pre_autograd_graph = capture_pre_autograd_graph(f, args, ...)
aten_graph_no_decomps = torch.export.export(pre_autograd_graph, args, ...)
# Within to_edge we decompose to core aten and then convert to edge
edge_graph = exir.to_edge(aten_graph_no_decomps)

Differential Revision: D49742989

@netlify
Copy link

netlify bot commented Oct 2, 2023

Deploy Preview for resplendent-gnome-14e531 ready!

Name Link
🔨 Latest commit 19acbca
🔍 Latest deploy log https://app.netlify.com/sites/resplendent-gnome-14e531/deploys/6525dda3ac651800084bf6cd
😎 Deploy Preview https://deploy-preview-566--resplendent-gnome-14e531.netlify.app/_modules/executorch/exir/program/_program
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 2, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49742989

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49742989

Summary:
X-link: pytorch/pytorch#110410


https://docs.google.com/document/d/1QJJEGnj2nHGPODlw38BEG3KLLCOTfdOVjPrNQbz_LM8/edit#bookmark=id.lp80wfshq130
Changes:
* `torch.export` will return a functional ATen graph but not lowered to core aten decompositions (CompositeImplicitAutograd decomps still run)
* `exported_program.run_decompositions(decomposition_table)` will optionally take a decomposition table, and run decompositions on the exported program, returning a new exported program. By default we will run the Core ATen decomposition table.

Calling convention for Executorch stays the same:
```
pre_autograd_graph = capture_pre_autograd_graph(f, args, ...)
aten_graph_no_decomps = torch.export.export(pre_autograd_graph, args, ...)
# Within to_edge we decompose to core aten and then convert to edge
edge_graph = exir.to_edge(aten_graph_no_decomps)
```

Reviewed By: larryliu0820, guangy10

Differential Revision: D49742989
angelayi added a commit to angelayi/pytorch that referenced this pull request Oct 10, 2023
Summary:

X-link: pytorch/executorch#566

https://docs.google.com/document/d/1QJJEGnj2nHGPODlw38BEG3KLLCOTfdOVjPrNQbz_LM8/edit#bookmark=id.lp80wfshq130
Changes:
* `torch.export` will return a functional ATen graph but not lowered to core aten decompositions (CompositeImplicitAutograd decomps still run)
* `exported_program.run_decompositions(decomposition_table)` will optionally take a decomposition table, and run decompositions on the exported program, returning a new exported program. By default we will run the Core ATen decomposition table.

Calling convention for Executorch stays the same:
```
pre_autograd_graph = capture_pre_autograd_graph(f, args, ...)
aten_graph_no_decomps = torch.export.export(pre_autograd_graph, args, ...)
# Within to_edge we decompose to core aten and then convert to edge
edge_graph = exir.to_edge(aten_graph_no_decomps)
```

Test Plan: CI

Reviewed By: larryliu0820, guangy10

Differential Revision: D49742989
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49742989

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in a4a86df.

@facebook-github-bot
Copy link
Contributor

This pull request has been reverted by 0f2bc69.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged Reverted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants