Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Export] Allow ExportedProgram to take empty decomp table #126142

Closed
wants to merge 1 commit into from

Conversation

StellarrZ
Copy link
Contributor

As title.
Still, ep.run_decompositions() will use core_aten_decompositions() by default. Cases like ep.run_decompositions(get_decompositions([])) will use empty table, and go with aot_autograd_decompositions only.

Motivation
We didn't have a clean way to pass in an empty decomp table. Since we've made pre_dispatch export as default and ep.run_decompositions remains with aot_export_module(..., pre_dispatch=False), allowing empty table would help make blank control easier.

Testing
CI
Also looked through all the references in fbcode. The only concern I have is whether we should update this example or not.

Copy link

pytorch-bot bot commented May 14, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/126142

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 90e6565 with merge base 04877dc (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@StellarrZ StellarrZ marked this pull request as ready for review May 14, 2024 15:10
Copy link
Contributor

@angelayi angelayi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Please "Import to fbsource" to make sure the changes don't break internal tests!

@facebook-github-bot
Copy link
Contributor

@StellarrZ has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@StellarrZ
Copy link
Contributor Author

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label May 15, 2024
@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: This PR needs a release notes: label
If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Details for Dev Infra team Raised by workflow job

@StellarrZ
Copy link
Contributor Author

@pytorchbot label "topic: not user facing"

@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label May 15, 2024
@StellarrZ
Copy link
Contributor Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@StellarrZ StellarrZ deleted the ep branch May 18, 2024 17:52
ZelboK pushed a commit to ZelboK/pytorch that referenced this pull request May 19, 2024
…6142)

**As title.**
Still, `ep.run_decompositions()` will use `core_aten_decompositions()` by default. Cases like `ep.run_decompositions(get_decompositions([]))` will use empty table, and go with [`aot_autograd_decompositions`](https://github.com/pytorch/pytorch/blob/04877dc430a6e93765471b28f422bf3e81d02c9e/torch/_functorch/aot_autograd.py#L456-459) only.

**Motivation**
We didn't have a clean way to pass in an empty decomp table. Since we've made `pre_dispatch` export as default and `ep.run_decompositions` remains with `aot_export_module(..., pre_dispatch=False)`, allowing empty table would help make blank control easier.

**Testing**
CI
Also looked through all the references in fbcode. The only concern I have is whether we should update [this example](https://github.com/pytorch/pytorch/blob/04877dc430a6e93765471b28f422bf3e81d02c9e/torch/onnx/_internal/exporter.py#L817) or not.
Pull Request resolved: pytorch#126142
Approved by: https://github.com/angelayi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request Merged topic: not user facing topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants