File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ ExternalProject_Add(
34
34
BUILD_IN_SOURCE 1
35
35
)
36
36
37
- ADD_LIBRARY (dgc SHARED IMPORTED GLOBAL )
37
+ ADD_LIBRARY (dgc STATIC IMPORTED GLOBAL )
38
38
SET_PROPERTY (TARGET dgc PROPERTY IMPORTED_LOCATION ${DGC_LIBRARIES} )
39
39
ADD_DEPENDENCIES (dgc extern_dgc )
40
40
Original file line number Diff line number Diff line change @@ -25,8 +25,12 @@ if(WITH_DISTRIBUTE)
25
25
endif ()
26
26
27
27
if (WITH_GPU )
28
+ set (dgc_deps "" )
29
+ if (NOT WIN32 )
30
+ set (dgc_deps dgc )
31
+ endif ()
28
32
nv_library (all_reduce_op_handle SRCS all_reduce_op_handle.cc DEPS op_handle_base scope lod_tensor ddim memory
29
- dynload_cuda variable_visitor dgc )
33
+ dynload_cuda variable_visitor ${dgc_deps} )
30
34
nv_library (fused_all_reduce_op_handle SRCS fused_all_reduce_op_handle.cc DEPS op_handle_base scope lod_tensor ddim memory
31
35
dynload_cuda variable_visitor )
32
36
if (WITH_DISTRIBUTE )
Original file line number Diff line number Diff line change @@ -44,9 +44,12 @@ add_subdirectory(dynload)
44
44
cc_library (cpu_helper SRCS cpu_helper.cc DEPS cblas enforce )
45
45
cc_test (cpu_helper_test SRCS cpu_helper_test.cc DEPS cpu_helper )
46
46
47
+ set (dgc_deps "" )
47
48
IF (WITH_GPU )
48
49
set (GPU_CTX_DEPS dynload_cuda dynamic_loader )
49
- set (dgc_deps dgc )
50
+ if (NOT WIN32 )
51
+ set (dgc_deps dgc )
52
+ endif ()
50
53
ELSE ()
51
54
set (dgc_deps )
52
55
ENDIF ()
You can’t perform that action at this time.
0 commit comments