diff --git a/doc/src/Build_extras.rst b/doc/src/Build_extras.rst index 1dd64b3160..a7c22493a3 100644 --- a/doc/src/Build_extras.rst +++ b/doc/src/Build_extras.rst @@ -751,14 +751,27 @@ This list was last updated for version 4.3.0 of the Kokkos library. platform-appropriate vendor library: rocFFT on AMD GPUs or cuFFT on NVIDIA GPUs. - To simplify compilation, five preset files are included in the + For Intel GPUs using SYCL, set these variables: + + .. code-block:: bash + + -D Kokkos_ARCH_HOSTARCH=yes # HOSTARCH = HOST from list above + -D Kokkos_ARCH_GPUARCH=yes # GPUARCH = GPU from list above + -D Kokkos_ENABLE_SYCL=yes + -D Kokkos_ENABLE_OPENMP=yes + -D FFT_KOKKOS=MKL_GPU + + This will enable FFTs on the GPU using the oneMKL library. + + To simplify compilation, six preset files are included in the ``cmake/presets`` folder, ``kokkos-serial.cmake``, ``kokkos-openmp.cmake``, ``kokkos-cuda.cmake``, - ``kokkos-hip.cmake``, and ``kokkos-sycl.cmake``. They will enable - the KOKKOS package and enable some hardware choices. For GPU - support those preset files must be customized to match the - hardware used. So to compile with CUDA device parallelization with - some common packages enabled, you can do the following: + ``kokkos-hip.cmake``, ``kokkos-sycl-nvidia.cmake``, and + ``kokkos-sycl-intel.cmake``. They will enable the KOKKOS + package and enable some hardware choices. For GPU support those + preset files must be customized to match the hardware used. So + to compile with CUDA device parallelization with some common + packages enabled, you can do the following: .. code-block:: bash @@ -830,6 +843,19 @@ This list was last updated for version 4.3.0 of the Kokkos library. FFT_INC = -DFFT_HIPFFT # enable use of hipFFT (optional) FFT_LIB = -lhipfft # link to hipFFT library + For Intel GPUs using SYCL: + + .. code-block:: make + + KOKKOS_DEVICES = SYCL + KOKKOS_ARCH = HOSTARCH,GPUARCH # HOSTARCH = HOST from list above that is + # hosting the GPU + # GPUARCH = GPU from list above + FFT_INC = -DFFT_KOKKOS_MKL_GPU # enable use of hipFFT (optional) + # link to hipFFT library + FFT_LIB = -lmkl_sycl_dft -lmkl_intel_ilp64 -lmkl_tbb_thread + -mkl_core -ltbb + Advanced KOKKOS compilation settings ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/doc/src/Build_settings.rst b/doc/src/Build_settings.rst index 9d31f6b431..a1a900a385 100644 --- a/doc/src/Build_settings.rst +++ b/doc/src/Build_settings.rst @@ -69,7 +69,7 @@ libraries and better pipelining for packing and communication. -D FFT=value # FFTW3 or MKL or KISS, default is FFTW3 if found, # else KISS - -D FFT_KOKKOS=value # FFTW3 or MKL or KISS or CUFFT or HIPFFT, + -D FFT_KOKKOS=value # FFTW3 or MKL or KISS or CUFFT or HIPFFT or MKL_GPU, # default is KISS -D FFT_SINGLE=value # yes or no (default), no = double precision -D FFT_PACK=value # array (default) or pointer or memcpy @@ -123,7 +123,8 @@ libraries and better pipelining for packing and communication. FFT_INC = -DFFT_ # where is KISS (default), FFTW3, # FFTW (same as FFTW3), or MKL FFT_INC = -DFFT_KOKKOS_ # where is KISS (default), FFTW3, - # FFTW (same as FFTW3), MKL, CUFFT, or HIPFFT + # FFTW (same as FFTW3), MKL, CUFFT, HIPFFT + # or MKL_GPU FFT_INC = -DFFT_SINGLE # do not specify for double precision FFT_INC = -DFFT_FFTW_THREADS # enable using threaded FFTW3 libraries FFT_INC = -DFFT_MKL_THREADS # enable using threaded FFTs with MKL libraries @@ -141,6 +142,9 @@ libraries and better pipelining for packing and communication. # cuFFT either precision FFT_LIB = -lcufft + # MKL_GPU either precision + FFT_LIB = -lmkl_sycl_dft -lmkl_intel_ilp64 -lmkl_tbb_thread -lmkl_core -ltbb + # FFTW3 double precision FFT_LIB = -lfftw3 @@ -221,7 +225,9 @@ above). The cuFFT and hipFFT FFT libraries are packaged with NVIDIA's CUDA and AMD's HIP installations, respectively. These FFT libraries require the Kokkos acceleration package to be enabled and the Kokkos back end to be -GPU-resident (i.e., HIP or CUDA). +GPU-resident (i.e., HIP or CUDA). Similarly, GPU offload of FFTs on +Intel GPUs with oneMKL currently requires the Kokkos acceleration +package to be enabled with the SYCL backend. Performing 3d FFTs in parallel can be time-consuming due to data access and required communication. This cost can be reduced by performing diff --git a/doc/src/Howto_cmake.rst b/doc/src/Howto_cmake.rst index 55e5b171a6..43aa519293 100644 --- a/doc/src/Howto_cmake.rst +++ b/doc/src/Howto_cmake.rst @@ -348,7 +348,7 @@ Some common LAMMPS specific variables * - ``FFT`` - select which FFT library to use: ``FFTW3``, ``MKL``, ``KISS`` (default, unless FFTW3 is found) * - ``FFT_KOKKOS`` - - select which FFT library to use in Kokkos-enabled styles: ``FFTW3``, ``MKL``, ``HIPFFT``, ``CUFFT``, ``KISS`` (default) + - select which FFT library to use in Kokkos-enabled styles: ``FFTW3``, ``MKL``, ``HIPFFT``, ``CUFFT``, ``MKL_GPU``, ``KISS`` (default) * - ``FFT_SINGLE`` - select whether to use single precision FFTs (default: ``off``) * - ``WITH_JPEG``