-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: test both native and kokkos builds
- Loading branch information
Mikołaj Zuzek
committed
May 27, 2022
1 parent
4b4b634
commit 14db988
Showing
4 changed files
with
182 additions
and
153 deletions.
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
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/bash | ||
|
||
SRC_PATH=$GITHUB_WORKSPACE/src/kokkos-kernels | ||
BUILD_PATH=$GITHUB_WORKSPACE/build/kokkos-kernels | ||
|
||
ENABLE_KK_ETI=OFF | ||
|
||
# Configure Kokkos-Kernels | ||
cmake \ | ||
-S $SRC_PATH \ | ||
-B $BUILD_PATH \ | ||
-DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE \ | ||
-DCMAKE_INSTALL_PREFIX:FILEPATH=$INSTALL_PATH \ | ||
-DBUILD_SHARED_LIBS=$SHARED_LIBS \ | ||
-DKokkosKernels_ENABLE_TESTS:BOOL=OFF \ | ||
-DKokkosKernels_ENABLE_DOCS:BOOL=OFF \ | ||
-DKokkosKernels_ENABLE_TESTS_AND_PERFSUITE:BOOL=OFF \ | ||
-DKokkosKernels_ENABLE_EXPERIMENTAL:BOOL=ON \ | ||
-DKokkosKernels_INST_DOUBLE:BOOL=$ENABLE_KK_ETI \ | ||
-DKokkosKernels_INST_FLOAT:BOOL=OFF \ | ||
-DKokkosKernels_INST_COMPLEX_FLOAT:BOOL=OFF \ | ||
-DKokkosKernels_INST_COMPLEX_DOUBLE:BOOL=OFF \ | ||
-DKokkosKernels_INST_ORDINAL_INT:BOOL=$ENABLE_KK_ETI \ | ||
-DKokkosKernels_INST_ORDINAL_INT64_T:BOOL=OFF \ | ||
-DKokkosKernels_INST_OFFSET_INT:BOOL=$ENABLE_KK_ETI \ | ||
-DKokkosKernels_INST_OFFSET_SIZE_T:BOOL=OFF \ | ||
-DKokkosKernels_INST_LAYOUTLEFT:BOOL=$ENABLE_KK_ETI \ | ||
-DKokkosKernels_INST_LAYOUTRIGHT:BOOL=OFF | ||
[[ $? -ne 0 ]] && exit 1 | ||
|
||
|
||
# Build Kokkos-Kernels | ||
cmake --build $GITHUB_WORKSPACE/build/kokkos-kernels -j $(nproc) | ||
|
||
[[ $? -ne 0 ]] && exit 1 | ||
|
||
# Install Kokkos-Kernels | ||
cmake --install $GITHUB_WORKSPACE/build/kokkos-kernels |
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/bash | ||
|
||
SRC_PATH=$GITHUB_WORKSPACE/src/kokkos | ||
BUILD_PATH=$GITHUB_WORKSPACE/build/kokkos | ||
|
||
# Note: enabling parallel backend, like OpenMP | ||
# gives a chance to detect threading issues, e.g. races | ||
ENABLE_SERIAL=OFF | ||
[ $KOKKOS_BACKEND == 'Serial' ] && ENABLE_SERIAL=ON | ||
ENABLE_OPENMP=OFF | ||
[ $KOKKOS_BACKEND == 'OpenMP' ] && ENABLE_OPENMP=ON | ||
ENABLE_THREADS=OFF | ||
[ $KOKKOS_BACKEND == 'Threads' ] && ENABLE_THREADS=ON | ||
|
||
# Configure Kokkos | ||
cmake \ | ||
-S $SRC_PATH \ | ||
-B $BUILD_PATH \ | ||
-DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE \ | ||
-DCMAKE_INSTALL_PREFIX:FILEPATH=$INSTALL_PATH \ | ||
-DBUILD_SHARED_LIBS=$SHARED_LIBS \ | ||
-DCMAKE_CXX_FLAGS:STRING=-Werror \ | ||
-DKokkos_CXX_STANDARD:STRING=$CXX_STANDARD \ | ||
-DKokkos_ENABLE_COMPLEX_ALIGN:BOOL=OFF \ | ||
-DKokkos_ENABLE_COMPILER_WARNINGS:BOOL=ON \ | ||
-DKokkos_ENABLE_DEPRECATED_CODE_3:BOOL=OFF \ | ||
-DKokkos_ENABLE_TESTS:BOOL=OFF \ | ||
-DKokkos_ENABLE_SERIAL:BOOL=$ENABLE_SERIAL \ | ||
-DKokkos_ENABLE_OPENMP:BOOL=$ENABLE_OPENMP \ | ||
-DKokkos_ENABLE_THREADS:BOOL=$ENABLE_THREADS | ||
|
||
[[ $? -ne 0 ]] && exit 2 | ||
|
||
# Build mdspan | ||
cmake --build $BUILD_PATH -j $(nproc) | ||
|
||
[[ $? -ne 0 ]] && exit 1 | ||
|
||
# Install mdspan | ||
cmake --install $BUILD_PATH |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/bash | ||
|
||
SRC_PATH=$GITHUB_WORKSPACE/src/mdspan | ||
BUILD_PATH=$GITHUB_WORKSPACE/build/mdspan | ||
|
||
# Configure mdspan | ||
cmake \ | ||
-S $SRC_PATH \ | ||
-B $BUILD_PATH \ | ||
-DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE \ | ||
-DCMAKE_INSTALL_PREFIX:FILEPATH=$INSTALL_PATH \ | ||
-DBUILD_SHARED_LIBS=$SHARED_LIBS | ||
|
||
[[ $? -ne 0 ]] && exit 1 | ||
|
||
# Build mdspan | ||
cmake --build $BUILD_PATH -j $(nproc) | ||
|
||
[[ $? -ne 0 ]] && exit 1 | ||
|
||
# Install mdspan | ||
cmake --install $BUILD_PATH |