-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Propagate NJT lengths through op calls #138098
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/138098
Note: Links to docs will display an error until the docs builds have been completed. ❌ 20 New FailuresAs of commit a2ccb34 with merge base a2bc2e3 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
NJTs allow for specifying both `offsets` and `lengths` non-redundantly to specify ragged structure that is "non-contiguous with holes". i.e. the offsets point to the beginning of each sequence and the corresponding length may not fully span the region to the next offset. However, `lengths` is not appropriately propagated today through op calls. For example, calling a unary op on an NJT that is non-contiguous with holes will silently drop the `lengths` metadata, which is incorrect. This PR fixes this. As an analogue to dense tensors, running a unary op on a non-contiguous dense tensor outputs a dense tensor with the same strides. [ghstack-poisoned]
NJTs allow for specifying both `offsets` and `lengths` non-redundantly to specify ragged structure that is "non-contiguous with holes". i.e. the offsets point to the beginning of each sequence and the corresponding length may not fully span the region to the next offset. However, `lengths` is not appropriately propagated today through op calls. For example, calling a unary op on an NJT that is non-contiguous with holes will silently drop the `lengths` metadata, which is incorrect. This PR fixes this. As an analogue to dense tensors, running a unary op on a non-contiguous dense tensor outputs a dense tensor with the same strides. [ghstack-poisoned]
NJTs allow for specifying both `offsets` and `lengths` non-redundantly to specify ragged structure that is "non-contiguous with holes". i.e. the offsets point to the beginning of each sequence and the corresponding length may not fully span the region to the next offset. However, `lengths` is not appropriately propagated today through op calls. For example, calling a unary op on an NJT that is non-contiguous with holes will silently drop the `lengths` metadata, which is incorrect. This PR fixes this. As an analogue to dense tensors, running a unary op on a non-contiguous dense tensor outputs a dense tensor with the same strides. [ghstack-poisoned]
NJTs allow for specifying both `offsets` and `lengths` non-redundantly to specify ragged structure that is "non-contiguous with holes". i.e. the offsets point to the beginning of each sequence and the corresponding length may not fully span the region to the next offset. However, `lengths` is not appropriately propagated today through op calls. For example, calling a unary op on an NJT that is non-contiguous with holes will silently drop the `lengths` metadata, which is incorrect. This PR fixes this. As an analogue to dense tensors, running a unary op on a non-contiguous dense tensor outputs a dense tensor with the same strides. [ghstack-poisoned]
NJTs allow for specifying both `offsets` and `lengths` non-redundantly to describe ragged structure that is "non-contiguous with holes". i.e. the offsets point to the beginning of each sequence and the corresponding length may not fully span the region to the next offset. However, `lengths` is not appropriately propagated today through op calls. For example, calling a unary op on an NJT that is non-contiguous with holes will silently drop the `lengths` metadata, which is incorrect. This PR fixes this. As an analogue to dense tensors, running a unary op on a non-contiguous dense tensor outputs a dense tensor with the same strides. [ghstack-poisoned]
NJTs allow for specifying both `offsets` and `lengths` non-redundantly to describe ragged structure that is "non-contiguous with holes". i.e. the offsets point to the beginning of each sequence and the corresponding length may not fully span the region to the next offset. However, `lengths` is not appropriately propagated today through op calls. For example, calling a unary op on an NJT that is non-contiguous with holes will silently drop the `lengths` metadata, which is incorrect. This PR fixes this. As an analogue to dense tensors, running a unary op on a non-contiguous dense tensor outputs a dense tensor with the same strides. [ghstack-poisoned]
NJTs allow for specifying both `offsets` and `lengths` non-redundantly to describe ragged structure that is "non-contiguous with holes". i.e. the offsets point to the beginning of each sequence and the corresponding length may not fully span the region to the next offset. However, `lengths` is not appropriately propagated today through op calls. For example, calling a unary op on an NJT that is non-contiguous with holes will silently drop the `lengths` metadata, which is incorrect. This PR fixes this. As an analogue to dense tensors, running a unary op on a non-contiguous dense tensor outputs a dense tensor with the same strides. [ghstack-poisoned]
NJTs allow for specifying both `offsets` and `lengths` non-redundantly to describe ragged structure that is "non-contiguous with holes". i.e. the offsets point to the beginning of each sequence and the corresponding length may not fully span the region to the next offset. However, `lengths` is not appropriately propagated today through op calls. For example, calling a unary op on an NJT that is non-contiguous with holes will silently drop the `lengths` metadata, which is incorrect. This PR fixes this. As an analogue to dense tensors, running a unary op on a non-contiguous dense tensor outputs a dense tensor with the same strides. [ghstack-poisoned]
NJTs allow for specifying both `offsets` and `lengths` non-redundantly to describe ragged structure that is "non-contiguous with holes". i.e. the offsets point to the beginning of each sequence and the corresponding length may not fully span the region to the next offset. However, `lengths` is not appropriately propagated today through op calls. For example, calling a unary op on an NJT that is non-contiguous with holes will silently drop the `lengths` metadata, which is incorrect. This PR fixes this. As an analogue to dense tensors, running a unary op on a non-contiguous dense tensor outputs a dense tensor with the same strides. [ghstack-poisoned]
NJTs allow for specifying both `offsets` and `lengths` non-redundantly to describe ragged structure that is "non-contiguous with holes". i.e. the offsets point to the beginning of each sequence and the corresponding length may not fully span the region to the next offset. However, `lengths` is not appropriately propagated today through op calls. For example, calling a unary op on an NJT that is non-contiguous with holes will silently drop the `lengths` metadata, which is incorrect. This PR fixes this. As an analogue to dense tensors, running a unary op on a non-contiguous dense tensor outputs a dense tensor with the same strides. [ghstack-poisoned]
NJTs allow for specifying both `offsets` and `lengths` non-redundantly to describe ragged structure that is "non-contiguous with holes". i.e. the offsets point to the beginning of each sequence and the corresponding length may not fully span the region to the next offset. However, `lengths` is not appropriately propagated today through op calls. For example, calling a unary op on an NJT that is non-contiguous with holes will silently drop the `lengths` metadata, which is incorrect. This PR fixes this. As an analogue to dense tensors, running a unary op on a non-contiguous dense tensor outputs a dense tensor with the same strides. [ghstack-poisoned]
This was referenced Nov 5, 2024
Closed
NJTs allow for specifying both `offsets` and `lengths` non-redundantly to describe ragged structure that is "non-contiguous with holes". i.e. the offsets point to the beginning of each sequence and the corresponding length may not fully span the region to the next offset. However, `lengths` is not appropriately propagated today through op calls. For example, calling a unary op on an NJT that is non-contiguous with holes will silently drop the `lengths` metadata, which is incorrect. This PR fixes this. As an analogue to dense tensors, running a unary op on a non-contiguous dense tensor outputs a dense tensor with the same strides. [ghstack-poisoned]
NJTs allow for specifying both `offsets` and `lengths` non-redundantly to describe ragged structure that is "non-contiguous with holes". i.e. the offsets point to the beginning of each sequence and the corresponding length may not fully span the region to the next offset. However, `lengths` is not appropriately propagated today through op calls. For example, calling a unary op on an NJT that is non-contiguous with holes will silently drop the `lengths` metadata, which is incorrect. This PR fixes this. As an analogue to dense tensors, running a unary op on a non-contiguous dense tensor outputs a dense tensor with the same strides. [ghstack-poisoned]
|
Closing in favor of #140160. |
jbschlosser
added a commit
that referenced
this pull request
Nov 8, 2024
This PR contains several fixes related to non-contiguous NJTs: 1. Propagates `lengths` through op calls appropriately (see desc of #138098) * SDPA now calls `nested_view_from_values_offsets_lengths()` instead of `nested_view_from_values_offsets()` 2. Allows non-contig NJTs in unsqueeze / transpose / select 3. Expands padded dense -> NJT conversion to support non-contig NJTs 4. (unrelated sorry) Updates `split` / `split_with_sizes` to allow for optional `dim`, matching the ATen signature [ghstack-poisoned]
jbschlosser
added a commit
that referenced
this pull request
Nov 8, 2024
This PR contains several fixes related to non-contiguous NJTs: 1. Propagates `lengths` through op calls appropriately (see desc of #138098) * SDPA now calls `nested_view_from_values_offsets_lengths()` instead of `nested_view_from_values_offsets()` 2. Allows non-contig NJTs in unsqueeze / transpose / select 3. Expands padded dense -> NJT conversion to support non-contig NJTs 4. (unrelated sorry) Updates `split` / `split_with_sizes` to allow for optional `dim`, matching the ATen signature [ghstack-poisoned]
pytorchmergebot
pushed a commit
that referenced
this pull request
Nov 9, 2024
This PR contains several fixes related to non-contiguous NJTs: 1. Propagates `lengths` through op calls appropriately (see desc of #138098) * SDPA now calls `nested_view_from_values_offsets_lengths()` instead of `nested_view_from_values_offsets()` 2. Allows non-contig NJTs in unsqueeze / transpose / select 3. Expands padded dense -> NJT conversion to support non-contig NJTs 4. (unrelated sorry) Updates `split` / `split_with_sizes` to allow for optional `dim`, matching the ATen signature Pull Request resolved: #140160 Approved by: https://github.com/cpuhrsch
pobin6
pushed a commit
to pobin6/pytorch
that referenced
this pull request
Dec 5, 2024
This PR contains several fixes related to non-contiguous NJTs: 1. Propagates `lengths` through op calls appropriately (see desc of pytorch#138098) * SDPA now calls `nested_view_from_values_offsets_lengths()` instead of `nested_view_from_values_offsets()` 2. Allows non-contig NJTs in unsqueeze / transpose / select 3. Expands padded dense -> NJT conversion to support non-contig NJTs 4. (unrelated sorry) Updates `split` / `split_with_sizes` to allow for optional `dim`, matching the ATen signature Pull Request resolved: pytorch#140160 Approved by: https://github.com/cpuhrsch
fmo-mt
pushed a commit
to fmo-mt/pytorch
that referenced
this pull request
Dec 11, 2024
This PR contains several fixes related to non-contiguous NJTs: 1. Propagates `lengths` through op calls appropriately (see desc of pytorch#138098) * SDPA now calls `nested_view_from_values_offsets_lengths()` instead of `nested_view_from_values_offsets()` 2. Allows non-contig NJTs in unsqueeze / transpose / select 3. Expands padded dense -> NJT conversion to support non-contig NJTs 4. (unrelated sorry) Updates `split` / `split_with_sizes` to allow for optional `dim`, matching the ATen signature Pull Request resolved: pytorch#140160 Approved by: https://github.com/cpuhrsch
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
NJTs allow for specifying both
offsetsandlengthsnon-redundantly to describe ragged structure that is "non-contiguous with holes". i.e. the offsets point to the beginning of each sequence and the corresponding length may not fully span the region to the next offset.However,
lengthsis not appropriately propagated today through op calls. For example, calling a unary op on an NJT that is non-contiguous with holes will silently drop thelengthsmetadata, which is incorrect. This PR fixes this.As an analogue to dense tensors, running a unary op on a non-contiguous dense tensor outputs a dense tensor with the same strides.