Skip to content

Commit

Permalink
use better method for specifying cuda libs
Browse files Browse the repository at this point in the history
Signed-off-by: Bill Nell <bill@neuralmagic.com>
  • Loading branch information
bnellnm committed Oct 25, 2024
1 parent 6eb440d commit 47dbd22
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions cmake/utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -424,11 +424,7 @@ function (define_gpu_extension_target GPU_MOD_NAME)
# Don't use `TORCH_LIBRARIES` for CUDA since it pulls in a bunch of
# dependencies that are not necessary and may not be installed.
if (GPU_LANGUAGE STREQUAL "CUDA")
if ("${CUDA_CUDA_LIB}" STREQUAL "")
set(CUDA_CUDA_LIB "${CUDA_CUDA_LIBRARY}")
endif()
target_link_libraries(${GPU_MOD_NAME} PRIVATE ${CUDA_CUDA_LIB}
${CUDA_LIBRARIES})
target_link_libraries(${GPU_MOD_NAME} PRIVATE CUDA::cudart CUDA::cuda_driver)
else()
target_link_libraries(${GPU_MOD_NAME} PRIVATE ${TORCH_LIBRARIES})
endif()
Expand Down

0 comments on commit 47dbd22

Please sign in to comment.