From fd60c28e435d78ac6a77729633839ea847090e75 Mon Sep 17 00:00:00 2001 From: Eduard Valeyev Date: Sun, 17 Sep 2023 20:23:50 -0400 Subject: [PATCH] umpire.cmake: support HIP --- external/umpire.cmake | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/external/umpire.cmake b/external/umpire.cmake index 1ee9dde48b..05d6586068 100644 --- a/external/umpire.cmake +++ b/external/umpire.cmake @@ -102,9 +102,20 @@ else() -DCUDA_TOOLKIT_ROOT_DIR=${CUDAToolkit_ROOT} ) if (DEFINED CMAKE_CUDA_ARCHITECTURES) - list(APPEND UMPIRE_CMAKE_ARGS -DCMAKE_CUDA_ARCHITECTURES=${CMAKE_CUDA_ARCHITECTURES}) + list(APPEND UMPIRE_CMAKE_ARGS -DCMAKE_CUDA_ARCHITECTURES="${CMAKE_CUDA_ARCHITECTURES}") endif(DEFINED CMAKE_CUDA_ARCHITECTURES) endif(ENABLE_CUDA) + if (ENABLE_HIP) + list(APPEND UMPIRE_CMAKE_ARGS + -DENABLE_HIP=ON + -DCMAKE_HIP_COMPILER=${CMAKE_HIP_COMPILER} + -DCMAKE_HIP_STANDARD=${CMAKE_HIP_STANDARD} + -DCMAKE_HIP_EXTENSIONS=${CMAKE_HIP_EXTENSIONS} + ) + if (DEFINED CMAKE_HIP_ARCHITECTURES) + list(APPEND UMPIRE_CMAKE_ARGS -DCMAKE_HIP_ARCHITECTURES="${CMAKE_HIP_ARCHITECTURES}") + endif(DEFINED CMAKE_HIP_ARCHITECTURES) + endif(ENABLE_CUDA) if (CMAKE_TOOLCHAIN_FILE) set(UMPIRE_CMAKE_ARGS "${UMPIRE_CMAKE_ARGS}" "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}"