Skip to content

Commit

Permalink
Merge branch 'main' into splines-release
Browse files Browse the repository at this point in the history
  • Loading branch information
blegouix committed Nov 12, 2023
2 parents 1c4cebc + 06911af commit 8dadd76
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 31 deletions.
30 changes: 1 addition & 29 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ option(BUILD_DOCUMENTATION "Build DDC documentation/website" OFF)
option(BUILD_EXAMPLES "Build DDC examples" ON)
option(DDC_BUILD_PDI_WRAPPER "Build DDC PDI wrapper" ON)
option(DDC_ENABLE_DOUBLE "Build DDC with double precision support, float is used otherwise" ON)
option(HIP_FOR_NVIDIA "Use the HIP wrapper for CUDA on NVIDIA plateforms, for development purpose" OFF)
if(NOT(Kokkos_ENABLE_CUDA) AND HIP_FOR_NVIDIA)
message(FATAL_ERROR "Kokkos_ENABLE_CUDA has to be ON to use HIP wrapper on NVIDIA plateforms")
endif()

# Dependencies

Expand Down Expand Up @@ -101,7 +97,7 @@ if("${BUILD_FFT_KERNEL}" AND NOT FFTW_FOUND)
endif()

## CUDA + CUDAToolkit
if("${BUILD_FFT_KERNEL}" AND "${Kokkos_ENABLE_CUDA}" AND NOT("${HIP_FOR_NVIDIA}"))
if("${BUILD_FFT_KERNEL}" AND "${Kokkos_ENABLE_CUDA}")
find_package( CUDAToolkit MODULE REQUIRED )
if( NOT(CUDAToolkit_FOUND) )
message(FATAL_ERROR "CUDAToolkit not found." )
Expand Down Expand Up @@ -239,30 +235,6 @@ if("${Kokkos_ENABLE_HIP}")
target_compile_definitions(DDC INTERFACE hipfft_AVAIL)
endif()

if("${BUILD_FFT_KERNEL}" AND "${HIP_FOR_NVIDIA}")
find_package( HIP REQUIRED )

target_include_directories(DDC
SYSTEM INTERFACE
"$<BUILD_INTERFACE:${HIP_ROOT_DIR}/include>"
)
target_compile_definitions(DDC INTERFACE hip_AVAIL)
target_compile_definitions(DDC INTERFACE HIP_FOR_NVIDIA)

if( DEFINED HIP_TOOLKIT_PATH ) # Usually called ROCM_PATH in the HIP documentation. By default : /opt/rocm
list( APPEND CMAKE_PREFIX_PATH ${HIP_TOOLKIT_PATH}/hipfft/lib )
find_library(HIPFFT_LIB hipfft REQUIRED)
target_link_libraries( DDC INTERFACE ${HIPFFT_LIB} )
target_include_directories(DDC
SYSTEM INTERFACE
"$<BUILD_INTERFACE:${HIP_TOOLKIT_PATH}/include>"
)
target_compile_definitions(DDC INTERFACE hipfft_AVAIL)
else()
message( "HIP_TOOLKIT_PATH is not defined. Kernels functions may be unaccessible. To get them, add -DHIP_TOOLKIT_PATH=\"path_to_hip_toolkit\" in your cmake line" )
endif()
endif()

if("${BUILD_SPLINES_KERNEL}")
# Ginkgo
find_package(Ginkgo 1.6.0 EXACT REQUIRED)
Expand Down
2 changes: 1 addition & 1 deletion docs/_template/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ <h2 id="projectbrief">a <span class="acronym">d</span>iscrete <span class="acron
<li><a href="index.html">About</a>
<li><a href="first_steps.html">Commented example</a>
<li><a href="annotated.html">API reference</a>
<li id="gitlab-ribbon"><a rel="noopener" href="https://github.com/Maison-de-la-Simulation/ddc" target="_blank">Contribute on Github</a></li>
<li id="gitlab-ribbon"><a rel="noopener" href="https://github.com/CExA-project/ddc" target="_blank">Contribute on Github</a></li>
</ul></nav>
2 changes: 1 addition & 1 deletion include/ddc/kernels/fft.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ void core(
// std::cout << "performed with cufft";
}
#endif
#if hipfft_AVAIL && !HIP_FOR_NVIDIA
#if hipfft_AVAIL
else if constexpr (std::is_same_v<ExecSpace, Kokkos::HIP>) {
hipStream_t stream = execSpace.hip_stream();

Expand Down
5 changes: 5 additions & 0 deletions include/ddc/misc/ginkgo_executors.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#pragma once

#include <memory>
#include <type_traits>

#include <ginkgo/ginkgo.hpp>

inline std::shared_ptr<gko::Executor> create_default_host_executor()
Expand Down

0 comments on commit 8dadd76

Please sign in to comment.