Skip to content

Commit de6f90a

Browse files
authored
[Misc] guard against change in cuda library name (#8609)
1 parent 6cb748e commit de6f90a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cmake/utils.cmake

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,13 +350,14 @@ function (define_gpu_extension_target GPU_MOD_NAME)
350350
target_include_directories(${GPU_MOD_NAME} PRIVATE csrc
351351
${GPU_INCLUDE_DIRECTORIES})
352352

353-
# TODO: is torch_python_LIBRARY needed?
354-
target_link_libraries(${GPU_MOD_NAME} PRIVATE torch ${torch_python_LIBRARY}
355-
${GPU_LIBRARIES})
353+
target_link_libraries(${GPU_MOD_NAME} PRIVATE torch ${GPU_LIBRARIES})
356354

357355
# Don't use `TORCH_LIBRARIES` for CUDA since it pulls in a bunch of
358356
# dependencies that are not necessary and may not be installed.
359357
if (GPU_LANGUAGE STREQUAL "CUDA")
358+
if ("${CUDA_CUDA_LIB}" STREQUAL "")
359+
set(CUDA_CUDA_LIB "${CUDA_CUDA_LIBRARY}")
360+
endif()
360361
target_link_libraries(${GPU_MOD_NAME} PRIVATE ${CUDA_CUDA_LIB}
361362
${CUDA_LIBRARIES})
362363
else()

0 commit comments

Comments
 (0)