Skip to content

Commit 5d32c61

Browse files
authored
[cmake治理]cmake optimization of fluid/framework/executor (#59607)
* remove redundant dependencies * remove redundant dependencies
1 parent dba3976 commit 5d32c61

File tree

12 files changed

+20
-63
lines changed

12 files changed

+20
-63
lines changed

cmake/cinn/external/llvm.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ llvm_map_components_to_libnames(
8888
message(STATUS "LLVM libs: ${llvm_libs}")
8989

9090
get_property(mlir_libs GLOBAL PROPERTY MLIR_ALL_LIBS)
91-
message(STATUS "MLIR libs: ${mlir_libs}")
9291
add_definitions(${LLVM_DEFINITIONS})
9392

9493
# The minimum needed libraries for MLIR IR parse and transform.

cmake/cinn/llvm.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ llvm_map_components_to_libnames(
5454
message(STATUS "LLVM libs: ${llvm_libs}")
5555

5656
get_property(mlir_libs GLOBAL PROPERTY MLIR_ALL_LIBS)
57-
message(STATUS "MLIR libs: ${mlir_libs}")
5857
add_definitions(${LLVM_DEFINITIONS})
5958

6059
# The minimum needed libraries for MLIR IR parse and transform.

paddle/cinn/api/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
core_gather_headers()
22

33
gather_srcs(cinnapi_src SRCS op_node.cc tensor_node.cc)
4-
5-
message(STATUS "srcs: ${cinnapi_src}")

paddle/cinn/common/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ gather_srcs(
2424
integer_set.cc
2525
dim_expr_simplify.cc)
2626

27-
message(STATUS "srcs: ${cinnapi_src}")
28-
2927
cinn_cc_test(test_equation_graph_topo_walker SRCS
3028
equation_graph_topo_walker_test.cc DEPS gtest glog)
3129
cinn_cc_test(test_dfs_walker SRCS dfs_walker_test.cc DEPS gtest glog)

paddle/fluid/framework/new_executor/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ set(STANDALONE_EXECUTOR_DEPS
1717
pir_adaptor
1818
program_translator
1919
instruction_base
20-
pir
21-
plan)
20+
pir)
2221

2322
cc_library(
2423
standalone_executor

paddle/fluid/framework/new_executor/instruction/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ cc_library(
1111
tuple_pop_instruction.cc
1212
builtin_combine_instruction.cc
1313
instruction_util.cc
14-
DEPS pir_adaptor phi common framework_proto)
15-
14+
DEPS framework_proto)
15+
if(WITH_MKLDNN)
16+
add_dependencies(instruction_base mkldnn)
17+
endif()
1618
if(WITH_CINN AND NOT CINN_ONLY)
1719
cc_library(
1820
cinn_jit_instruction NOT_FOR_INFER
1921
SRCS cinn_jit_instruction.cc
20-
DEPS phi common cinnapi cinn_op_dialect cinn_runtime_dialect)
22+
DEPS cinnapi cinn_op_dialect cinn_runtime_dialect)
2123
endif()
Lines changed: 10 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,14 @@
1-
set(INTERPRETER_SRCS data_transfer.cc dependency_builder.cc execution_config.cc
2-
interpreter_util.cc static_build.cc stream_analyzer.cc)
1+
set(INTERPRETER_SRCS
2+
data_transfer.cc
3+
dependency_builder.cc
4+
execution_config.cc
5+
interpreter_util.cc
6+
static_build.cc
7+
stream_analyzer.cc
8+
plan.cc)
39

4-
set(INTERPRETER_DEPS
5-
buffered_reader
6-
device_context
7-
global_utils
8-
op_registry
9-
scope
10-
framework_proto
11-
data_feed_proto
12-
ops_extra_info
13-
heter_service_proto
14-
trainer_desc_proto
15-
glog
16-
lod_rank_table
17-
framework_io
18-
string_helper
19-
fleet_wrapper
20-
heter_wrapper
21-
ps_gpu_wrapper
22-
box_wrapper
23-
lodtensor_printer
24-
feed_fetch_method
25-
graph_to_program_pass
26-
variable_helper
27-
timer
28-
monitor
29-
nan_inf_utils
30-
enforce
31-
scope
32-
glog
33-
phi
34-
common
35-
${DEVICE_EVENT_LIBS}
36-
glog)
10+
set(INTERPRETER_DEPS buffered_reader device_context global_utils op_registry
11+
${DEVICE_EVENT_LIBS})
3712

3813
if(WITH_CINN AND NOT CINN_ONLY)
3914
set(INTERPRETER_DEPS ${INTERPRETER_DEPS} cinn_jit_instruction)
@@ -43,8 +18,3 @@ cc_library(
4318
interpreter
4419
SRCS ${INTERPRETER_SRCS}
4520
DEPS standalone_executor ${INTERPRETER_DEPS})
46-
47-
cc_library(
48-
plan
49-
SRCS plan.cc
50-
DEPS proto_desc framework_proto)

paddle/fluid/framework/new_executor/pir_adaptor/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ file(GLOB PIR_ADAPTOR_SRCS "*.cc")
44
cc_library(
55
pir_adaptor
66
SRCS ${PIR_ADAPTOR_SRCS}
7-
DEPS program_translator op_dialect)
7+
DEPS program_translator)
Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1 @@
1-
cc_library(
2-
workqueue_utils
3-
SRCS workqueue_utils.cc events_waiter.cc
4-
DEPS enforce glog common)
5-
cc_library(
6-
workqueue
7-
SRCS workqueue.cc
8-
DEPS workqueue_utils enforce glog phi common)
1+
cc_library(workqueue SRCS workqueue.cc workqueue_utils.cc events_waiter.cc)

paddle/fluid/platform/profiler/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ cc_library(
55
cc_library(
66
cuda_tracer
77
SRCS cuda_tracer.cc cupti_data_process.cc
8-
DEPS enforce glog common workqueue_utils)
8+
DEPS workqueue enforce glog common)
99
cc_library(
1010
xpu_tracer
1111
SRCS xpu_tracer.cc

0 commit comments

Comments
 (0)