KEMBAR78
[ATen core IR] De-register `full_like` and `empty_like` as core by SS-JIA · Pull Request #110924 · pytorch/pytorch · GitHub
Skip to content

Conversation

@SS-JIA
Copy link
Contributor

@SS-JIA SS-JIA commented Oct 10, 2023

Stack from ghstack (oldest at bottom):

Context

Following up from @peterbell10 comments on #110882.

  • empty_like was erroneously classified as core. It can be decomposed using empty_permuted and in fact is currently decomposed this way in the core decomposition table.
  • full_like can be similarly decomposed to full_permuted once add full permuted #110234 lands. The current decomposition into empty_like and fill doesn't work because fill decomposes to full_like, resulting in a recursive loop.

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 10, 2023

🔗 Helpful Links

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

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

✅ No Failures

As of commit 28c523f with merge base 0341deb (image):
💚 Looks good so far! There are no failures yet. 💚

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

@SS-JIA
Copy link
Contributor Author

SS-JIA commented Oct 10, 2023

Okay, nevermind. I see why full_like cannot be registered as a decomposition this way (it is due to recursion with fill.Scalar decomposition. So this diff will just remove empty_like as a core decomposition, and when #110234 lands we can decompose full_like as well.

## Context

Following up from peterbell10 comments on #110882.

* `empty_like` was erroneously classified as `core`
* Register `refs` implementation of `full_like` as a decomposition, and add it to core. Change it to use `torch.fill` instead of `prims.fill`


[ghstack-poisoned]
SS-JIA added a commit that referenced this pull request Oct 10, 2023
@SS-JIA SS-JIA changed the title [ATen core IR] Add decomposition for full_like [ATen core IR] De-register full_like and empty_like as core Oct 10, 2023
@SS-JIA
Copy link
Contributor Author

SS-JIA commented Oct 10, 2023

@pytorchbot merge -i

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 10, 2023
@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

@SS-JIA
Copy link
Contributor Author

SS-JIA commented Oct 10, 2023

@pytorchbot merge -i

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged while ignoring the following 0 checks:

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

@facebook-github-bot facebook-github-bot deleted the gh/SS-JIA/176/head branch October 13, 2023 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants