Skip to content

Commit

Permalink
Pre install kokkos kernels and restore flags
Browse files Browse the repository at this point in the history
  • Loading branch information
tpadioleau committed Jun 25, 2024
1 parent 0795917 commit 176719d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 7 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,12 @@ jobs:
'cpu-clang')
export CC=clang
export CXX=clang++
DDC_CMAKE_CXX_FLAGS="-Werror=extra-semi -Werror=old-style-cast"
;;
'cpu-gcc')
export CC=gcc
export CXX=g++
DDC_CMAKE_CXX_FLAGS="-Werror=extra-semi -Werror=old-style-cast"
if [ 'xDebug' = 'x${{matrix.cmake_build_type}}' ]
then
DDC_CMAKE_CXX_FLAGS="${DDC_CMAKE_CXX_FLAGS} -fno-omit-frame-pointer -fsanitize=address"
Expand All @@ -156,6 +158,7 @@ jobs:
export benchmark_ROOT=$PWD/opt/benchmark
export GTest_ROOT=$PWD/opt/gtest
export Kokkos_ROOT=$PWD/opt/kokkos
export KokkosKernels_ROOT=$PWD/opt/kokkos-kernels
export mdspan_ROOT=$PWD/opt/mdspan
cmake \
Expand Down Expand Up @@ -193,6 +196,22 @@ jobs:
cmake --install build --prefix $Kokkos_ROOT
rm -rf build
cmake \
-DCMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} \
-DCMAKE_CXX_STANDARD=${{matrix.cxx_version}} \
-DKokkosKernels_ADD_DEFAULT_ETI=OFF \
-DKokkosKernels_ENABLE_ALL_COMPONENTS=OFF \
-DKokkosKernels_ENABLE_COMPONENT_BLAS=ON \
-DKokkosKernels_ENABLE_COMPONENT_BATCHED=ON \
-DKokkosKernels_ENABLE_COMPONENT_LAPACK=OFF \
-DKokkosKernels_ENABLE_TPL_BLAS=OFF \
-DKokkosKernels_ENABLE_TPL_LAPACK=OFF \
-B build \
-S /src/vendor/kokkos-kernels
cmake --build build --parallel 2
cmake --install build --prefix $KokkosKernels_ROOT
rm -rf build
cmake \
-DCMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} \
-DCMAKE_CXX_STANDARD=${{matrix.cxx_version}} \
Expand Down
17 changes: 10 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -255,13 +255,16 @@ if("${DDC_BUILD_KERNELS_SPLINES}")
target_include_directories(DDC INTERFACE "${LAPACKE_INCLUDE_DIRS}")

# Kokkos-kernels
set(KokkosKernels_ENABLE_ALL_COMPONENTS OFF)
set(KokkosKernels_ENABLE_COMPONENT_BLAS ON)
set(KokkosKernels_ENABLE_COMPONENT_BATCHED ON)
set(KokkosKernels_ENABLE_COMPONENT_LAPACK OFF)
set(KokkosKernels_ENABLE_TPL_BLAS ON)
set(KokkosKernels_ENABLE_TPL_LAPACK OFF)
add_subdirectory(vendor/kokkos-kernels/)
find_package(KokkosKernels)
if(NOT KokkosKernels_FOUND)
set(KokkosKernels_ENABLE_ALL_COMPONENTS OFF)
set(KokkosKernels_ENABLE_COMPONENT_BLAS ON)
set(KokkosKernels_ENABLE_COMPONENT_BATCHED ON)
set(KokkosKernels_ENABLE_COMPONENT_LAPACK OFF)
set(KokkosKernels_ENABLE_TPL_BLAS ON)
set(KokkosKernels_ENABLE_TPL_LAPACK OFF)
add_subdirectory(vendor/kokkos-kernels)
endif()
target_link_libraries(DDC INTERFACE Kokkos::kokkoskernels)
endif()

Expand Down

0 comments on commit 176719d

Please sign in to comment.