CMakeLists.txt 1.7 KB
Newer Older
1
if(WITH_PSLIB)
2
    cc_library(fleet_wrapper SRCS fleet_wrapper.cc DEPS framework_proto variable_helper scope pslib_brpc pslib)
T
Thunderbrook 已提交
3 4 5 6 7
else()
    cc_library(fleet_wrapper SRCS fleet_wrapper.cc DEPS framework_proto variable_helper scope)
endif(WITH_PSLIB)

if(WITH_HETERPS)
T
Thunderbrook 已提交
8 9 10 11
    if(WITH_NCCL)
        nv_library(ps_gpu_wrapper SRCS ps_gpu_wrapper.cu ps_gpu_wrapper.cc
        DEPS heter_ps)
        add_subdirectory(heter_ps)
12 13 14 15
    elseif(WITH_RCCL)
        hip_library(ps_gpu_wrapper SRCS ps_gpu_wrapper.cu ps_gpu_wrapper.cc
        DEPS heter_ps)
        add_subdirectory(heter_ps)
T
Thunderbrook 已提交
16
    endif(WITH_NCCL)
17
else()
T
Thunderbrook 已提交
18
    cc_library(ps_gpu_wrapper SRCS ps_gpu_wrapper.cc)
T
Thunderbrook 已提交
19
endif(WITH_HETERPS)
D
dongdaxiang 已提交
20

21
if(WITH_NCCL OR WITH_RCCL)
22 23
    cc_library(nccl_wrapper SRCS nccl_wrapper.cc DEPS framework_proto variable_helper scope)
endif()
H
hutuxian 已提交
24
if(WITH_BOX_PS)
25 26 27 28 29 30
    if(WITH_GPU)
        nv_library(box_wrapper SRCS box_wrapper.cc box_wrapper.cu DEPS framework_proto lod_tensor box_ps)
    endif()
    if(WITH_ROCM)
        hip_library(box_wrapper SRCS box_wrapper.cc box_wrapper.cu DEPS framework_proto lod_tensor box_ps)
    endif()
H
hutuxian 已提交
31 32 33
else()
    cc_library(box_wrapper SRCS box_wrapper.cc DEPS framework_proto lod_tensor)
endif(WITH_BOX_PS)
34

T
Thunderbrook 已提交
35

36 37 38 39 40 41
if(WITH_GLOO)
    cc_library(gloo_wrapper SRCS gloo_wrapper.cc DEPS framework_proto variable_helper scope gloo)
else()
    cc_library(gloo_wrapper SRCS gloo_wrapper.cc DEPS framework_proto variable_helper scope)
endif(WITH_GLOO)

T
Thunderbrook 已提交
42
cc_library(heter_wrapper SRCS heter_wrapper.cc DEPS framework_proto device_context heter_service_proto)
T
Thunderbrook 已提交
43

Y
YUNSHEN XIE 已提交
44
cc_test(test_fleet_cc SRCS test_fleet.cc DEPS fleet_wrapper gloo_wrapper fs shell)
45

46
if(WITH_ASCEND OR WITH_ASCEND_CL)
47
    cc_library(ascend_wrapper SRCS ascend_wrapper.cc DEPS framework_proto lod_tensor ascend_ge ascend_graph)
48
endif()