mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Append c10 libs to TorchConfig.cmake (#18418)
Summary: Fixes #18416. Pull Request resolved: https://github.com/pytorch/pytorch/pull/18418 Differential Revision: D14635322 Pulled By: ezyang fbshipit-source-id: 81cb658f73583e4cd0358173617f747ebf4f7f8a
This commit is contained in:
committed by
Facebook Github Bot
parent
2ba41c5550
commit
d5861aa55c
@ -44,6 +44,9 @@ find_library(TORCH_LIBRARY torch PATHS "${TORCH_INSTALL_PREFIX}/lib")
|
||||
add_library(torch UNKNOWN IMPORTED)
|
||||
set(TORCH_LIBRARIES torch ${Caffe2_MAIN_LIBS})
|
||||
|
||||
find_library(C10_LIBRARY c10 PATHS "${TORCH_INSTALL_PREFIX}/lib")
|
||||
list(APPEND TORCH_LIBRARIES ${C10_LIBRARY})
|
||||
|
||||
if (@USE_CUDA@)
|
||||
if(MSVC)
|
||||
set(NVTOOLEXT_HOME "C:/Program Files/NVIDIA Corporation/NvToolsExt")
|
||||
@ -68,6 +71,8 @@ if (@USE_CUDA@)
|
||||
${LIBNVTOOLSEXT}
|
||||
${CUDA_LIBRARIES})
|
||||
endif()
|
||||
find_library(C10_CUDA_LIBRARY c10_cuda PATHS "${TORCH_INSTALL_PREFIX}/lib")
|
||||
list(APPEND TORCH_CUDA_LIBRARIES ${C10_CUDA_LIBRARY})
|
||||
list(APPEND TORCH_LIBRARIES ${TORCH_CUDA_LIBRARIES})
|
||||
endif()
|
||||
|
||||
|
Reference in New Issue
Block a user