Skip to content

Commit

Permalink
umpire.cmake: support HIP
Browse files Browse the repository at this point in the history
  • Loading branch information
evaleev committed Sep 18, 2023
1 parent 666dd25 commit fd60c28
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion external/umpire.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit fd60c28

Please sign in to comment.