-
Notifications
You must be signed in to change notification settings - Fork 8
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
Update readme #36
Merged
+104
−9
Merged
Update readme #36
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
9bb66d8
Update README.md
yasahi-hpc 227b19f
Adding Disclaimer
yasahi-hpc 09e4a34
Update README.md based on Review
yasahi-hpc 17e8a80
CMake configure commands are displayed in multiple lines
yasahi-hpc 388814c
[README] minor fix
yasahi-hpc 3f9c042
Update README.md based on the reviews
6b3b058
Modify CMake in order to rely on Kokkos added as a subdirectory
4f8bad4
minor fix README.md
yasahi-hpc 071e567
comparison in string
a208f3d
Merge branch 'update-readme-tmp' of github.com:CExA-project/kokkos-ff…
f3840ff
Test if Kokkos is already included
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update README.md based on Review
commit 09e4a34724728e24bb02c63c2cbb4247f6e42278
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -4,10 +4,10 @@ | |||||
|
||||||
UNOFFICIAL FFT interfaces for Kokkos C++ Performance Portability Programming EcoSystem | ||||||
|
||||||
KokkosFFT implements local interfaces Kokkos and de facto standard FFT libraries, including fftw, cufft and hipfft. | ||||||
KokkosFFT implements local interfaces Kokkos and de facto standard FFT libraries, including [fftw](http://www.fftw.org), [cufft](https://developer.nvidia.com/cufft) and [hipfft](https://github.com/ROCm/hipFFT). | ||||||
"Local" means not using MPI, or running within a | ||||||
single MPI process without knowing about MPI. We are inclined to implement the [numpy.fft](https://numpy.org/doc/stable/reference/routines.fft.html) interfaces based on [Kokkos](https://github.com/kokkos/kokkos). | ||||||
A key concept is that "As easy as numpy, as fast as vendor libraries". Accordingly, our APIs follow the APIs by [numpy.fft](https://numpy.org/doc/stable/reference/routines.fft.html) with minor differences. If something is wrong with runtime values, it will raise runtime errors. Here is the example for 1D real to complex transform with ```rfft``` in python and KokkosFFT. | ||||||
single MPI process without knowing about MPI. We are inclined to implement the [numpy.fft](https://numpy.org/doc/stable/reference/routines.fft.html)-like interfaces adapted for [Kokkos](https://github.com/kokkos/kokkos). | ||||||
A key concept is that "As easy as numpy, as fast as vendor libraries". Accordingly, our API follows the API by [numpy.fft](https://numpy.org/doc/stable/reference/routines.fft.html) with minor differences. If something is wrong with runtime values (say ```View``` extents), it will raise runtime errors (C++ exceptions or assertions). Here is the example for 1D real to complex transform with ```rfft``` in python and KokkosFFT. | ||||||
```python3 | ||||||
import numpy as np | ||||||
x = np.random.rand(4) | ||||||
|
@@ -33,7 +33,7 @@ Kokkos::fence(); | |||||
KokkosFFT::rfft(execution_space(), x, x_hat); | ||||||
``` | ||||||
|
||||||
There are two major differences: ```execution_space``` argument and updating output as argument not returned. As imagined, KokkosFFT only accepts [Kokkos Views](https://kokkos.org/kokkos-core-wiki/API/core/View.html) as input data. The accessibilities of Views from ```execution_space``` is statically checked (compilation errors if not accessible). | ||||||
There are two major differences: [```execution_space```](https://kokkos.org/kokkos-core-wiki/API/core/execution_spaces.html) argument and output value (```x_hat```) is an argument of API (not returned from API). As imagined, KokkosFFT only accepts [Kokkos Views](https://kokkos.org/kokkos-core-wiki/API/core/View.html) as input data. The accessibilities of Views from ```execution_space``` is statically checked (compilation errors if not accessible). | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
Depending on the View dimension, it automatically uses the batched plans as follows | ||||||
```python3 | ||||||
|
@@ -112,14 +112,14 @@ cmake -DBUILD_TESTING=ON \ | |||||
This way, all the functionalities are executed on A100 GPUs. | ||||||
|
||||||
### Install as a library | ||||||
Is is assumed that the Kokkos is installed under ```<lib_dir>/kokkos``` targeting Skylake with OpenMP backend. ```Kokkos_dir``` also needs to be set appropriately. Here is a recipe to install KokkosFFT under ```<lib_dir>/kokkosFFT```. | ||||||
Is is assumed that the Kokkos is installed under ```<lib_dir>/kokkos``` targeting Icelake with OpenMP backend. ```Kokkos_dir``` also needs to be set appropriately. Here is a recipe to install KokkosFFT under ```<lib_dir>/kokkosFFT```. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
```bash | ||||||
export KOKKOSFFT_INSTALL_PREFIX=<lib_dir>/kokkosFFT | ||||||
export KokkosFFT_DIR=<lib_dir>/kokkosFFT/lib64/cmake/kokkos-fft | ||||||
|
||||||
mkdir build_KokkosFFT && cd build_KokkosFFT | ||||||
cmake -DBUILD_TESTING=OFF -DCMAKE_CXX_COMPILER=icpx -DKokkos_ENABLE_OPENMP=ON -DCMAKE_INSTALL_PREFIX=${KOKKOSFFT_INSTALL_PREFIX} .. | ||||||
cmake -DBUILD_TESTING=OFF -DCMAKE_CXX_COMPILER=icpx -DKokkos_ENABLE_OPENMP=ON -DKokkos_ARCH_SKX=ON -DCMAKE_INSTALL_PREFIX=${KOKKOSFFT_INSTALL_PREFIX} .. | ||||||
cmake --build . -j 8 | ||||||
cmake --install . | ||||||
``` | ||||||
|
@@ -154,3 +154,7 @@ mkdir build && cd build | |||||
cmake -DCMAKE_CXX_COMPILER=icpx -DCMAKE_BUILD_TYPE=Release -DKokkos_ENABLE_OPENMP=ON -DKokkos_ARCH_SKX=ON .. | ||||||
cmake --build . -j 8 | ||||||
``` | ||||||
|
||||||
## LICENCE | ||||||
[](https://opensource.org/licenses/MIT) | ||||||
KokkosFFT is licensed under the MIT License. |
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.
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.
Concerning assertions, I know it is done this way in some part of Kokkos, however I think it's a bad behaviour for a library. It should not interrupt the calling application, where a proper error handling can be done. Not something to correct now, but perhaps something to keep in mind for the Kokkos ecosystem.
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.
OK. Let us discuss this point in our next meeting