Skip to content

Commit fb077c1

Browse files
committed
add shared library for analysis
1 parent f3b7e18 commit fb077c1

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

paddle/fluid/framework/ir/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ cc_test(graph_helper_test SRCS graph_helper_test.cc DEPS graph graph_helper op_r
1818
cc_test(graph_to_program_pass_test SRCS graph_to_program_pass_test.cc DEPS graph_to_program_pass)
1919
cc_test(test_graph_pattern_detector SRCS graph_pattern_detector_tester.cc DEPS graph_pattern_detector)
2020
cc_test(test_fc_fuse_pass SRCS fc_fuse_pass_tester.cc DEPS fc_fuse_pass graph_pattern_detector graph pass graph_traits framework_proto)
21+
set(GLOB_PASS_LIB fc_fuse_pass attention_lstm_fuse_pass infer_clean_graph_pass fc_lstm_fuse_pass seq_concat_fc_fuse_pass)

paddle/fluid/inference/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ set(FLUID_CORE_MODULES proto_desc memory lod_tensor executor)
1010
# TODO(panyx0718): Should this be called paddle_fluid_inference_api_internal?
1111
cc_library(paddle_fluid_api
1212
SRCS io.cc
13-
DEPS ${FLUID_CORE_MODULES} ${GLOB_OP_LIB} graph_to_program_pass)
13+
DEPS ${FLUID_CORE_MODULES} ${GLOB_OP_LIB} ${GLOB_PASS_LIB})
1414

1515
get_property(fluid_modules GLOBAL PROPERTY FLUID_MODULES)
1616

@@ -32,6 +32,7 @@ endif()
3232
# Create shared library
3333
cc_library(paddle_fluid_shared SHARED
3434
SRCS io.cc ${CMAKE_CURRENT_SOURCE_DIR}/api/api.cc ${CMAKE_CURRENT_SOURCE_DIR}/api/api_impl.cc
35+
${CMAKE_CURRENT_SOURCE_DIR}/api/analysis_predictor.cc
3536
DEPS ${fluid_modules} paddle_fluid_api)
3637

3738
set_target_properties(paddle_fluid_shared PROPERTIES OUTPUT_NAME paddle_fluid)

paddle/fluid/inference/api/CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ if(APPLE)
1818
endif(APPLE)
1919

2020

21-
set(inference_deps paddle_inference_api paddle_fluid_api analysis pass ir_pass_manager
22-
graph_viz_pass fc_fuse_pass
23-
infer_clean_graph_pass
24-
)
21+
set(inference_deps paddle_inference_api paddle_fluid_api analysis pass ir_pass_manager ${GLOB_PASS_LIB})
2522

2623
if(WITH_GPU AND TENSORRT_FOUND)
2724
set(inference_deps ${inference_deps} paddle_inference_tensorrt_subgraph_engine)

paddle/fluid/inference/api/analysis_predictor.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,5 +135,8 @@ std::unique_ptr<PaddlePredictor> CreatePaddlePredictor<
135135
} // namespace paddle
136136

137137
USE_PASS(fc_fuse_pass);
138+
USE_PASS(seq_concat_fc_fuse_pass);
139+
USE_PASS(fc_lstm_fuse_pass);
138140
USE_PASS(graph_viz_pass);
139141
USE_PASS(infer_clean_graph_pass);
142+
USE_PASS(attention_lstm_fuse_pass);
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
global:
33
*paddle*;
4+
*Pass*;
45
local:
56
*;
67
};

0 commit comments

Comments
 (0)