-
Notifications
You must be signed in to change notification settings - Fork 25.7k
[Nested Tensor]Clean up offsets #84145
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
Conversation
🔗 Helpful links
✅ No Failures (0 Pending)As of commit b396bb2 (more details on the Dr. CI page): Expand to see more💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
b2dea28 to
65caead
Compare
65caead to
c46b7dd
Compare
c46b7dd to
b396bb2
Compare
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.
Sure.
No kernel needs changing?
Yeah this is a little surprising but since all offset use cases so far have been only using the start position this essentially had no change. No kernel was using ranged based looping on the offsets. This will also potentially come in handy for triton kernels. |
|
@pytorchbot merge -l |
|
@pytorchbot successfully started a merge job. Check the current status here and land check progress here. |
# Summary - Document contiguous offset construction - Expand offsets by 1 so that storage offsets for `ntensor[i] = offsets[i+1] - offsets[i]` Another simple one. While looking into this issue #84082 I noticed that the kernels essentially rebuild the offsets but with the added last element. I added this and also cleaned up the code a little Pull Request resolved: #84145 Approved by: https://github.com/albanD
Summary: # Summary - Document contiguous offset construction - Expand offsets by 1 so that storage offsets for `ntensor[i] = offsets[i+1] - offsets[i]` Another simple one. While looking into this issue #84082 I noticed that the kernels essentially rebuild the offsets but with the added last element. I added this and also cleaned up the code a little Pull Request resolved: #84145 Approved by: https://github.com/albanD Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/174c3c6859529f30a7dfa4920a9a52e1373b02a9 Reviewed By: mehtanirav Differential Revision: D39171414 Pulled By: drisspg fbshipit-source-id: a78eab412bcae2f3b7fce49176e822a14190b9cd
Summary
ntensor[i] = offsets[i+1] - offsets[i]Another simple one. While looking into this issue #84082 I noticed that the kernels essentially rebuild the offsets but with the added last element. I added this and also cleaned up the code a little