fix stride compare failed when size value equal to one in ForeachUtils.h#134546
fix stride compare failed when size value equal to one in ForeachUtils.h#134546Shan19900305 wants to merge 1 commit intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/134546
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (4 Unrelated Failures)As of commit c2e38f4 with merge base 7755176 ( FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
aten/src/ATen/native/ForeachUtils.h
Outdated
There was a problem hiding this comment.
shouldn't this be false?
also isn't left_stride.size() always equal to size_size?
There was a problem hiding this comment.
yep, tensor sizes compared before, and here no need to check tensor sizes length.
7e52980 to
b50094c
Compare
test/test_foreach.py
Outdated
There was a problem hiding this comment.
The strides for this would be (9, 9, 3, 1) ? => could you comment this for clarity above this line?
test/test_foreach.py
Outdated
There was a problem hiding this comment.
Hmmm...this test cases passes for me locally without the change. I haven't figured out why but either this test case is not testing what we want or it is already checked.
There was a problem hiding this comment.
ok, without ignore dims of one, add op will be called for each input. I will using ForeachFuncWrapper to check this.
2f0cc88 to
6b0c9c3
Compare
|
@janeyx99 Hi, please help review this commit. |
|
@pytorchbot merge -r |
|
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
Update aten/src/ATen/native/ForeachUtils.h Co-authored-by: Jane (Yuan) Xu <31798555+janeyx99@users.noreply.github.com> Update test/test_foreach.py Co-authored-by: Jane (Yuan) Xu <31798555+janeyx99@users.noreply.github.com> Update test/test_foreach.py Co-authored-by: Jane (Yuan) Xu <31798555+janeyx99@users.noreply.github.com> Update test/test_foreach.py Co-authored-by: Jane (Yuan) Xu <31798555+janeyx99@users.noreply.github.com> Update test/test_foreach.py
|
Successfully rebased |
6b0c9c3 to
c2e38f4
Compare
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 |
…s.h (pytorch#134546) When size value equal to one, tensor strides value need be skipped to compare. @ezyang Pull Request resolved: pytorch#134546 Approved by: https://github.com/janeyx99
…s.h (pytorch#134546) When size value equal to one, tensor strides value need be skipped to compare. @ezyang Pull Request resolved: pytorch#134546 Approved by: https://github.com/janeyx99
…s.h (#136426) fix stride compare failed when size value equal to one in ForeachUtils.h (#134546) When size value equal to one, tensor strides value need be skipped to compare. @ezyang Pull Request resolved: #134546 Approved by: https://github.com/janeyx99
When size value equal to one, tensor strides value need be skipped to compare.
@ezyang