diff --git a/paddle/fluid/distributed/fleet_executor/CMakeLists.txt b/paddle/fluid/distributed/fleet_executor/CMakeLists.txt index 3b8f9b695c3395ab064ffe37dc703d99f2f7c853..f054c59fa277e68280a4cd9fb6f0ae84ac09928e 100755 --- a/paddle/fluid/distributed/fleet_executor/CMakeLists.txt +++ b/paddle/fluid/distributed/fleet_executor/CMakeLists.txt @@ -25,37 +25,66 @@ cc_library( task_loop_thread_pool SRCS task_loop_thread_pool.cc task_loop_thread.cc task_loop.cc DEPS enforce glog) - -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 - cond_interceptor.cc - start_interceptor.cc - source_interceptor.cc - sink_interceptor.cc - message_service.cc - message_bus.cc - dist_model_tensor_wrapper.cc - DEPS naive_executor - proto_desc - standalone_executor - fleet_executor_desc_proto - interceptor_message_proto - task_loop_thread_pool - collective_helper - executor_gc_helper - op_registry - phi - glog - ${BRPC_DEPS}) - +if(WITH_XPU OR WITH_ROCM) + 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 + cond_interceptor.cc + start_interceptor.cc + source_interceptor.cc + sink_interceptor.cc + message_service.cc + message_bus.cc + dist_model_tensor_wrapper.cc + DEPS naive_executor + proto_desc + standalone_executor + fleet_executor_desc_proto + interceptor_message_proto + task_loop_thread_pool + collective_helper + executor_gc_helper + op_registry + phi + glog + ${BRPC_DEPS}) +else() + 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 + cond_interceptor.cc + start_interceptor.cc + source_interceptor.cc + sink_interceptor.cc + message_service.cc + message_bus.cc + dist_model_tensor_wrapper.cc + DEPS proto_desc + standalone_executor + fleet_executor_desc_proto + interceptor_message_proto + task_loop_thread_pool + collective_helper + op_registry + executor_gc_helper + phi + glog + ${BRPC_DEPS}) +endif() if(WITH_DISTRIBUTE) set(DISTRIBUTE_COMPILE_FLAGS "-Wno-non-virtual-dtor -Wno-error=non-virtual-dtor -Wno-error=delete-non-virtual-dtor" diff --git a/paddle/fluid/framework/CMakeLists.txt b/paddle/fluid/framework/CMakeLists.txt index 31dfc816be68a99422e68bb43cfead9823cd9954..40530c49ca78cea23368c83dee02a940093f3c52 100755 --- a/paddle/fluid/framework/CMakeLists.txt +++ b/paddle/fluid/framework/CMakeLists.txt @@ -729,7 +729,8 @@ if(WITH_DISTRIBUTE) section_worker.cc device_worker_factory.cc data_set.cc - DEPS fleet_wrapper + DEPS fleet_executor + fleet_wrapper recurrent_op_helper op_registry device_context @@ -836,6 +837,7 @@ if(WITH_DISTRIBUTE) fleet heter_server brpc + fleet_executor phi) set(DISTRIBUTE_COMPILE_FLAGS "") if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0) @@ -905,7 +907,8 @@ if(WITH_DISTRIBUTE) graph_to_program_pass variable_helper timer - monitor) + monitor + fleet_executor) endif() elseif(WITH_PSLIB) set(DISTRIBUTE_COMPILE_FLAGS "") @@ -966,6 +969,7 @@ elseif(WITH_PSLIB) variable_helper timer monitor + fleet_executor ${BRPC_DEP}) else() cc_library( @@ -1013,7 +1017,8 @@ else() graph_to_program_pass variable_helper timer - monitor) + monitor + fleet_executor) endif() target_link_libraries(executor while_op_helper executor_gc_helper diff --git a/paddle/fluid/inference/api/CMakeLists.txt b/paddle/fluid/inference/api/CMakeLists.txt index d5850625724fba5ed465bc7dacda5bcf0be3f2de..24467c1f489232afc5f589b15bfe88f21ea9db9d 100755 --- a/paddle/fluid/inference/api/CMakeLists.txt +++ b/paddle/fluid/inference/api/CMakeLists.txt @@ -80,20 +80,14 @@ if(WITH_ONNXRUNTIME) infer_io_utils model_utils onnxruntime - paddle2onnx - fleet_executor) + paddle2onnx) else() cc_library( analysis_predictor SRCS analysis_predictor.cc resource_manager.cc infer_context.cc ${mkldnn_quantizer_src} - DEPS ${inference_deps} - zero_copy_tensor - ir_pass_manager - op_compatible_info - infer_io_utils - model_utils - fleet_executor) + DEPS ${inference_deps} zero_copy_tensor ir_pass_manager op_compatible_info + infer_io_utils model_utils) endif() if(WITH_ONNXRUNTIME AND WIN32) diff --git a/paddle/fluid/inference/utils/CMakeLists.txt b/paddle/fluid/inference/utils/CMakeLists.txt index 3eb2f0d53796baac96c8a4ba6646eb5103b43411..7abd7c25b807aeeb06299eb7ad5ac468444ec6bc 100644 --- a/paddle/fluid/inference/utils/CMakeLists.txt +++ b/paddle/fluid/inference/utils/CMakeLists.txt @@ -11,8 +11,7 @@ cc_library( model_utils SRCS model_utils.cc DEPS proto_desc enforce) -cc_test_old(infer_io_utils_tester SRCS io_utils_tester.cc DEPS infer_io_utils - fleet_executor) +cc_test_old(infer_io_utils_tester SRCS io_utils_tester.cc DEPS infer_io_utils) if(WITH_ONNXRUNTIME AND WIN32) # Copy onnxruntime for some c++ test in Windows, since the test will diff --git a/paddle/fluid/operators/tensorrt/CMakeLists.txt b/paddle/fluid/operators/tensorrt/CMakeLists.txt index 61f7bb19a9b8d5f21d402106c394fd6544c5b939..0d731b14c6a97aea36fcc8b13cb9c94f011bc9fa 100644 --- a/paddle/fluid/operators/tensorrt/CMakeLists.txt +++ b/paddle/fluid/operators/tensorrt/CMakeLists.txt @@ -1,11 +1,9 @@ -set(tensorrt_engine_op_deps tensorrt_engine tensorrt_converter infer_io_utils - analysis_helper) - -op_library(tensorrt_engine_op DEPS ${tensorrt_engine_op_deps}) +op_library(tensorrt_engine_op DEPS tensorrt_engine tensorrt_converter + infer_io_utils analysis_helper) nv_test( test_tensorrt_engine_op SRCS tensorrt_engine_op_test.cc - DEPS tensorrt_engine_op analysis fleet_executor) + DEPS tensorrt_engine_op analysis) if(WITH_ONNXRUNTIME AND WIN32) # Copy onnxruntime for some c++ test in Windows, since the test will diff --git a/test/cpp/fluid/CMakeLists.txt b/test/cpp/fluid/CMakeLists.txt index 3f3140373bc4b7f60d2631ee865706b0bee53246..e40c01f628e9fee7c2a44f0dc549320f9058fb61 100644 --- a/test/cpp/fluid/CMakeLists.txt +++ b/test/cpp/fluid/CMakeLists.txt @@ -109,7 +109,6 @@ cc_test_old( op_debug_string_test.cc DEPS executor - fleet_executor recurrent_op_helper recurrent_op elementwise_add_op