Skip to content

Commit

Permalink
Add support for CUDA
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-mccall committed Nov 7, 2023
1 parent 05193d0 commit ba8ac6a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@ jobs:
matrix:
compiler: [g++, clang++]
kokkos: [on, off]
cuda: [on, off]
mempool: [on, off]
exclude:
- kokkos: off
mempool: on
- cuda: off
mempool: on

steps:
- uses: actions/checkout@v4
Expand All @@ -28,6 +31,9 @@ jobs:
repository: kokkos/kokkos
path: kokkos

- uses: Jimver/[email protected]
if: ${{ matrix.cuda == 'on' }}

- name: Configure Kokkos
if: ${{ matrix.kokkos == 'on' }}
shell: bash
Expand All @@ -36,6 +42,7 @@ jobs:
-Bbuild
-DCMAKE_CXX_COMPILER=${{ matrix.compiler }}
-DCMAKE_INSTALL_PREFIX=build/install
-DKokkos_ENABLE_CUDA=${{ matrix.cuda }}

- name: Build Kokkos
if: ${{ matrix.kokkos == 'on' }}
Expand All @@ -50,7 +57,7 @@ jobs:
-DCMAKE_CXX_COMPILER=${{ matrix.compiler }}
-DCMAKE_VERBOSE_MAKEFILE=on
-DOmega_h_USE_MPI=off
-DOmega_h_USE_CUDA=off
-DOmega_h_USE_CUDA=${{ matrix.kokkos == 'off' && matrix.cuda || 'off' }}
-DOmega_h_USE_Kokkos=${{ matrix.kokkos }}
-DKokkos_PREFIX=$GITHUB_WORKSPACE/kokkos/build/install
-DBUILD_TESTING=ON
Expand All @@ -63,6 +70,7 @@ jobs:
run: cmake --build .

- name: Test
if: ${{ matrix.cuda == 'off' }}
working-directory: ${{github.workspace}}/omega_h/build
shell: bash
run: ctest

0 comments on commit ba8ac6a

Please sign in to comment.