CMakeLists.txt 3.0 KB
Newer Older
L
LiYuRio 已提交
1 2 3 4
proto_library(fleet_executor_desc_proto SRCS fleet_executor_desc.proto)
if(WITH_PYTHON)
  py_proto_compile(fleet_executor_desc_py_proto SRCS fleet_executor_desc.proto)
endif()
5 6
proto_library(interceptor_message_proto SRCS interceptor_message.proto)

7 8
if(WITH_ARM_BRPC)
  set(BRPC_DEPS arm_brpc snappy gflags glog)
P
pangengzheng 已提交
9
elseif(WITH_DISTRIBUTE AND NOT WITH_PSLIB)
10 11 12 13 14 15 16 17 18 19
  set(BRPC_DEPS
      brpc
      ssl
      crypto
      protobuf
      zlib
      leveldb
      snappy
      gflags
      glog)
20 21 22 23
else()
  set(BRPC_DEPS "")
endif()

24 25 26 27
cc_library(
  task_loop_thread_pool
  SRCS task_loop_thread_pool.cc task_loop_thread.cc task_loop.cc
  DEPS enforce glog)
28

29 30 31 32 33 34 35 36 37 38
cc_library(
  fleet_executor
  SRCS fleet_executor.cc
       carrier.cc
       task_node.cc
       runtime_graph.cc
       dist_model.cc
       interceptor.cc
       compute_interceptor.cc
       amplifier_interceptor.cc
L
LiYuRio 已提交
39
       cond_interceptor.cc
40
       start_interceptor.cc
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
       source_interceptor.cc
       sink_interceptor.cc
       message_service.cc
       message_bus.cc
       dist_model_tensor_wrapper.cc
  DEPS proto_desc
       fleet_executor_desc_proto
       interceptor_message_proto
       task_loop_thread_pool
       collective_helper
       op_registry
       executor_gc_helper
       gflags
       glog
       ${BRPC_DEPS})
56 57

if(WITH_DISTRIBUTE)
58 59 60 61
  set(DISTRIBUTE_COMPILE_FLAGS
      "-Wno-non-virtual-dtor -Wno-error=non-virtual-dtor -Wno-error=delete-non-virtual-dtor"
  )
  if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
62 63
    set(DISTRIBUTE_COMPILE_FLAGS "${DISTRIBUTE_COMPILE_FLAGS} -faligned-new")
  endif()
64 65 66 67 68 69 70
  set_source_files_properties(
    interceptor.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
  set_source_files_properties(
    compute_interceptor.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
  set_source_files_properties(
    amplifier_interceptor.cc PROPERTIES COMPILE_FLAGS
                                        ${DISTRIBUTE_COMPILE_FLAGS})
L
LiYuRio 已提交
71 72
  set_source_files_properties(
    cond_interceptor.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
73 74
  set_source_files_properties(
    start_interceptor.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
  set_source_files_properties(
    source_interceptor.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
  set_source_files_properties(
    sink_interceptor.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
  set_source_files_properties(
    message_bus.h PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
  set_source_files_properties(
    message_bus.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
  set_source_files_properties(
    fleet_executor.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
  set_source_files_properties(carrier.cc PROPERTIES COMPILE_FLAGS
                                                    ${DISTRIBUTE_COMPILE_FLAGS})
  set_source_files_properties(
    message_service.h PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
  set_source_files_properties(
    message_service.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
91 92

  add_subdirectory(test)
93
endif()