Fixed output memory format mismatch for bicubic2d#90470
Fixed output memory format mismatch for bicubic2d#90470vfdev-5 wants to merge 3 commits intopytorch:masterfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/90470
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 Failures, 1 PendingAs of commit f2ad2d9: FLAKY - The following jobs failed but were likely due to flakiness present on master:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
176951a to
3abb3fc
Compare
|
XLA job failure seems to be related : https://github.com/pytorch/pytorch/actions/runs/3649949448/jobs/6165647497#step:10:12105 @JackCaoG can you help with debuging this issue please |
|
hmm, it seems like test just takes too long to compile then it was killed... |
|
I opened pytorch/xla#4308, if gpu test works then I think it might be a cpu compiler issue. It is a bit concerning that with this change now compilation significantly increased through. |
|
@vfdev-5 Do you ming rebasing this pr? I was not able to build on our CI since there were some offending pr merged in pytorch side. |
|
@JackCaoG I merged the latest master on friday and today. Both commits are failing on xla : https://github.com/pytorch/pytorch/actions/runs/3660231343/jobs/6187319554, https://github.com/pytorch/pytorch/actions/runs/3673786773/jobs/6211503769 |
|
@wonjoolee95 can you follow up on this one? I trigger the gpu ci in pytorch/xla#4308 again. If you see that GPU test passed we can conclude that this pr will somehow generate a graph that's hard to compile for XLA:CPU, which I think is fine. We can disable the test either on pytorch end or xla end on xla devices. If GPU test also failed with a compilation timeout I think we have a bigger problem since we do have real user for it. |
Sounds good, I'll monitor the GPU test CI and keep this thread updated. |
|
Seems like the XLA's GPU CI is stuck as well, specifically getting an error (I'm guessing timeout) for the test |
|
Other related failures: I'll investigate these and keep updated. |
5d06a01 to
d16d64a
Compare
d16d64a to
0dae71f
Compare
|
@JackCaoG I fixed in the recent commit the issue this PR had with grad output memory format, I reverted to code and it fixed issues mentioned in #90470 (comment) but CI still failing on xla. |
|
@wonjoolee95 can follow up, we can dump the hlo and maybe check with XLA folks why the hlo took so long to compile. This back and forth might take a few days, is this pr urgent? |
|
Thanks for the context, we will try to move a bit faster to unblock this pr, thank you for you patience! |
|
Please refer to Jack's comment below to use |
|
Maybe you can use |
|
@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: This PR is too stale; the last push date was more than 3 days ago. Please rebase and try again. You can rebase by leaving the following comment on this PR: Details for Dev Infra teamRaised by workflow job |
|
@pytorchbot rebase |
|
@pytorchbot successfully started a rebase job. Check the current status here |
Description:
- output memory format is matching input for bicubic2d
Problem: output tensor's memory format does not match input format for bicubic2d
```python
import torch
i = torch.rand(1, 3, 32, 32).contiguous(memory_format=torch.channels_last)
assert i.is_contiguous(memory_format=torch.channels_last)
o = torch.nn.functional.interpolate(i, size=(4, 4), mode="bicubic")
assert o.is_contiguous(memory_format=torch.channels_last), f"Should be channels last but given channels first ({o.is_contiguous(memory_format=torch.contiguous_format)})"
```
Related PR fixing bilinear ops: pytorch#53535
Discovered by Nicolas Hug while working on https://github.com/pytorch/pytorch/tree/interpolate_uint8_images_linear_cpu_support_dev
- Updated tests
- Added missing forward AD support for bicubic with antialiasing
|
Successfully rebased |
7f70215 to
f2ad2d9
Compare
|
@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 additional jobs have failed, first few of them are: trunk ,trunk / linux-focal-rocm5.3-py3.8 / test (default, 1, 2, linux.rocm.gpu) Details for Dev Infra teamRaised by workflow job |
|
@pytorchbot merge -f "timed out, unrelated" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Description:
- output memory format is matching input for bicubic2d
Problem: output tensor's memory format does not match input format for bicubic2d
```python
import torch
i = torch.rand(1, 3, 32, 32).contiguous(memory_format=torch.channels_last)
assert i.is_contiguous(memory_format=torch.channels_last)
o = torch.nn.functional.interpolate(i, size=(4, 4), mode="bicubic")
assert o.is_contiguous(memory_format=torch.channels_last), f"Should be channels last but given channels first ({o.is_contiguous(memory_format=torch.contiguous_format)})"
> AssertionError: Should be channels last but given channels first (True)
```
Related PR fixing bilinear ops: pytorch#53535 (cc @VitalyFedyunin @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @bdhirsh )
Discovered together with @NicolasHug while working on https://github.com/pytorch/pytorch/tree/interpolate_uint8_images_linear_cpu_support_dev
- Updated code to match grad input / output memory formats
- temporary tensor creation matches memory format in `separable_upsample_generic_Nd_kernel_impl`
- Updated tests
- Added missing forward AD support for bicubic with antialiasing
Pull Request resolved: pytorch#90470
Approved by: https://github.com/NicolasHug, https://github.com/lezcano
Description:
Problem: output tensor's memory format does not match input format for bicubic2d
Related PR fixing bilinear ops: #53535 (cc @VitalyFedyunin @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @bdhirsh )
Discovered together with @NicolasHug while working on https://github.com/pytorch/pytorch/tree/interpolate_uint8_images_linear_cpu_support_dev
separable_upsample_generic_Nd_kernel_impl