Pr501 fft final#570
Merged
Merged
Conversation
Split the existing monolithic FFT implementation into smaller headers: - add FFT traits and transform/backend dispatch declarations - move HeFFTe-specific implementation into FFT/Backend/Heffte.h - move CC, RC, and trigonometric transform specializations into FFT/Transform/ - replace FFT.h with an aggregate include for the new module structure - remove the obsolete FFT.hpp implementation header This first slice intentionally keeps the scope limited to the existing HeFFTe-backed CC, RC, sine, cosine, and cosine-I transforms. Pruned transforms and CUDA/cuFFTMp backend files are deferred to later commits so the refactor remains reviewable. Validation: - configured local OpenMP build with IPPL_ENABLE_FFT=ON, IPPL_ENABLE_UNIT_TESTS=ON, and IPPL_ENABLE_TESTS=ON - built build-pr501-fft-final-openmp successfully - ran ctest --test-dir build-pr501-fft-final-openmp --output-on-failure - all 70 tests passed, including FFT, TestFFTCC, TestFFTRC, TestSine, TestCos, and TestCos1
Add the pruned complex-to-complex and real-to-complex FFT transform specializations from the PR501 FFT refactor: - add FFT<PrunedCCTransform, ComplexField> - add FFT<PrunedRCTransform, RealField> - include both pruned transform headers from the FFT transform aggregate This commit keeps pruned transforms separate from the core FFT module split and from the CUDA backend additions, making backend and transform issues easier to isolate during review. Validation: - rebuilt build-pr501-fft-final-openmp successfully - ran ctest --test-dir build-pr501-fft-final-openmp --output-on-failure - all 70 configured tests passed
Add the CUDA-aware cuFFTMp backend from the PR501 FFT refactor as an explicitly opt-in backend: - add src/FFT/Backend/CuFFTMp.h - add the IPPL_ENABLE_CUFFTMP CMake option - define IPPL_ENABLE_CUFFTMP only when requested - require IPPL_ENABLE_FFT=ON when cuFFTMp is enabled - require CUDA in IPPL_PLATFORMS when cuFFTMp is enabled - include the cuFFTMp backend only when both IPPL_ENABLE_CUFFTMP and KOKKOS_ENABLE_CUDA are active Plain cuFFT support is intentionally not added in this commit. The normal HeFFTe path remains the default, and non-CUDA builds do not include the cuFFTMp header. Validation: - reconfigured build-pr501-fft-final-openmp with IPPL_ENABLE_FFT=ON and default IPPL_ENABLE_CUFFTMP=OFF - rebuilt build-pr501-fft-final-openmp successfully - ran ctest --test-dir build-pr501-fft-final-openmp --output-on-failure - all 70 configured tests passed - verified that configuring IPPL_ENABLE_CUFFTMP=ON without CUDA fails clearly with "IPPL_ENABLE_CUFFTMP requires CUDA in IPPL_PLATFORMS"
srikrrish
requested changes
Jul 20, 2026
srikrrish
left a comment
Member
There was a problem hiding this comment.
I just noticed that apart from the PCG PR Paul is not mentioned as author in the previous PR (HOSG final) as well as this one. This needs to be fixed. Since HOSG final is already merged it may be difficult to correct it there and not sure (sorry should have checked more carefully). but hopefully at least in this PR and in the future ones it can be corrected.
Member
Author
|
Will add Paul to this one and see if we can add him to the other as well. |
srikrrish
approved these changes
Jul 21, 2026
srikrrish
left a comment
Member
There was a problem hiding this comment.
It was decided that Paul will be added as a co-author at the end of all the PRs from 501 by selecting the individual commits. Hence, I am approving now.
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jul 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The option is guarded so that cuFFTMp can only be enabled when FFT and CUDA are both enabled:
IPPL_ENABLE_CUFFTMP=ONrequiresIPPL_ENABLE_FFT=ONIPPL_ENABLE_CUFFTMP=ONrequiresCUDAinIPPL_PLATFORMSThe backend header is included only when both conditions are active:
Plain single-node
CuFFT.hsupport is intentionally not included in this PR.What Is Intentionally Not Included
The original
pr501-fftbranch also contained changes toFFTOpenPoissonSolverand solver tests. Those were reviewed but not ported.Reason: current
masteralready contains newer Poisson solver functionality, including integrated and shifted Green-function support. The corresponding hunks frompr501-fftwould remove that current coverage and regress master.Specifically, this PR does not remove:
GreenFunction::{STANDARD, INTEGRATED}TestGaussianIntegratedTestIntegratedGreensFunctionValidation
Configured and built an OpenMP FFT/unit-test build:
cmake -S . -B build-pr501-fft-final-openmp \ -DIPPL_PLATFORMS=OPENMP \ -DIPPL_ENABLE_FFT=ON \ -DIPPL_ENABLE_UNIT_TESTS=ON \ -DIPPL_ENABLE_TESTS=ON cmake --build build-pr501-fft-final-openmp -j 8 ctest --test-dir build-pr501-fft-final-openmp --output-on-failureResult:
Configured and built a solver-enabled OpenMP build:
cmake -S . -B build-pr501-fft-final-solvers-openmp \ -DIPPL_PLATFORMS=OPENMP \ -DIPPL_ENABLE_FFT=ON \ -DIPPL_ENABLE_SOLVERS=ON \ -DIPPL_ENABLE_UNIT_TESTS=ON \ -DIPPL_ENABLE_TESTS=ON cmake --build build-pr501-fft-final-solvers-openmp -j 8 ctest --test-dir build-pr501-fft-final-solvers-openmp --output-on-failureResult:
Also verified the cuFFTMp CMake guard:
fails clearly with:
Scaling
Notes
CUDA/cuFFTMp backend code is included behind compile-time guards and was not fully exercised locally because the local build is OpenMP-only. The default path remains HeFFTe, and non-CUDA builds do not include the cuFFTMp backend header.