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

Preliminary GPU Support #61

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open

Conversation

matinraayai
Copy link

This PR contains my work on enabling GPU support for PencilFFTs.jl.
The tests should work, except some permutations. I need help figuring out what goes wrong in those cases.

@matinraayai
Copy link
Author

@jipolanco I'll work on creating the conditional dependency for CUDA.jl and AMDGPU.jl. Do we have a way to test the GPU code?

@jipolanco
Copy link
Owner

Do we have a way to test the GPU code?

Not yet. I'll contact the JuliaGPU organisation to see if we can use their Buildkite infrastructure.

@matinraayai
Copy link
Author

matinraayai commented Mar 14, 2023

@jipolanco why does the examples folder have its own project manifest? Do I have to update it to point to the correct version of PencilFFTs.jl?

@jipolanco
Copy link
Owner

You're right, there's no reason to include the examples/Manifest.toml file, especially since the examples are executed with a different set of package versions when tests are run (see runtests.jl). For now feel free to update it or to just "git remove" it.

@matinraayai
Copy link
Author

matinraayai commented Mar 15, 2023

@jipolanco the examples/in-place.jl on my machine works fine if I run it from the root directory project. I think it's best to make the action run it from the root directory instead of the test folder.

Is there a reason to have a Project.toml for the test/ folder and the examples/ folder?

@jipolanco
Copy link
Owner

jipolanco commented Mar 15, 2023

Is there a reason to have a Project.toml for the test/ folder and the examples/ folder?

Yes. Tests and examples use certain extra packages that we do not want to include as PencilFFTs dependencies. OrdinaryDiffEq.jl is a good example. (Sorry, OrdinaryDiffEq.jl is used in the docs and not in the tests. But the same comment applies to other packages such as BenchmarkTools.jl.)

After looking at the details, the test failures seem to come from a recent change in FFTW.jl (JuliaMath/FFTW.jl#253), which is actually an improvement. I'll fix this in a separate PR.

@matinraayai
Copy link
Author

@jipolanco I turned CUDA and AMDGPU into optional dependencies. I tested it on both Julia 1.10 and Julia 1.7.
On Julia 1.10, it will only load the extension if CUDA/AMDGPU is explicitly loaded. On Julia 1.7 it treats it as a hard dependency.

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