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)
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 ()
You can’t perform that action at this time.
0 commit comments