-
Notifications
You must be signed in to change notification settings - Fork 607
Specialize BroadcastIndexesRange for the case where there is only 1 contiguous input #12023
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
base: main
Are you sure you want to change the base?
Conversation
Stack from ghstack (oldest at bottom): |
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/12023
Note: Links to docs will display an error until the docs builds have been completed. ❌ 4 New Failures, 7 Unrelated FailuresAs of commit abef683 with merge base 3e19e67 ( NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
…ontiguous input In this case, broadcasting is not possible if I understand correctly. NOTE TO REVIEWERS: I deleted a failing test because I think it's testing not-actually-existent-in-PyTorch functionality. Please let me know if I've made a mistake. I tried to exercise the behavior that this test implied existed like so: ``` >>> t = torch.tensor([1, 2, 3]) >>> t2 = torch.tensor(4) >>> torch.abs(t2, out=t) <stdin>:1: UserWarning: An output with one or more elements was resized since it had shape [3], which does not match the required output shape []. This behavior is deprecated, and in a future PyTorch release outputs will not be resized unless they have zero elements. You can explicitly reuse an out tensor t by resizing it, inplace, to zero elements with t.resize_(0). (Triggered internally at /Users/runner/work/pytorch/pytorch/pytorch/aten/src/ATen/native/Resize.cpp:38.) tensor(4) ``` I think that if the test was correct, the result would have been torch.tensor([1, 2, 3]) with no message. Also, none of our operator tests seem to be failing. Have I missed anything? ghstack-source-id: ad2d09d ghstack-comment-id: 3010027375 Pull-Request-resolved: #12023
[ghstack-poisoned]
[ghstack-poisoned]
…ontiguous input In this case, broadcasting is not possible if I understand correctly. NOTE TO REVIEWERS: I deleted a failing test because I think it's testing not-actually-existent-in-PyTorch functionality. Please let me know if I've made a mistake. I tried to exercise the behavior that this test implied existed like so: ``` >>> t = torch.tensor([1, 2, 3]) >>> t2 = torch.tensor(4) >>> torch.abs(t2, out=t) <stdin>:1: UserWarning: An output with one or more elements was resized since it had shape [3], which does not match the required output shape []. This behavior is deprecated, and in a future PyTorch release outputs will not be resized unless they have zero elements. You can explicitly reuse an out tensor t by resizing it, inplace, to zero elements with t.resize_(0). (Triggered internally at /Users/runner/work/pytorch/pytorch/pytorch/aten/src/ATen/native/Resize.cpp:38.) tensor(4) ``` I think that if the test was correct, the result would have been torch.tensor([1, 2, 3]) with no message. Also, none of our operator tests seem to be failing. Have I missed anything? ghstack-source-id: 945dd3f ghstack-comment-id: 3010027375 Pull-Request-resolved: #12023
This is a size win. Size script results below, cases with no change edited out for brevity. test/build_size_test.shbefore:
after:
test/build_optimized_size_test.shbefore:
after:
|
a3f0bf7
to
665c8f0
Compare
In this case, broadcasting is not possible if I understand correctly.
NOTE TO REVIEWERS: I deleted a failing test because I think it's testing not-actually-existent-in-PyTorch functionality. Please let me know if I've made a mistake. I tried to exercise the behavior that this test implied existed like so:
I think that if the test was correct, the result would have been torch.tensor([1, 2, 3]) with no message. Also, none of our operator tests seem to be failing. Have I missed anything?