Skip to content

Commit

Permalink
Turn off NCCL_STATIC/CUDNN_STATIC when OF_CUDA_LINK_DYNAMIC_LIBRARY i…
Browse files Browse the repository at this point in the history
…s ON (#5243)
  • Loading branch information
liujuncheng committed Jun 19, 2021
1 parent 9c1b19c commit 360ba56
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/third_party/FindCUDNN.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ include(FindPackageHandleStandardArgs)
set(CUDNN_ROOT_DIR "" CACHE PATH "Folder contains NVIDIA cuDNN")

option(CUDNN_STATIC "Look for static cuDNN" ON)
if(BUILD_SHARED_LIBS)
if(OF_CUDA_LINK_DYNAMIC_LIBRARY)
set(CUDNN_STATIC OFF)
endif()
if (CUDNN_STATIC)
Expand Down
3 changes: 3 additions & 0 deletions cmake/third_party/nccl.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
include (ExternalProject)

option(NCCL_STATIC "" ON)
if(OF_CUDA_LINK_DYNAMIC_LIBRARY)
set(NCCL_STATIC OFF)
endif()

set(NCCL_INSTALL_DIR ${THIRD_PARTY_DIR}/nccl)
set(NCCL_INCLUDE_DIR ${NCCL_INSTALL_DIR}/include)
Expand Down

0 comments on commit 360ba56

Please sign in to comment.