Skip to content

Commit 934ba0b

Browse files
committed
Disable dynamic linked cuda libs default
1 parent d41ac09 commit 934ba0b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ include(system)
2828
include(simd)
2929

3030
###################### Configurations ############################
31-
option(WITH_DSO "Compile PaddlePaddle with dynamic linked libraries" ON)
31+
option(WITH_DSO "Compile PaddlePaddle with dynamic linked libraries" OFF)
3232
option(WITH_GPU "Compile PaddlePaddle with gpu" ${CUDA_FOUND})
3333
option(WITH_DOUBLE "Compile PaddlePaddle with double precision, otherwise use single precision" OFF)
3434
option(WITH_AVX "Compile PaddlePaddle with avx intrinsics" ${AVX_FOUND})

cmake/util.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@ function(link_paddle_exe TARGET_NAME)
120120
target_link_libraries(${TARGET_NAME} rt)
121121
endif()
122122
endif()
123+
124+
if(NOT WITH_DSO)
125+
target_link_libraries(${TARGET_NAME} ${WARPCTC_LIBRARIES})
126+
endif()
127+
123128
add_dependencies(${TARGET_NAME} ${external_project_dependencies})
124129
endfunction()
125130

0 commit comments

Comments
 (0)