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

Don't run fallback if symbolic sizes in fake tensor #97148

Closed
wants to merge 1 commit into from

Conversation

ezyang
Copy link
Contributor

@ezyang ezyang commented Mar 20, 2023

Stack from ghstack (oldest at bottom):

Signed-off-by: Edward Z. Yang ezyang@meta.com

Signed-off-by: Edward Z. Yang <ezyang@meta.com>

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Mar 20, 2023

🔗 Helpful Links

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

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

✅ No Failures

As of commit 026d4c4:
💚 Looks good so far! There are no failures yet. 💚

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

ezyang added a commit that referenced this pull request Mar 20, 2023
Signed-off-by: Edward Z. Yang <ezyangmeta.com>

ghstack-source-id: 06d7c4f51b4c1d536ee7621089f2feb7368a3e96
Pull Request resolved: #97148
@ezyang ezyang requested a review from eellison March 20, 2023 18:17
@ezyang
Copy link
Contributor Author

ezyang commented Mar 20, 2023

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Mar 20, 2023
@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: This PR needs a 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.

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

Copy link
Contributor

@bdhirsh bdhirsh left a comment

Choose a reason for hiding this comment

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

side note: I wonder if we should avoid the entire try + except and fallback if we see an operator that's not part ATen (aka all custom ops)

There was at least one example github issue of torch.compile failing with an awful error, because we tried to plumb fake tensors and the custom op wasn't written in a way to handle them.

I would probably take the hit of having some custom ops stop working automatically (with a loud error saying they need a meta function impl, and some docs on how to add one), over some custom ops silently giving bad error messages / segfaults.

@ezyang ezyang added release notes: composability release notes category topic: bug fixes topic category labels Mar 21, 2023
@ezyang
Copy link
Contributor Author

ezyang commented Mar 21, 2023

@pytorchbot merge

@ezyang
Copy link
Contributor Author

ezyang commented Mar 21, 2023

side note: I wonder if we should avoid the entire try + except and fallback if we see an operator that's not part ATen (aka all custom ops)

Yes, our coverage is good enough that I will support removing the fallback entirely. @eellison WDYT

@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

@eellison
Copy link
Contributor

I'm not in favor of that because of all the custom operators that don't have meta funcs.
Pros: dont IMA on operators that would IMA on all zeros
Cons: lose large amount of coverage on user operators

IMO the IMA zeros case is much, much less frequent.

@ezyang
Copy link
Contributor Author

ezyang commented Mar 21, 2023

But IMA zeros is much, much worse, whereas missing coverage is kind of meh and kind of easy to fix.

cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Mar 23, 2023
cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Mar 27, 2023
@facebook-github-bot facebook-github-bot deleted the gh/ezyang/1917/head branch June 8, 2023 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/inductor ciflow/trunk Trigger trunk jobs on your pull request Merged release notes: composability release notes category topic: bug fixes topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants