Skip to content

Commit 1bd7869

Browse files
committed
Merge branch 'kokks_cmake' into 'main'
Use -DKokkos_CUDA_ARCH_NAME=<NAME> to set CUDA arch See merge request ardg/libra!147
2 parents 9a52f85 + 7cd3583 commit 1bd7869

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

.github/workflows/libra.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
which nvcc
3939
mkdir build
4040
cd build
41-
cmake -DApps_BUILD_TESTS=ON -DKokkos_CUDA_ARCH_NAME=Kokkos_ARCH_VOLTA70 ..
41+
cmake -DApps_BUILD_TESTS=ON -DKokkos_CUDA_ARCH_NAME=VOLTA70 ..
4242
make
4343
echo "Compilation complete."
4444

.gitlab-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ build-job:
9393
- which nvcc
9494
- mkdir -p build
9595
- cd build
96-
- cmake -DApps_BUILD_TESTS=ON -DNCORES=8 -DKokkos_CUDA_ARCH_NAME=Kokkos_ARCH_VOLTA70 ..
96+
- cmake -DApps_BUILD_TESTS=ON -DNCORES=8 -DKokkos_CUDA_ARCH_NAME=VOLTA70 ..
9797
- make
9898
after_script:
9999
- echo "=== ccache statistics ==="
@@ -365,7 +365,7 @@ manual-trigger:
365365
- git clean -ffdx
366366
- mkdir -p build
367367
- cd build
368-
- cmake -DApps_BUILD_TESTS=ON -DKokkos_CUDA_ARCH_NAME=Kokkos_ARCH_VOLTA70 ..
368+
- cmake -DApps_BUILD_TESTS=ON -DKokkos_CUDA_ARCH_NAME=VOLTA70 ..
369369
- make -j$(nproc)
370370
- ccache --show-stats || true
371371
when: manual

cmake/dependencies/Kokkos.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@
2525
include(ExternalProject)
2626

2727
if(NOT "${Kokkos_CUDA_ARCH_NAME}" STREQUAL "")
28-
set(Kokkos_CUDA_ARCH_NAME_OPT "-D${Kokkos_CUDA_ARCH_NAME}=ON")
28+
set(Kokkos_CUDA_ARCH_NAME_OPT "-DKokkos_ARCH_${Kokkos_CUDA_ARCH_NAME}=ON")
2929
else()
30+
message(WARNING "CUDA arch name not specified.\nAn attempt will be made to determine CUDA arch.\nCUDA arch name can be sepcified with CLI option -DKokkos_CUDA_ARCH_NAME=<NAME> (recommended).")
3031
set(Kokkos_CUDA_ARCH_NAME_OPT "")
3132
endif()
33+
3234
ExternalProject_Add(
3335
Kokkos
3436
GIT_REPOSITORY ${LIBRA_KOKKOS_GIT_REPOSITORY}

0 commit comments

Comments
 (0)