Skip to content

Commit

Permalink
Introducing C++20 build for some backends in CI (#123)
Browse files Browse the repository at this point in the history
* minor fix rocm CI

* Add C++20 build in CI

* use gcc 12 for CUDA CI

* test upload-artifacts

* fix: Dockerfile

* C++17 for CUDA

* revert changes to __build_base.yaml
  • Loading branch information
yasahi-hpc authored Jul 29, 2024
1 parent 5713084 commit a218e3f
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/build_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ jobs:
c: gcc
cxx: g++
cmake_flags:
cxx_standard: 17
kokkos: -DKokkos_ENABLE_OPENMP=ON
kokkos_fft: -DCMAKE_CXX_FLAGS="-Wall -Wextra" -DCMAKE_COMPILE_WARNING_AS_ERROR=ON
- name: threads
Expand All @@ -80,6 +81,7 @@ jobs:
c: gcc
cxx: g++
cmake_flags:
cxx_standard: 20
kokkos: -DKokkos_ENABLE_THREADS=ON
kokkos_fft: -DCMAKE_CXX_FLAGS="-Wall -Wextra" -DCMAKE_COMPILE_WARNING_AS_ERROR=ON
- name: serial
Expand All @@ -88,6 +90,7 @@ jobs:
c: gcc
cxx: g++
cmake_flags:
cxx_standard: 17
kokkos: -DKokkos_ENABLE_SERIAL=ON
kokkos_fft: -DCMAKE_CXX_FLAGS="-Wall -Wextra" -DCMAKE_COMPILE_WARNING_AS_ERROR=ON
- name: cuda
Expand All @@ -96,6 +99,7 @@ jobs:
c: gcc
cxx: g++
cmake_flags:
cxx_standard: 17
kokkos: -DKokkos_ENABLE_CUDA=ON -DKokkos_ARCH_AMPERE80=ON
kokkos_fft: -DCMAKE_CXX_FLAGS="-Wall -Wextra -Werror"
- name: hip
Expand All @@ -104,16 +108,18 @@ jobs:
c: hipcc
cxx: hipcc
cmake_flags:
cxx_standard: 17
kokkos: -DKokkos_ENABLE_HIP=ON -DKokkos_ARCH_VEGA90A=ON
kokkos_fft: -DCMAKE_CXX_FLAGS="-Wall -Wextra -Werror" -DKokkosFFT_ENABLE_ROCFFT=ON
kokkos_fft: -DCMAKE_CXX_FLAGS="-Wall -Wextra -Werror"
- name: rocm
image: rocm
compiler:
c: hipcc
cxx: hipcc
cmake_flags:
cxx_standard: 20
kokkos: -DKokkos_ENABLE_HIP=ON -DKokkos_ARCH_VEGA90A=ON
kokkos_fft: -DCMAKE_CXX_FLAGS="-Wall -Wextra -Werror"
kokkos_fft: -DCMAKE_CXX_FLAGS="-Wall -Wextra -Werror" -DKokkosFFT_ENABLE_ROCFFT=ON
- name: sycl
image: intel
compiler:
Expand All @@ -122,6 +128,7 @@ jobs:
cmake_flags:
# building for Intel PVC was unsuccessful without the proper
# device, so for now, we simply generate generic Intel GPU code
cxx_standard: 17
kokkos: -DKokkos_ENABLE_SYCL=ON -DKokkos_ARCH_INTEL_GEN=ON
kokkos_fft: -DCMAKE_CXX_FLAGS="-Wall -Wextra"
target:
Expand Down Expand Up @@ -162,7 +169,7 @@ jobs:
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-DCMAKE_C_COMPILER=${{ matrix.backend.compiler.c }} \
-DCMAKE_CXX_COMPILER=${{ matrix.backend.compiler.cxx }} \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_STANDARD=${{ matrix.backend.cmake_flags.cxx_standard }} \
-DKokkosFFT_ENABLE_EXAMPLES=ON \
-DKokkosFFT_ENABLE_TESTS=ON \
-DKokkosFFT_ENABLE_BENCHMARK=ON \
Expand Down Expand Up @@ -212,7 +219,7 @@ jobs:
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-DCMAKE_C_COMPILER=${{ matrix.backend.compiler.c }} \
-DCMAKE_CXX_COMPILER=${{ matrix.backend.compiler.cxx }} \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_STANDARD=${{ matrix.backend.cmake_flags.cxx_standard }} \
${{ matrix.backend.cmake_flags.kokkos }} \
${{ matrix.backend.cmake_flags.kokkos_fft }} \
${{ matrix.target.cmake_flags }} \
Expand All @@ -228,7 +235,7 @@ jobs:
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-DCMAKE_C_COMPILER=${{ matrix.backend.compiler.c }} \
-DCMAKE_CXX_COMPILER=${{ matrix.backend.compiler.cxx }} \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_STANDARD=${{ matrix.backend.cmake_flags.cxx_standard }} \
${{ matrix.backend.cmake_flags.kokkos }} \
tpls/kokkos
docker run -v ${{ github.workspace }}:/work ghcr.io/kokkos/kokkos-fft/base_${{ matrix.backend.image }}_${{ needs.check_docker_files.outputs.image_suffix }}:${{ needs.check_docker_files.outputs.image_tag }} \
Expand All @@ -245,7 +252,7 @@ jobs:
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-DCMAKE_C_COMPILER=${{ matrix.backend.compiler.c }} \
-DCMAKE_CXX_COMPILER=${{ matrix.backend.compiler.cxx }} \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_STANDARD=${{ matrix.backend.cmake_flags.cxx_standard }} \
${{ matrix.backend.cmake_flags.kokkos_fft }} \
${{ matrix.target.cmake_flags }}
docker run -v ${{ github.workspace }}:/work ghcr.io/kokkos/kokkos-fft/base_${{ matrix.backend.image }}_${{ needs.check_docker_files.outputs.image_suffix }}:${{ needs.check_docker_files.outputs.image_tag }} \
Expand All @@ -261,7 +268,7 @@ jobs:
-DCMAKE_PREFIX_PATH=/work/install \
-DCMAKE_C_COMPILER=${{ matrix.backend.compiler.c }} \
-DCMAKE_CXX_COMPILER=${{ matrix.backend.compiler.cxx }} \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_STANDARD=${{ matrix.backend.cmake_flags.cxx_standard }} \
install_test/as_library
docker run -v ${{ github.workspace }}:/work ghcr.io/kokkos/kokkos-fft/base_${{ matrix.backend.image }}_${{ needs.check_docker_files.outputs.image_suffix }}:${{ needs.check_docker_files.outputs.image_tag }} \
cmake --build install_test/as_library/build -j $(( $(nproc) * 2 + 1 ))
Expand Down

0 comments on commit a218e3f

Please sign in to comment.