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
Check inputs have same dtype in addmm_impl_cpu_ even if input has zero numel #100274
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/100274
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit ad898d7: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
ghstack-source-id: 2c869e722d1f975bc80ddaa862f8fdc64ca60690 Pull Request resolved: #100274
…put has zero numel" Fixes #99226 When an inputs has zero numel, addmm_impl_cpu_'s check that the inputs have the same dtype are bypassed. This PR adds a check before the early return. [ghstack-poisoned]
ghstack-source-id: 6ba072d6a24cebc866c60030669a07af4a8752eb Pull Request resolved: #100274
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 don't know what the expectation for our type promotion is here. In particular, are there (non zero size) cases where this used to work as we were ok with type promotion but this PR now raises an error?
cc @ngimel
Nah that's fine, even if there were (e.g. alpha=0) we could error out. |
@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 |
… build failures Summary: This diff is reverting D45446149 D45446149: Check inputs have same dtype in addmm_impl_cpu_ even if input has zero numel (pytorch#100274) by soulitzer has been identified to be causing the following test or build failures: Tests affected: - [caffe2/torch/fb/model_transform/splitting/tests:utils_test - test_maybe_fix_dtype_errors (caffe2.torch.fb.model_transform.splitting.tests.utils_test.UtilsTest)](https://www.internalfb.com/intern/test/844425018399076/) Here's the Multisect link: https://www.internalfb.com/multisect/1972447 Here are the tasks that are relevant to this breakage: We're generating a revert to back out the changes in this diff, please note the backout may land if someone accepts it. If you believe this diff has been generated in error you may Commandeer and Abandon it. Test Plan: NA Reviewed By: soulitzer Differential Revision: D45471651 fbshipit-source-id: 8440285bfe4a4fcb808da74663ff818478b9b8e0
Stack from ghstack (oldest at bottom):
Fixes #99226
When an inputs has zero numel, addmm_impl_cpu_'s check that the inputs have the same dtype are bypassed. This PR adds a check before the early return.