[GH-ISSUE #71] Doesn't work on PyTorch 1.8 #65

Closed
opened 2026-10-31 21:10:25 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @interfect on GitHub (Mar 25, 2021).
Original GitHub issue: https://github.com/openai/CLIP/issues/71

PyTorch recently had a 1.8 release, bringing much better support for backing torch.cuda tensors with AMD GPUs.

However, CLIP hasn't been ported to PyTorch 1.8 yet.

In particular, CLIP still uses the deprecated and now removed pytorch.irfft, which needs to be replaced with calls to methods in the torch.fft namespace to work on PyTorch 1.8.

Unfortunately, the PR that removed support for the old methods doesn't provide a recipe for translating calls that can be executed by someone who doesn't understand the finer points of FFTs. It seems to me that the square-root-of-a-bunch-of-stuff normalization method of the old function isn't available as any of the normalization modes of torch.fft.irfft, and I'm not sure of the number of dimensions involved here, or whether we have the input versus the output sizes handy.

Originally created by @interfect on GitHub (Mar 25, 2021). Original GitHub issue: https://github.com/openai/CLIP/issues/71 PyTorch recently had a 1.8 release, bringing much better support for backing `torch.cuda` tensors with AMD GPUs. However, CLIP hasn't been ported to PyTorch 1.8 yet. In particular, CLIP still uses the deprecated and now removed `pytorch.irfft`, which needs to be replaced with calls to methods in the `torch.fft` namespace to work on PyTorch 1.8. Unfortunately, [the PR that removed support for the old methods](https://github.com/pytorch/pytorch/pull/48594) doesn't provide a recipe for translating calls that can be executed by someone who doesn't understand the finer points of FFTs. It seems to me that the square-root-of-a-bunch-of-stuff normalization method of the old function isn't available as any of the normalization modes of `torch.fft.irfft`, and I'm not sure of the number of dimensions involved here, or whether we have the input versus the output sizes handy.
Author
Owner

@interfect commented on GitHub (Mar 25, 2021):

Sorry, this is on the wrong project.

<!-- gh-comment-id:806358063 --> @interfect commented on GitHub (Mar 25, 2021): Sorry, this is on the wrong project.
Author
Owner

@jongwook commented on GitHub (Mar 25, 2021):

FWIW, CLIP doesn't work on 1.8 either. I'm keeping #49 open to track the compatibility fix.

<!-- gh-comment-id:806380210 --> @jongwook commented on GitHub (Mar 25, 2021): FWIW, CLIP doesn't work on 1.8 either. I'm keeping #49 open to track the compatibility fix.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openai/CLIP#65
No description provided.