Skip to content

Commit

Permalink
improve clang-cuda CI jobs
Browse files Browse the repository at this point in the history
* clang-10 doesn't work with HIP since nvcc doesn't like clang > 9
* we need to propagate the CUDA compiler to the installation,
otherwise tiny mismatches in the handling of constexpr globals
cause link errors.
  • Loading branch information
upsj committed May 23, 2020
1 parent 8fbf14d commit db408de
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 0 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,6 @@ build/clang-cuda101/gcc/all/release/shared:
CUDA_COMPILER: "clang++"
BUILD_OMP: "ON"
BUILD_CUDA: "ON"
BUILD_HIP: "ON"
BUILD_TYPE: "Release"
CUDA_ARCH: 35
tags:
Expand All @@ -401,7 +400,6 @@ build/clang-cuda101/clang/all/release/shared:
CUDA_COMPILER: "clang++"
BUILD_OMP: "ON"
BUILD_CUDA: "ON"
BUILD_HIP: "ON"
BUILD_TYPE: "Release"
BUILD_SHARED_LIBS: "OFF"
CUDA_ARCH: 35
Expand Down
8 changes: 7 additions & 1 deletion cmake/GinkgoConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,13 @@ include(${CMAKE_CURRENT_LIST_DIR}/windows_helpers.cmake)
# NOTE: we do not export benchmarks, examples, tests or devel tools
# so `third_party` libraries are currently unneeded.

# populate CUDA_HOST_COMPILER if Ginkgo was built with CUDA
# propagate CUDA_COMPILER if Ginkgo was built with CUDA
if (GINKGO_BUILD_CUDA AND NOT CMAKE_CUDA_COMPILER)
message(STATUS "Ginkgo: Setting CUDA compiler to ${GINKGO_CUDA_COMPILER}")
set(CMAKE_CUDA_COMPILER "${GINKGO_CUDA_COMPILER}" CACHE STRING "" FORCE)
endif()

# propagate CUDA_HOST_COMPILER if Ginkgo was built with CUDA
if (GINKGO_BUILD_CUDA AND GINKGO_CUDA_HOST_COMPILER AND NOT CMAKE_CUDA_HOST_COMPILER)
message(STATUS "Ginkgo: Setting CUDA host compiler to ${GINKGO_CXX_COMPILER}")
set(CMAKE_CUDA_HOST_COMPILER "${GINKGO_CXX_COMPILER}" CACHE STRING "" FORCE)
Expand Down

0 comments on commit db408de

Please sign in to comment.