Skip to content

Commit

Permalink
[CUDA] fix linking with cudatolkit & nvhpc
Browse files Browse the repository at this point in the history
  • Loading branch information
abagusetty committed Oct 21, 2024
1 parent d6ed735 commit 4a88054
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Nwpw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,11 @@ if(OpenCL_FOUND)
target_link_libraries(pwdft band pspw file nwpwlib ${MPI_LIBRARIES} ${OpenCL_LIBRARY})
elseif(NWPW_CUDA)
target_include_directories(pwdft PUBLIC ${CUDAToolkit_INCLUDE_DIRS})
target_link_libraries(pwdft band pspw file nwpwlib ${MPI_LIBRARIES} NVHPC::CUDART NVHPC::CUBLAS NVHPC::CUSOLVER NVHPC::CUFFT)
if(CMAKE_CXX_COMPILER_ID MATCHES "NVHPC")
target_link_libraries(pwdft band pspw file nwpwlib ${MPI_LIBRARIES} NVHPC::CUDART NVHPC::CUBLAS NVHPC::CUSOLVER NVHPC::CUFFT)
else()
target_link_libraries(pwdft band pspw file nwpwlib ${MPI_LIBRARIES} CUDA::cudart CUDA::cublas CUDA::cusolver CUDA::cufft)
endif()
elseif(NWPW_HIP)
target_include_directories(pwdft PUBLIC ${ROCBLAS_INCLUDE_DIRS} ${ROCFFT_INCLUDE_DIRS} ${ROCSOLVER_INCLUDE_DIRS})
target_link_libraries(pwdft band pspw file nwpwlib ${MPI_LIBRARIES} hip::device)
Expand Down

0 comments on commit 4a88054

Please sign in to comment.