Skip to content

Remove duplicate normalisation in FFT methods and enable relevant tests #1469

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Wetitpig
Copy link

Some of the code originates from the branch yifeng/fft_c2r and yifeng/fft_r2c_with_abi, and also intel/intel-extension-for-pytorch.

However, the problem of redundant normalisations in the _fft_c2c_mkl_out function has been fixed. Some loops have also been simplified.

@Wetitpig
Copy link
Author

Due to resource constraints I have been testing only the "usual" use cases (i.e.

  • torch.fft.rfft, torch.fft.rfft2 on XPU
  • torch.fft.irfft, torch.fft.irfft2 on CPU

and vice versa), and the results seem to be consistent with those from the original pytorch run on CPU.

@CuiYifeng
Copy link
Contributor

@Wetitpig Thanks for your PR. Since I have completed most of the debugging (seems these cases are not fixed in this PR) based on my old branches, fft_c2r and fft_r2c will be submitted by another PRs.
Glad to see the fixing of normalization. Changing this PR to modify this part may be a better choice. Thank you.

@Wetitpig Wetitpig marked this pull request as draft April 17, 2025 16:52
@Wetitpig Wetitpig changed the title Adding at::_fft_r2c and at::_fft_c2r methods with OneMKL Remove duplicate normalisation in FFT methods and enable relevant tests Apr 27, 2025
@Wetitpig Wetitpig marked this pull request as ready for review April 27, 2025 08:29
@Wetitpig
Copy link
Author

Now targeting only the repeated normalisation in *_out functions in FFT, while enabling tests for FFT and also some code refactoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants