Skip to content

Commit

Permalink
initial version of hip.h
Browse files Browse the repository at this point in the history
  • Loading branch information
evaleev committed Sep 18, 2023
1 parent 56e7dac commit a32ab9b
Show file tree
Hide file tree
Showing 2 changed files with 485 additions and 3 deletions.
22 changes: 19 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,8 @@ TiledArray/util/vector.h
)

if(CUDA_FOUND)

list(APPEND TILEDARRAY_HEADER_FILES
TiledArray/external/cuda.h
TiledArray/external/librett.h
TiledArray/cuda/cublas.h
TiledArray/cuda/btas_cublas.h
TiledArray/cuda/btas_um_tensor.h
Expand All @@ -225,9 +223,18 @@ if(CUDA_FOUND)
TiledArray/cuda/thrust.h
TiledArray/cuda/allocators.h
TiledArray/cuda/um_storage.h)
endif(CUDA_FOUND)

if(HIP_FOUND)
list(APPEND TILEDARRAY_HEADER_FILES
TiledArray/external/hip.h)
endif(CUDA_FOUND)

if(HIP_FOUND OR CUDA_FOUND)
list(APPEND TILEDARRAY_HEADER_FILES
TiledArray/external/librett.h)
endif()

set(TILEDARRAY_SOURCE_FILES
TiledArray/tiledarray.cpp
TiledArray/tensor/tensor.cpp
Expand Down Expand Up @@ -275,10 +282,19 @@ if(CUDA_FOUND)
LANGUAGE CUDA)

# the list of libraries on which TiledArray depends on
list(APPEND _TILEDARRAY_DEPENDENCIES CUDA::cudart CUDA::cublas CUDA::nvToolsExt TiledArray_LIBRETT)
list(APPEND _TILEDARRAY_DEPENDENCIES CUDA::cudart CUDA::cublas CUDA::nvToolsExt)

endif(CUDA_FOUND)

if (HIP_FOUND)
list(APPEND _TILEDARRAY_DEPENDENCIES hip::host)
endif()

# LibreTT needed for either CUDA or HIP
if(CUDA_FOUND OR HIP_FOUND)
list(APPEND _TILEDARRAY_DEPENDENCIES TiledArray_LIBRETT)
endif()

if( TARGET TiledArray_SCALAPACK )
list(APPEND _TILEDARRAY_DEPENDENCIES TiledArray_SCALAPACK)
endif()
Expand Down
Loading

0 comments on commit a32ab9b

Please sign in to comment.