-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Fix fft when any of the input dimensions is not aligned #6118
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
Conversation
test/test_torch.py
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
Addressed @ezyang 's comments. I still couldn't believe that this is my first experience with |
6d60b71 to
8c80373
Compare
|
@pytorchbot retest this please |
1 similar comment
|
@pytorchbot retest this please |
…d test for ifft+fft
…n (should be advanced data layout rather than base_istride)
|
@pytorchbot retest this please |
|
@pytorchbot retest this please |
1 similar comment
|
@pytorchbot retest this please |
| // | ||
| // input[x, y, z] = input[((x * inembed[1] + y) * inembed[2] + z)] | ||
| // | ||
| // Above is the simplified the formulate ignoring the batch dimension. In fact, |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
| // X[m, \omega] = X[m, N - \omega]*. We return only the first floor(N / 2) + 1 | ||
| // values by default (onesided=True). This is also the assumption in libraries | ||
| // including cuFFT and MKL. | ||
| // [ NOTE ] Fourier Transform Congjugate Symmetry |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
* change irfft signal_sizes arg to be the last * add docs for fft, ifft, rfft, irfft; update doc for stft * fix typo in window function docs * improve gradcheck error message * implement backward of fft, ifft, rfft, irfft * add grad tests for fft, ifft, rfft, irfft * fix nits and typos from #6118 * address comments
Discovered this bug while looking into the test fail @colesbury saw. In C2C or C2R transform, when any of the input dimension is not aligned to complex type (
stride % 2 != 0), the third party library calls give incorrect results. Added those checks and tests for this.Added test for
ifft+fft == identity. Empirically this only increased test time by 0.1s.@ezyang