Skip to content

Commit 4f5c32e

Browse files
bnellnmLeiWang1999
authored andcommitted
[Misc] guard against change in cuda library name (vllm-project#8609)
Signed-off-by: LeiWang1999 <leiwang1999@outlook.com>
1 parent 5bc4f19 commit 4f5c32e

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)