File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -350,13 +350,14 @@ function (define_gpu_extension_target GPU_MOD_NAME)
350
350
target_include_directories (${GPU_MOD_NAME} PRIVATE csrc
351
351
${GPU_INCLUDE_DIRECTORIES} )
352
352
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} )
356
354
357
355
# Don't use `TORCH_LIBRARIES` for CUDA since it pulls in a bunch of
358
356
# dependencies that are not necessary and may not be installed.
359
357
if (GPU_LANGUAGE STREQUAL "CUDA" )
358
+ if ("${CUDA_CUDA_LIB} " STREQUAL "" )
359
+ set (CUDA_CUDA_LIB "${CUDA_CUDA_LIBRARY} " )
360
+ endif ()
360
361
target_link_libraries (${GPU_MOD_NAME} PRIVATE ${CUDA_CUDA_LIB}
361
362
${CUDA_LIBRARIES} )
362
363
else ()
You can’t perform that action at this time.
0 commit comments