CMakeLists.txt 2.6 KB
Newer Older
Y
Yu Yang 已提交
1
cc_library(var_handle SRCS var_handle.cc DEPS place)
C
chengduoZH 已提交
2
cc_library(op_handle_base SRCS op_handle_base.cc DEPS var_handle device_context lod_tensor)
Y
Yu Yang 已提交
3
cc_library(scale_loss_grad_op_handle SRCS scale_loss_grad_op_handle.cc DEPS op_handle_base scope lod_tensor ddim memory)
Y
Yu Yang 已提交
4
cc_library(fetch_op_handle SRCS fetch_op_handle.cc DEPS op_handle_base scope lod_tensor ddim memory)
Y
Yu Yang 已提交
5
cc_library(computation_op_handle SRCS computation_op_handle.cc DEPS framework_proto scope place operator op_registry)
T
wip  
typhoonzero 已提交
6
cc_library(send_op_handle SRCS send_op_handle.cc DEPS framework_proto scope place operator op_registry)
Y
Yu Yang 已提交
7 8

cc_library(ssa_graph SRCS ssa_graph.cc DEPS var_handle op_handle_base)
Y
Yu Yang 已提交
9
cc_library(ssa_graph_builder SRCS ssa_graph_builder.cc DEPS ssa_graph)
Y
Yu Yang 已提交
10

C
chengduoZH 已提交
11 12
cc_library(variable_visitor SRCS variable_visitor.cc DEPS lod_tensor selected_rows)

Y
Yu Yang 已提交
13
if(WITH_GPU)
C
chengduoZH 已提交
14 15
    nv_library(nccl_all_reduce_op_handle SRCS nccl_all_reduce_op_handle.cc DEPS op_handle_base scope lod_tensor ddim memory
            dynload_cuda)
Y
Yu Yang 已提交
16
    set(multi_devices_graph_builder_deps nccl_all_reduce_op_handle)
C
chengduoZH 已提交
17
    nv_library(reduce_op_handle SRCS reduce_op_handle.cc DEPS op_handle_base variable_visitor scope ddim dynload_cuda)
C
chengduoZH 已提交
18 19
    nv_library(broadcast_op_handle SRCS broadcast_op_handle.cc DEPS op_handle_base scope ddim memory variable_visitor dynload_cuda)

Y
Yu Yang 已提交
20 21
else()
    set(multi_devices_graph_builder_deps)
C
chengduoZH 已提交
22
    cc_library(reduce_op_handle SRCS reduce_op_handle.cc DEPS op_handle_base variable_visitor scope ddim)
C
chengduoZH 已提交
23
    cc_library(broadcast_op_handle SRCS broadcast_op_handle.cc DEPS op_handle_base scope ddim memory variable_visitor)
Y
Yu Yang 已提交
24
endif()
C
chengduoZH 已提交
25 26 27

cc_library(gather_op_handle SRCS gather_op_handle.cc DEPS op_handle_base scope ddim memory variable_visitor)

Y
Yu Yang 已提交
28
cc_library(multi_devices_graph_builder SRCS multi_devices_graph_builder.cc DEPS ssa_graph_builder computation_op_handle
C
chengduoZH 已提交
29
        scale_loss_grad_op_handle send_op_handle ${multi_devices_graph_builder_deps} reduce_op_handle broadcast_op_handle)
C
chengduoZH 已提交
30

31
cc_library(ssa_graph_executor SRCS ssa_graph_executor.cc DEPS ssa_graph framework_proto)
Y
Yu Yang 已提交
32 33
cc_library(threaded_ssa_graph_executor SRCS threaded_ssa_graph_executor.cc DEPS fetch_op_handle ssa_graph_executor scope
        simple_threadpool device_context)
34

C
chengduoZH 已提交
35
cc_test(broadcast_op_test SRCS broadcast_op_handle_test.cc DEPS var_handle op_handle_base scope ddim memory
C
chengduoZH 已提交
36
        device_context broadcast_op_handle)
C
chengduoZH 已提交
37
cc_test(gather_op_test SRCS gather_op_handle_test.cc DEPS var_handle op_handle_base scope ddim memory
C
chengduoZH 已提交
38
        device_context gather_op_handle)
C
chengduoZH 已提交
39
cc_test(reduce_op_handle_test SRCS reduce_op_handle_test.cc DEPS var_handle op_handle_base scope ddim memory
C
chengduoZH 已提交
40
        device_context reduce_op_handle )