-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Added temporary fix for channels-last-like tensors for Resize op #4979
base: main
Are you sure you want to change the base?
Conversation
💊 CI failures summary and remediationsAs of commit 93522e4 (more details on the Dr. CI page):
🕵️ 1 new failure recognized by patternsThe following CI failures do not appear to be due to upstream breakages: unittest_linux_cpu_py3.8 (1/1)Step: "Run tests" (full log | diagnosis details | 🔁 rerun)
|
Fixes pytorch#4880 Description: - Added temporary fix for channels-last-like tensors for Resize op Benchmarks:
76a3458
to
93522e4
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.
I would be in favour of merging this to resolve the speed issue until there are highly optimized kernels that handle channels last. This is related to pytorch/pytorch#83840 and #6465
cc @NicolasHug
I think it's worth getting clarity on whether pytorch/pytorch#83840 is a fix-worthy issue first. Fixing pytorch/pytorch#83840 might make this PR obsolete. This PR seems very similar to #4898 which was reverted from @fmassa 's #4898 (comment):
that still sounds applicable here? |
Fixes #4880
Description:
Benchmarks: code
PTH->DType->Resize (64->224) ->Norm
Notations:
PIL->Resize (64->224) ->Tensor->Norm
=pil_loader, [T.Resize((osize, osize)), T.ToTensor(), T.Normalize(mean, std)]
PTH->DType->Resize (64->224) ->Norm
=torch_loader, [T.ConvertImageDtype(torch.float), T.Resize((osize, osize)), T.Normalize(mean, std)]
PTH->DType->Resize (500->224) ->Norm
Notations:
PIL->Resize (500->224) ->Tensor->Norm
=pil_loader, [T.Resize((osize, osize)), T.ToTensor(), T.Normalize(mean, std)]
PTH->DType->Resize (500->224) ->Norm
=torch_loader, [T.ConvertImageDtype(torch.float), T.Resize((osize, osize)), T.Normalize(mean, std)]
PS: to avoid reverting this PR, let's wait for Francisco's review.