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

FFT Rework #297

Open
manuel5975p opened this issue May 27, 2024 · 3 comments
Open

FFT Rework #297

manuel5975p opened this issue May 27, 2024 · 3 comments
Assignees
Labels
work in progress Used to label an issue you are working on

Comments

@manuel5975p
Copy link
Contributor

The current state of IPPL's FFT has a few problems.

CPU

For the CPU case, the default Kokkos::View Layout is LayoutRight, which results in this loop being a transposition, resulting in slow runtime.
Heffte's source code states

    //! \brief Constructs a box from the low and high indexes, the span in each direction includes the low and high (uses default order).
    box3d(std::array<index, 3> clow, std::array<index, 3> chigh) :
        low(clow), high(chigh), size(...), order({0, 1, 2})
    {}

This corresponds to a Left-Layout (row-major), though this could be changed to have order {2,1,0} for CPU runs.
Interestingly, the FFTW docs on Column-Major format (which is LayoutRight in Kokkos) state that a simple reversal of indices would be enough.

Current performance

Comparing the current IPPL FFT to a simple FFTW yields a factor 42 discrepancy in the time required for a R2C transform.

drawing
@manuel5975p manuel5975p self-assigned this May 27, 2024
@manuel5975p manuel5975p added the work in progress Used to label an issue you are working on label May 27, 2024
@aaadelmann
Copy link
Member

So we would need to do something like:

if on CPU
change order to {2,1,0}

@manuel5975p
Copy link
Contributor Author

Yes, if heffte doesnt have some other restrictions.
It would also be nice if the boxes could be picked to exclude ghost cells, but I dont know if that would be possible

@aaadelmann
Copy link
Member

I think this needs to be discussed with Sri (when he is back from India) and maybe Veronica

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
work in progress Used to label an issue you are working on
Projects
None yet
Development

No branches or pull requests

2 participants