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
fix soundness bug with unsupported constraints #102897
Conversation
Differential Revision: [D46415786](https://our.internmc.facebook.com/intern/diff/D46415786/) [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/102897
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 6 PendingAs of commit d8a72c8: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Differential Revision: [D46415786](https://our.internmc.facebook.com/intern/diff/D46415786/) ghstack-source-id: 191106011 Pull Request resolved: #102897
Differential Revision: [D46415786](https://our.internmc.facebook.com/intern/diff/D46415786/) cc voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx ipiszy [ghstack-poisoned]
Pull Request resolved: #102897 ghstack-source-id: 191107045 Differential Revision: [D46415786](https://our.internmc.facebook.com/intern/diff/D46415786/)
Differential Revision: [D46415786](https://our.internmc.facebook.com/intern/diff/D46415786/) cc voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx ipiszy [ghstack-poisoned]
Pull Request resolved: #102897 ghstack-source-id: 191115588 Differential Revision: [D46415786](https://our.internmc.facebook.com/intern/diff/D46415786/)
Differential Revision: [D46415786](https://our.internmc.facebook.com/intern/diff/D46415786/) cc voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx ipiszy [ghstack-poisoned]
Pull Request resolved: #102897 ghstack-source-id: 191117531 Differential Revision: [D46415786](https://our.internmc.facebook.com/intern/diff/D46415786/)
Differential Revision: [D46415786](https://our.internmc.facebook.com/intern/diff/D46415786/) cc voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx ipiszy [ghstack-poisoned]
Pull Request resolved: #102897 ghstack-source-id: 191117957 Differential Revision: [D46415786](https://our.internmc.facebook.com/intern/diff/D46415786/)
Differential Revision: [D46415786](https://our.internmc.facebook.com/intern/diff/D46415786/) cc voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx ipiszy [ghstack-poisoned]
Pull Request resolved: #102897 ghstack-source-id: 191208582 Differential Revision: [D46415786](https://our.internmc.facebook.com/intern/diff/D46415786/)
if s not in self._substitutions | ||
} | ||
|
||
def solve(self, disable_congruences=True): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If and when we support specifying %
constraints, we can enable this flag.
Failing tests are caused by some mismatch in error format in #102666, not sure why these are not picked up by CI. |
We do not raise constraint violations for complex binary conditions, such as conditions involving `%`. Moreover, while these constraints are discovered by our solver, the solver does not inject new constraint violations. This can result in cases where export passes, appropriate assertions are not added, and we get runtime crashes. Now, when the solver discovers constraints that are too complex, we force-specialize the involved dimensions and raise a constraint violation when such dimensions are marked dynamic. This forces the user to remove the dynamic marking, and causes the appropriate specialization assertions to be added. Differential Revision: [D46415786](https://our.internmc.facebook.com/intern/diff/D46415786/) cc voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx ipiszy [ghstack-poisoned]
Pull Request resolved: #102897 ghstack-source-id: 191222433 Differential Revision: [D46415786](https://our.internmc.facebook.com/intern/diff/D46415786/)
test/export/test_export.py
Outdated
), | ||
): | ||
torch._export.export(m, (a,), constraints=constraints) | ||
em = torch._export.export(m, (a,)).add_runtime_assertions() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to rebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recently landed a change that makes this private method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'll wait for https://www.internalfb.com/diff/D46471787 to land internally before rebasing.
We do not raise constraint violations for complex binary conditions, such as conditions involving `%`. Moreover, while these constraints are discovered by our solver, the solver does not inject new constraint violations. This can result in cases where export passes, appropriate assertions are not added, and we get runtime crashes. Now, when the solver discovers constraints that are too complex, we force-specialize the involved dimensions and raise a constraint violation when such dimensions are marked dynamic. This forces the user to remove the dynamic marking, and causes the appropriate specialization assertions to be added. Differential Revision: [D46415786](https://our.internmc.facebook.com/intern/diff/D46415786/) cc voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx ipiszy [ghstack-poisoned]
Pull Request resolved: #102897 ghstack-source-id: 191432844 Differential Revision: [D46415786](https://our.internmc.facebook.com/intern/diff/D46415786/)
We do not raise constraint violations for complex binary conditions, such as conditions involving `%`. Moreover, while these constraints are discovered by our solver, the solver does not inject new constraint violations. This can result in cases where export passes, appropriate assertions are not added, and we get runtime crashes. Now, when the solver discovers constraints that are too complex, we force-specialize the involved dimensions and raise a constraint violation when such dimensions are marked dynamic. This forces the user to remove the dynamic marking, and causes the appropriate specialization assertions to be added. Differential Revision: [D46415786](https://our.internmc.facebook.com/intern/diff/D46415786/) cc voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx ipiszy [ghstack-poisoned]
Pull Request resolved: #102897 ghstack-source-id: 191471891 Differential Revision: [D46415786](https://our.internmc.facebook.com/intern/diff/D46415786/)
We do not raise constraint violations for complex binary conditions, such as conditions involving `%`. Moreover, while these constraints are discovered by our solver, the solver does not inject new constraint violations. This can result in cases where export passes, appropriate assertions are not added, and we get runtime crashes. Now, when the solver discovers constraints that are too complex, we force-specialize the involved dimensions and raise a constraint violation when such dimensions are marked dynamic. This forces the user to remove the dynamic marking, and causes the appropriate specialization assertions to be added. Differential Revision: [D46415786](https://our.internmc.facebook.com/intern/diff/D46415786/) cc voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx ipiszy [ghstack-poisoned]
Pull Request resolved: #102897 ghstack-source-id: 191611523 Differential Revision: [D46415786](https://our.internmc.facebook.com/intern/diff/D46415786/)
We do not raise constraint violations for complex binary conditions, such as conditions involving `%`. Moreover, while these constraints are discovered by our solver, the solver does not inject new constraint violations. This can result in cases where export passes, appropriate assertions are not added, and we get runtime crashes. Now, when the solver discovers constraints that are too complex, we force-specialize the involved dimensions and raise a constraint violation when such dimensions are marked dynamic. This forces the user to remove the dynamic marking, and causes the appropriate specialization assertions to be added. Differential Revision: [D46415786](https://our.internmc.facebook.com/intern/diff/D46415786/) cc voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx ipiszy [ghstack-poisoned]
Pull Request resolved: #102897 ghstack-source-id: 191705573 Differential Revision: [D46415786](https://our.internmc.facebook.com/intern/diff/D46415786/)
@pytorchbot merge -f "spurious CI failure, checked that internal failures are also infra issues" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: Command
Details for Dev Infra teamRaised by workflow job |
We do not raise constraint violations for complex binary conditions, such as conditions involving `%`. Moreover, while these constraints are discovered by our solver, the solver does not inject new constraint violations. This can result in cases where export passes, appropriate assertions are not added, and we get runtime crashes. Now, when the solver discovers constraints that are too complex, we force-specialize the involved dimensions and raise a constraint violation when such dimensions are marked dynamic. This forces the user to remove the dynamic marking, and causes the appropriate specialization assertions to be added. Differential Revision: [D46415786](https://our.internmc.facebook.com/intern/diff/D46415786/) cc voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx ipiszy aakhundov [ghstack-poisoned]
Pull Request resolved: #102897 ghstack-source-id: 191740160 Differential Revision: [D46415786](https://our.internmc.facebook.com/intern/diff/D46415786/)
We do not raise constraint violations for complex binary conditions, such as conditions involving `%`. Moreover, while these constraints are discovered by our solver, the solver does not inject new constraint violations. This can result in cases where export passes, appropriate assertions are not added, and we get runtime crashes. Now, when the solver discovers constraints that are too complex, we force-specialize the involved dimensions and raise a constraint violation when such dimensions are marked dynamic. This forces the user to remove the dynamic marking, and causes the appropriate specialization assertions to be added. Differential Revision: [D46415786](https://our.internmc.facebook.com/intern/diff/D46415786/) cc voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx ipiszy aakhundov [ghstack-poisoned]
Pull Request resolved: #102897 ghstack-source-id: 191740589 Differential Revision: [D46415786](https://our.internmc.facebook.com/intern/diff/D46415786/)
@pytorchbot merge |
Merge startedYour 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 |
Stack from ghstack (oldest at bottom):
We do not raise constraint violations for complex binary conditions, such as conditions involving
%
. Moreover, while these constraints are discovered by our solver, the solver does not inject new constraint violations. This can result in cases where export passes, appropriate assertions are not added, and we get runtime crashes.Now, when the solver discovers constraints that are too complex, we force-specialize the involved dimensions and raise a constraint violation when such dimensions are marked dynamic. This forces the user to remove the dynamic marking, and causes the appropriate specialization assertions to be added.
Differential Revision: D46415786
cc @voznesenskym @penguinwu @anijain2305 @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @ipiszy @aakhundov