Skip to content

Commit

Permalink
Fix: storage_gpu for HIPCC-AMDGPU (GridTools#1540)
Browse files Browse the repository at this point in the history
  • Loading branch information
havogt committed Aug 6, 2020
1 parent 77f82d1 commit 83240c0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmake/public/gridtools_setup_targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,12 @@ macro(_gt_setup_targets _config_mode clang_cuda_mode)
endif()

find_package(CUDAToolkit)
if(CUDAToolkit_FOUND)
if(CUDAToolkit_FOUND OR GT_CUDA_TYPE STREQUAL HIPCC-AMDGPU)
_gt_add_library(${_config_mode} storage_gpu)
target_link_libraries(${_gt_namespace}storage_gpu INTERFACE ${_gt_namespace}gridtools CUDA::cudart)
target_link_libraries(${_gt_namespace}storage_gpu INTERFACE ${_gt_namespace}gridtools)
if(CUDAToolkit_FOUND)
target_link_libraries(${_gt_namespace}storage_gpu INTERFACE CUDA::cudart)
endif()
list(APPEND GT_STORAGES gpu)
endif()

Expand Down

0 comments on commit 83240c0

Please sign in to comment.