CMakeLists.txt 2.5 KB
Newer Older
1
add_subdirectory(garbage_collector)
2 3
add_subdirectory(interpreter)
add_subdirectory(workqueue)
4 5 6 7 8 9 10 11 12 13 14

set(STANDALONE_EXECUTOR_SRCS
    data_transfer.cc
    new_executor_defs.cc
    interpretercore_util.cc
    event_manager.cc
    stream_analyzer.cc
    interpretercore.cc
    standalone_executor.cc)

set(STANDALONE_EXECUTOR_DEPS
15
    dependency_builder
16
    device_context
17
    op_registry
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
    scope
    framework_proto
    data_feed_proto
    heter_service_proto
    trainer_desc_proto
    glog
    lod_rank_table
    fs
    shell
    fleet_wrapper
    heter_wrapper
    ps_gpu_wrapper
    box_wrapper
    lodtensor_printer
    feed_fetch_method
    graph_to_program_pass
    variable_helper
    timer
    monitor
37 38 39 40 41
    nan_inf_utils
    enforce
    scope
    glog
    workqueue
42
    interpretercore_garbage_collector
43 44
    ${DEVICE_EVENT_LIBS}
    glog)
45

46 47
cc_library(
  standalone_executor
48 49
  SRCS ${STANDALONE_EXECUTOR_SRCS}
  DEPS ${STANDALONE_EXECUTOR_DEPS})
50

51 52 53 54
cc_library(
  staticgraph_executor_statistics
  SRCS executor_statistics.cc
  DEPS enforce glog os_info)
L
liutiexing 已提交
55

56
# skip win32 since wget is not installed by default on windows machine.
57 58
if(WITH_GPU
   AND WITH_TESTING
T
tianshuo78520a 已提交
59
   AND NOT WIN32)
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
  add_custom_target(
    download_program
    COMMAND wget -nc https://paddle-ci.gz.bcebos.com/new_exec/lm_main_program
    COMMAND wget -nc
            https://paddle-ci.gz.bcebos.com/new_exec/lm_startup_program)

  # all operators used in the program
  set(OPS
      fill_constant_op
      uniform_random_op
      lookup_table_op
      transpose_op
      reshape_op
      split_op
      slice_op
      concat_op
      matmul_op
      elementwise_add_op
      elementwise_mul_op
      softmax_with_cross_entropy_op
      reduce_mean_op
      reduce_sum_op
      activation_op
      sum_op
      elementwise_max_op
      elementwise_div_op
      sgd_op
      squared_l2_norm_op
      memcpy_h2d_op
89 90
      memcpy_d2h_op
      fetch_v2_op)
91 92 93 94

  # All deps of the operators above, part of GLOB_OPERATOR_DEPS.
  set(OP_DEPS generator softmax selected_rows_functor jit_kernel_helper
              concat_and_split cross_entropy)
95

96 97 98
  cc_test(
    standalone_executor_test
    SRCS standalone_executor_test.cc
99
    DEPS standalone_executor operator op_registry executor ${OPS} ${OP_DEPS})
100
  set_tests_properties(standalone_executor_test PROPERTIES TIMEOUT 100)
101

102 103 104 105 106
  add_dependencies(standalone_executor_test download_program)
  if(WITH_PROFILER)
    target_link_libraries(standalone_executor_test profiler)
    add_dependencies(standalone_executor_test profiler)
  endif()
107
endif()