Skip to content

Cufft primitive #204

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

Merged
merged 50 commits into from
Oct 4, 2024
Merged

Cufft primitive #204

merged 50 commits into from
Oct 4, 2024

Conversation

ASKabalan
Copy link
Collaborator

Creating a pure cuda healpix fft to avoid the long compile time when using pure JAX

@ASKabalan ASKabalan force-pushed the cufft-primitive branch 2 times, most recently from 5f27dca to b72306e Compare May 23, 2024 08:02
Copy link
Collaborator

@matt-graham matt-graham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ASKabalan for your efforts on this - you've done lots of excellent work here 🎉. I've added some initial high-level comments which are mainly around how this packaged and structured.

The most significant issue at the moment is I think the currently implementation precludes building / installing the package on systems without CUDA which I think we don't want to do - I get a CMake error

      CMake Error at /usr/share/cmake-3.22/Modules/CMakeDetermineCUDACompiler.cmake:179 (message):
        Failed to find nvcc.

        Compiler requires the CUDA toolkit.  Please set the CUDAToolkit_ROOT
        variable.

when trying to pip install the packages with edits here locally in an environment without CUDA.

You've also included some reformatting changes to the s2fft/utils/healpix_ffts.py file which make it difficult to see the more substantive changes you made. Ideally any automatic reformatting should be done in a separate PR to keep the diffs easier to read here and after we've had some discussion about the relevant style guide to follow and formatter to use, so would it be possible for you to revert the formatting changes in that file to make this easier to review.

@ASKabalan
Copy link
Collaborator Author

ASKabalan commented Jul 29, 2024

@matt-graham
I have implemented what you asked

  • use nanobind as pip package and not submodule
  • remove _src imports when possible
  • to be able to compile without cuda (but show error message when the user tries to call cuda functions)

I think that this PR can be merged (if it is all ok for you)
Things we need to take care of

@ASKabalan
Copy link
Collaborator Author

@matt-graham It is ok for me .. go for merge?

@matt-graham
Copy link
Collaborator

@matt-graham It is ok for me .. go for merge?

The failing tests are as I forgot we're targetting Python 3.9 and above and I used some Python 3.10 syntax in the type hints. I will fix this now. Then hopefully if tests then pass from my side I'm good to merge, but also tagging @jasonmcewen and @CosmoMatt in case they want to do any final reviews.

@ASKabalan
Copy link
Collaborator Author

@matt-graham Also I think that the test should be marked to not be included in the codecov workflow
Should i do it?

@matt-graham
Copy link
Collaborator

@all-contributors please add @ASKabalan for code, review, test

Copy link
Contributor

@matt-graham

I've put up a pull request to add @ASKabalan! 🎉

@matt-graham matt-graham merged commit 03964aa into main Oct 4, 2024
1 of 3 checks passed
@matt-graham matt-graham deleted the cufft-primitive branch October 4, 2024 15:54
@matt-graham matt-graham added the enhancement New feature or request label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants