未验证 提交 8b1839be 编写于 作者: H huangjiyi 提交者: GitHub

Fix compile error with C++17 on distribution (#54411)

* “update”

* update

* update

* update

* update

* test

* update
上级 0a704e14
......@@ -25,66 +25,37 @@ cc_library(
task_loop_thread_pool
SRCS task_loop_thread_pool.cc task_loop_thread.cc task_loop.cc
DEPS enforce glog)
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()
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_DISTRIBUTE)
set(DISTRIBUTE_COMPILE_FLAGS
"-Wno-non-virtual-dtor -Wno-error=non-virtual-dtor -Wno-error=delete-non-virtual-dtor"
......
......@@ -729,8 +729,7 @@ if(WITH_DISTRIBUTE)
section_worker.cc
device_worker_factory.cc
data_set.cc
DEPS fleet_executor
fleet_wrapper
DEPS fleet_wrapper
recurrent_op_helper
op_registry
device_context
......@@ -837,7 +836,6 @@ if(WITH_DISTRIBUTE)
fleet
heter_server
brpc
fleet_executor
phi)
set(DISTRIBUTE_COMPILE_FLAGS "")
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
......@@ -907,8 +905,7 @@ if(WITH_DISTRIBUTE)
graph_to_program_pass
variable_helper
timer
monitor
fleet_executor)
monitor)
endif()
elseif(WITH_PSLIB)
set(DISTRIBUTE_COMPILE_FLAGS "")
......@@ -969,7 +966,6 @@ elseif(WITH_PSLIB)
variable_helper
timer
monitor
fleet_executor
${BRPC_DEP})
else()
cc_library(
......@@ -1017,8 +1013,7 @@ else()
graph_to_program_pass
variable_helper
timer
monitor
fleet_executor)
monitor)
endif()
target_link_libraries(executor while_op_helper executor_gc_helper
......
......@@ -80,14 +80,20 @@ if(WITH_ONNXRUNTIME)
infer_io_utils
model_utils
onnxruntime
paddle2onnx)
paddle2onnx
fleet_executor)
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)
DEPS ${inference_deps}
zero_copy_tensor
ir_pass_manager
op_compatible_info
infer_io_utils
model_utils
fleet_executor)
endif()
if(WITH_ONNXRUNTIME AND WIN32)
......
......@@ -11,7 +11,8 @@ 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)
cc_test_old(infer_io_utils_tester SRCS io_utils_tester.cc DEPS infer_io_utils
fleet_executor)
if(WITH_ONNXRUNTIME AND WIN32)
# Copy onnxruntime for some c++ test in Windows, since the test will
......
op_library(tensorrt_engine_op DEPS tensorrt_engine tensorrt_converter
infer_io_utils analysis_helper)
set(tensorrt_engine_op_deps tensorrt_engine tensorrt_converter infer_io_utils
analysis_helper)
op_library(tensorrt_engine_op DEPS ${tensorrt_engine_op_deps})
nv_test(
test_tensorrt_engine_op
SRCS tensorrt_engine_op_test.cc
DEPS tensorrt_engine_op analysis)
DEPS tensorrt_engine_op analysis fleet_executor)
if(WITH_ONNXRUNTIME AND WIN32)
# Copy onnxruntime for some c++ test in Windows, since the test will
......
......@@ -109,6 +109,7 @@ cc_test_old(
op_debug_string_test.cc
DEPS
executor
fleet_executor
recurrent_op_helper
recurrent_op
elementwise_add_op
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册