-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Fix to() on non-contiguous NJTs #137124
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
Fix to() on non-contiguous NJTs #137124
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/137124
Note: Links to docs will display an error until the docs builds have been completed. ❌ 3 New FailuresAs of commit cb7ea56 with merge base 0ccd39a ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Called out via torchrec integration: `lengths` is not handled properly.
Future work (not related to non-contiguous NJTs): debug torch.compile problem; new nested int is allocated only for compile.
```python
import torch
def f(nt):
return nt.to(device="cpu")
compiled_f = torch.compile(f)
nt = torch.nested.nested_tensor([
torch.randn(2, 5),
torch.randn(3, 5),
torch.randn(4, 5),
], layout=torch.jagged, device="cuda")
out = f(nt)
out_compile = compiled_f(nt)
print(out.shape, out_compile.shape)
```
```
AssertionError: The values for attribute 'shape' do not match: torch.Size([7, j2]) != torch.Size([7, j1])
```
[ghstack-poisoned]
Called out via torchrec integration: `lengths` is not handled properly.
Future work (not related to non-contiguous NJTs): debug torch.compile problem; new nested int is allocated only for compile.
```python
import torch
def f(nt):
return nt.to(device="cpu")
compiled_f = torch.compile(f)
nt = torch.nested.nested_tensor([
torch.randn(2, 5),
torch.randn(3, 5),
torch.randn(4, 5),
], layout=torch.jagged, device="cuda")
out = f(nt)
out_compile = compiled_f(nt)
print(out.shape, out_compile.shape)
```
```
AssertionError: The values for attribute 'shape' do not match: torch.Size([7, j2]) != torch.Size([7, j1])
```
[ghstack-poisoned]
Called out via torchrec integration: `lengths` is not handled properly.
Future work (not related to non-contiguous NJTs): debug torch.compile problem; new nested int is allocated only for compile.
```python
import torch
def f(nt):
return nt.to(device="cpu")
compiled_f = torch.compile(f)
nt = torch.nested.nested_tensor([
torch.randn(2, 5),
torch.randn(3, 5),
torch.randn(4, 5),
], layout=torch.jagged, device="cuda")
out = f(nt)
out_compile = compiled_f(nt)
print(out.shape, out_compile.shape)
```
```
AssertionError: The values for attribute 'shape' do not match: torch.Size([7, j2]) != torch.Size([7, j1])
```
[ghstack-poisoned]
Called out via torchrec integration: `lengths` is not handled properly.
Future work (not related to non-contiguous NJTs): debug torch.compile problem; new nested int is allocated only for compile.
```python
import torch
def f(nt):
return nt.to(device="cpu")
compiled_f = torch.compile(f)
nt = torch.nested.nested_tensor([
torch.randn(2, 5),
torch.randn(3, 5),
torch.randn(4, 5),
], layout=torch.jagged, device="cuda")
out = f(nt)
out_compile = compiled_f(nt)
print(out.shape, out_compile.shape)
```
```
AssertionError: The values for attribute 'shape' do not match: torch.Size([7, j2]) != torch.Size([7, j1])
```
[ghstack-poisoned]
Called out via torchrec integration: `lengths` is not handled properly.
Future work (not related to non-contiguous NJTs): debug torch.compile problem; new nested int is allocated only for compile.
```python
import torch
def f(nt):
return nt.to(device="cpu")
compiled_f = torch.compile(f)
nt = torch.nested.nested_tensor([
torch.randn(2, 5),
torch.randn(3, 5),
torch.randn(4, 5),
], layout=torch.jagged, device="cuda")
out = f(nt)
out_compile = compiled_f(nt)
print(out.shape, out_compile.shape)
```
```
AssertionError: The values for attribute 'shape' do not match: torch.Size([7, j2]) != torch.Size([7, j1])
```
[ghstack-poisoned]
Called out via torchrec integration: `lengths` is not handled properly.
Future work (not related to non-contiguous NJTs): debug torch.compile problem; new nested int is allocated only for compile.
```python
import torch
def f(nt):
return nt.to(device="cpu")
compiled_f = torch.compile(f)
nt = torch.nested.nested_tensor([
torch.randn(2, 5),
torch.randn(3, 5),
torch.randn(4, 5),
], layout=torch.jagged, device="cuda")
out = f(nt)
out_compile = compiled_f(nt)
print(out.shape, out_compile.shape)
```
```
AssertionError: The values for attribute 'shape' do not match: torch.Size([7, j2]) != torch.Size([7, j1])
```
[ghstack-poisoned]
Called out via torchrec integration: `lengths` is not handled properly.
Future work (not related to non-contiguous NJTs): debug torch.compile problem; new nested int is allocated only for compile.
```python
import torch
def f(nt):
return nt.to(device="cpu")
compiled_f = torch.compile(f)
nt = torch.nested.nested_tensor([
torch.randn(2, 5),
torch.randn(3, 5),
torch.randn(4, 5),
], layout=torch.jagged, device="cuda")
out = f(nt)
out_compile = compiled_f(nt)
print(out.shape, out_compile.shape)
```
```
AssertionError: The values for attribute 'shape' do not match: torch.Size([7, j2]) != torch.Size([7, j1])
```
[ghstack-poisoned]
Called out via torchrec integration: `lengths` is not handled properly.
Future work (not related to non-contiguous NJTs): debug torch.compile problem; new nested int is allocated only for compile.
```python
import torch
def f(nt):
return nt.to(device="cpu")
compiled_f = torch.compile(f)
nt = torch.nested.nested_tensor([
torch.randn(2, 5),
torch.randn(3, 5),
torch.randn(4, 5),
], layout=torch.jagged, device="cuda")
out = f(nt)
out_compile = compiled_f(nt)
print(out.shape, out_compile.shape)
```
```
AssertionError: The values for attribute 'shape' do not match: torch.Size([7, j2]) != torch.Size([7, j1])
```
[ghstack-poisoned]
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.
LGTM
|
@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 |
Merge failedReason: 2 jobs have failed, first few of them are: linux-binary-manywheel / manywheel-py3_9-cuda12_4-test / test, linux-binary-manywheel / manywheel-py3_9-cuda12_1-test / test Details for Dev Infra teamRaised by workflow job |
|
@pytorchbot merge -i |
Merge startedYour change will be merged while ignoring the following 3 checks: linux-binary-manywheel / manywheel-py3_9-cuda12_4-test / test, linux-binary-manywheel / manywheel-py3_9-cuda12_1-test / test, linux-binary-manywheel / manywheel-py3_9-cuda11_8-test / test Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Stack from ghstack (oldest at bottom):
Called out via torchrec integration:
lengthsis not handled properly.Future work (not related to non-contiguous NJTs): #137275