Skip to content

Add missing types to inductor IR assert#96221

Closed
wconstab wants to merge 3 commits intogh/wconstab/124/basefrom
gh/wconstab/124/head
Closed

Add missing types to inductor IR assert#96221
wconstab wants to merge 3 commits intogh/wconstab/124/basefrom
gh/wconstab/124/head

Conversation

@wconstab
Copy link
Contributor

@wconstab wconstab commented Mar 7, 2023

Stack from ghstack (oldest at bottom):

Unclear if there is a more efficient way to define the allowed types for IR (or if we even need this, perhaps we just ditch the assert?) But Inductor experts can deteremine if these added ops are appropriate and if so they fix the reported issue.

Fixes #96204

cc @soumith @voznesenskym @penguinwu @anijain2305 @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @peterbell10 @desertfire

@pytorch-bot
Copy link

pytorch-bot bot commented Mar 7, 2023

🔗 Helpful Links

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

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

⏳ No Failures, 1 Pending

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

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

wconstab added a commit that referenced this pull request Mar 7, 2023
ghstack-source-id: c1e490e
Pull Request resolved: #96221
@wconstab wconstab requested review from ezyang and ngimel March 7, 2023 21:33
@wconstab wconstab added the topic: not user facing topic category label Mar 7, 2023
@ezyang
Copy link
Contributor

ezyang commented Mar 7, 2023

I mean, hopefully it is obvious what IR types are allowed? 🤔 It's not obvious to me though...

@ezyang
Copy link
Contributor

ezyang commented Mar 7, 2023

I can approve this to unblock but I really have no idea how to evaluate the correctness of this PR.

@wconstab
Copy link
Contributor Author

wconstab commented Mar 7, 2023

well, i added the assert mainly to catch the case where you forgot to wrap your lowering in a TensorBox, but i figured it'd be useful in general to have some invariants about the IR.

in practice, it seems like there is still quite a lot of evolution of what the IR is, and most of it is related to dynamic shapes / sympy work.

it would not be so bad to just widen the assert, and it would also be ok to remove the assert if its more trouble than its worth.

Unclear if there is a more efficient way to define the allowed types for IR (or if we even need this, perhaps we just ditch the assert?)  But Inductor experts can deteremine if these added ops are appropriate and if so they fix the reported issue.

Fixes #96204


cc soumith voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire

[ghstack-poisoned]
Copy link
Contributor

@ezyang ezyang left a comment

Choose a reason for hiding this comment

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

Approving to unblock

@ezyang
Copy link
Contributor

ezyang commented Mar 8, 2023

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Mar 8, 2023
@ezyang
Copy link
Contributor

ezyang commented Mar 8, 2023

Tests for this would be very helpful, since we're not sure if this is the final state.

@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

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 1 mandatory check(s) failed. The first few are:

Dig deeper by viewing the failures on hud

Details for Dev Infra team Raised by workflow job

Failing merge rule: Core Maintainers

@wconstab
Copy link
Contributor Author

wconstab commented Mar 8, 2023

Tests for this would be very helpful, since we're not sure if this is the final state.

I don't really know how one would go about testing this other than by running all of our existing inductor tests- i think the gap is that we don't test enough of inductor's op coverage period. (e.g. there are ops we're lowering to inductor in models that we're not covering with unit tests)

Unclear if there is a more efficient way to define the allowed types for IR (or if we even need this, perhaps we just ditch the assert?)  But Inductor experts can deteremine if these added ops are appropriate and if so they fix the reported issue.

Fixes #96204


cc soumith voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire

[ghstack-poisoned]
wconstab added a commit that referenced this pull request Mar 8, 2023
ghstack-source-id: bbd6f2a
Pull Request resolved: #96221
@wconstab
Copy link
Contributor Author

wconstab commented Mar 8, 2023

@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

cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Mar 12, 2023
Unclear if there is a more efficient way to define the allowed types for IR (or if we even need this, perhaps we just ditch the assert?)  But Inductor experts can deteremine if these added ops are appropriate and if so they fix the reported issue.

Fixes #96204

Pull Request resolved: pytorch/pytorch#96221
Approved by: https://github.com/ezyang
cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Mar 12, 2023
Unclear if there is a more efficient way to define the allowed types for IR (or if we even need this, perhaps we just ditch the assert?)  But Inductor experts can deteremine if these added ops are appropriate and if so they fix the reported issue.

Fixes #96204

Pull Request resolved: pytorch/pytorch#96221
Approved by: https://github.com/ezyang
ydwu4 added a commit to ydwu4/pytorch that referenced this pull request Mar 13, 2023
Unclear if there is a more efficient way to define the allowed types for IR (or if we even need this, perhaps we just ditch the assert?)  But Inductor experts can deteremine if these added ops are appropriate and if so they fix the reported issue.

Fixes pytorch#96204

Pull Request resolved: pytorch#96221
Approved by: https://github.com/ezyang
@facebook-github-bot facebook-github-bot deleted the gh/wconstab/124/head branch June 8, 2023 19:13
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