-
Notifications
You must be signed in to change notification settings - Fork 19
Add kokkos-fft blog post #158
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall
content/blog/blog-post-10.md
Outdated
|
||
* wishing to integrate in-situ signal and image processing with FFTs. E.g., spectral analyses, low pass filtering, etc. | ||
|
||
* __NOT__ willing to go through the documentation of de facto standard FFT libraries. They want to benefit from powerful vendor FFT libraries while working with a simple API like that of [`numpy.fft`](https://numpy.org/doc/stable/reference/routines.fft.html). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get that point.
Is that about saying that the kokkos-fft API is easier to use than other C++ alternatives and inspired from numpy.fft?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
I would like to say that the kokkos-fft API is easier to use than those of vendor libraries and inspired from numpy.fft?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that "easier" point is kind of subjective. It is certainly more intuitive to use for Python users, but I am not sure it is the case for hardcore fftw Fortran users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe "intuitive" then :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cedricchevalier19 I understand your point. Actually, what I am claiming here is that our API is as simple as numpy.fft. As you may say, fftw experts could only prefer fftw APIs
content/blog/blog-post-10.md
Outdated
# Prerequisites | ||
|
||
To use kokkos-fft, we need the following: | ||
|
||
* `CMake 3.22+` | ||
* `Kokkos 4.4+` | ||
|
||
Depending on your backend, you also need at least one of the following compilers (for the latest requirements, see [README](https://github.com/kokkos/kokkos-fft)): | ||
|
||
* `gcc 8.3.0+` (CPUs) | ||
* `IntelLLVM 2023.0.0+` (CPUs, Intel GPUs) | ||
* `nvcc 11.0.0+` (NVIDIA GPUs) | ||
* `rocm 5.3.0+` (AMD GPUs) | ||
|
||
# Using kokkos-fft in your CMake project | ||
|
||
For the moment, there are two ways to use kokkos-fft: include as a subdirectory in your CMake project or install as a library. Since kokkos-fft is a header-only library, it is easy to add it as a subdirectory in a CMake project. We will see how to do it. | ||
|
||
It is assumed that both Kokkos and kokkos-fft are placed under `<project_directory>/tpls`. Here is the structure of a simple CMake project. | ||
|
||
``` | ||
---/ | ||
| | ||
└──<project_directory>/ | ||
|──tpls/ | ||
| |──kokkos/ | ||
| └──kokkos-fft/ | ||
|──CMakeLists.txt | ||
└──hello.cpp | ||
``` | ||
|
||
See [here](https://kokkos.org/kokkos-core-wiki/get-started/integrating-kokkos-into-your-cmake-project.html#embedded-kokkos-via-add-subdirectory-and-git-submodules) about embedding Kokkos via `add_subdirectory()` and Git Submodules in your CMake project. Then, you need to clone the repo of kokkos-fft into `<project_directory>/tpls/kokkos-fft`. | ||
|
||
```bash | ||
git clone --recursive https://github.com/kokkos/kokkos-fft.git | ||
``` | ||
|
||
The `CMakeLists.txt` file of the project would be | ||
|
||
```CMake | ||
cmake_minimum_required(VERSION 3.23) | ||
project(kokkos-fft-as-subdirectory LANGUAGES CXX) | ||
|
||
add_subdirectory(tpls/kokkos) | ||
add_subdirectory(tpls/kokkos-fft) | ||
|
||
add_executable(hello-kokkos-fft hello.cpp) | ||
target_link_libraries(hello-kokkos-fft PUBLIC Kokkos::kokkos KokkosFFT::fft) | ||
``` | ||
|
||
To build the project, we basically rely on the CMake options for Kokkos. For example, the build steps for an A100 GPU based backend are as follows: | ||
|
||
```bash | ||
cmake -B build \ | ||
-DCMAKE_CXX_COMPILER=g++ \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DKokkos_ENABLE_CUDA=ON \ | ||
-DKokkos_ARCH_AMPERE80=ON | ||
cmake --build build -j 8 | ||
``` | ||
|
||
This way, all the FFT functionalities will be executed on the A100 GPU. For installation as a library, details are provided in the [documentation](https://kokkosfft.readthedocs.io/en/latest/intro/building.html#install-kokkosfft-as-a-library). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would drop these two sections and defer to the kokkos-fft documentation.
You could say that the code for the following example can be found in the kokkos-fft repo and post a link.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. I just tried to make this blog post self-contained. If it is not necessary, I can drop this part
@dalg24 Thanks a lot for your comments. |
No hard deadline. But obviously we don't want to unnecessarily drag it too much. |
Good. I think we can safely make it before the end of next week |
Hi @dalg24 Since I have largely modified the source code, I made a benchmark again. |
1e4dbca
to
96238dc
Compare
@dalg24 |
Apparently it cannot be called like the directory I am a bit surprised as it was working on my local setup.
* Add poster session * Update content/blog/kug-2025-program-announced.md Co-authored-by: Damien L-G <dalg24+github@gmail.com> * Update content/blog/kug-2025-program-announced.md Co-authored-by: JBludau <104908666+JBludau@users.noreply.github.com> * Update main table --------- Co-authored-by: Damien L-G <dalg24+github@gmail.com> Co-authored-by: JBludau <104908666+JBludau@users.noreply.github.com>
Table is slightly less ugly that way
* Add blog post about new View implementation * Apply suggestions from code review * Rewrite with AI
* add pannel details * added note about edit * Update content/blog/kug-2025-program-announced.md Co-authored-by: Damien L-G <dalg24+github@gmail.com> --------- Co-authored-by: Damien L-G <dalg24+github@gmail.com>
* update main schedule to match hpsf * update afternoon session times * add update hint to top of page * swap in chris for benjamin * Shorten title for Chris' talk --------- Co-authored-by: Damien L-G <dalg24+github@gmail.com>
Rational: there is currently no tag for any other organization, not even a CEA one for the CExA Tea-Time page, and that "Sandia" tag is exclusively used here to annotate the Team page. It looks just out of place and yield a "Team" "Sandia" marking which is not the message we are trying to convey.
* Update publication list * Finish the job * Capitalize the e --------- Co-authored-by: Damien L-G <dalg24@gmail.com>
* Make citing-kokkos a top level alias on kokkos.org Splits citation instructions from publication list. * Apply suggestions from code review Co-authored-by: Damien L-G <dalg24+github@gmail.com> --------- Co-authored-by: Damien L-G <dalg24+github@gmail.com>
* Update the Kokkos Ecosystem Overview --------- Signed-off-by: Christian Trott <crtrott@sandia.gov> Co-authored-by: Damien L-G <dalg24+github@gmail.com>
* Add filed repot for KUG 2025 * Add pictures * Improve blog post * Add another picture * Add another picture * Update blog post and make it adhere to new file ordering Signed-off-by: Christian Trott <crtrott@sandia.gov> * Apply suggestions from code review Co-authored-by: Daniel Arndt <arndtd@ornl.gov> --------- Signed-off-by: Christian Trott <crtrott@sandia.gov> Co-authored-by: Christian Trott <crtrott@sandia.gov> Co-authored-by: Damien L-G <dalg24+github@gmail.com>
* Rename overview URL and tab * Remove about/{core,kernels,tools} pages Content was duplicated (word for word) in the overview page * Cleanup Documentation tabs Dropped Kernels API tab * Apply suggestions from code review Co-authored-by: Luc Berger <lberge@sandia.gov> --------- Co-authored-by: Luc Berger <lberge@sandia.gov>
a94d427
to
6885d41
Compare
Closes |
This PR adds a blog post on kokkos-fft.