Skip to content
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

Add possibility to use cuFFT to perform FFTs #119

Merged
merged 2 commits into from
Oct 9, 2023
Merged

Conversation

cphyc
Copy link
Collaborator

@cphyc cphyc commented Nov 8, 2022

This adds the minimal changes to compile using cuFFT instead of FFTW3 as a backend for performing the Fourier transforms.

This may help when the FFT is dominating the cost, but is otherwise not offering any speedup (nor does it slow down the code).

@cphyc
Copy link
Collaborator Author

cphyc commented Oct 9, 2023

@apontzen any chance of getting this merged? With a student of mine (@AnatoleStorck) we've found significant improvement for large FFT computations.

The speedup is on the order of 2 when using A40 GPUs compared to performing the FFT in parallel on the processors.

@apontzen
Copy link
Member

apontzen commented Oct 9, 2023

Sorry, yes. I guess there is nothing to test, really, since cuFFTW is supposed to be a drop-in replacement?

@cphyc
Copy link
Collaborator Author

cphyc commented Oct 9, 2023

Yes. As long as one is able to compile -- which might not be straightforward -- the outputs should be exactly the same.

@apontzen apontzen merged commit de173f7 into pynbody:master Oct 9, 2023
@cphyc cphyc deleted the cufft branch October 9, 2023 12:50
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