Skip to content

Commit ae8f260

Browse files
committed
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into fix_demo_ci_trt
test=develop
2 parents b970c6d + 6b4056b commit ae8f260

File tree

136 files changed

+8356
-1177
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+8356
-1177
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ set(THIRD_PARTY_PATH "${CMAKE_BINARY_DIR}/third_party" CACHE STRING
127127
set(FLUID_INSTALL_DIR "${CMAKE_BINARY_DIR}/fluid_install_dir" CACHE STRING
128128
"A path setting fluid shared and static libraries")
129129

130+
set(FLUID_INFERENCE_INSTALL_DIR "${CMAKE_BINARY_DIR}/fluid_inference_install_dir" CACHE STRING
131+
"A path setting fluid inference shared and static libraries")
132+
130133
if (WITH_C_API AND WITH_PYTHON)
131134
message(WARNING "It is suggest not embedded a python interpreter in Paddle "
132135
"when using C-API. It will give an unpredictable behavior when using a "

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33

44
[![Build Status](https://travis-ci.org/PaddlePaddle/Paddle.svg?branch=develop)](https://travis-ci.org/PaddlePaddle/Paddle)
5-
[![Documentation Status](https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat)](http://www.paddlepaddle.org/docs/develop/documentation/en/getstarted/index_en.html)
6-
[![Documentation Status](https://img.shields.io/badge/中文文档-最新-brightgreen.svg)](http://www.paddlepaddle.org/docs/develop/documentation/zh/getstarted/index_cn.html)
5+
[![Documentation Status](https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat)](http://paddlepaddle.org/documentation/docs/en/1.0/getstarted/index_en.html)
6+
[![Documentation Status](https://img.shields.io/badge/中文文档-最新-brightgreen.svg)](http://paddlepaddle.org/documentation/docs/zh/1.0/beginners_guide/index.html)
77
[![Release](https://img.shields.io/github/release/PaddlePaddle/Paddle.svg)](https://github.com/PaddlePaddle/Paddle/releases)
88
[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](LICENSE)
99

@@ -19,17 +19,17 @@ Our vision is to enable deep learning for everyone via PaddlePaddle.
1919
Please refer to our [release announcement](https://github.com/PaddlePaddle/Paddle/releases) to track the latest feature of PaddlePaddle.
2020

2121

22-
### Latest PaddlePaddle Release: [Fluid 0.15.0](https://github.com/PaddlePaddle/Paddle/tree/v0.15.0)
22+
### Latest PaddlePaddle Release: [Fluid 1.0.1](https://github.com/PaddlePaddle/Paddle/tree/release/1.0.0)
2323
### Install Latest Stable Release:
2424
```
2525
# Linux CPU
2626
pip install paddlepaddle
2727
# Linux GPU cuda9cudnn7
2828
pip install paddlepaddle-gpu
2929
# Linux GPU cuda8cudnn7
30-
pip install paddlepaddle-gpu==0.15.0.post87
30+
pip install paddlepaddle-gpu==1.0.1.post87
3131
# Linux GPU cuda8cudnn5
32-
pip install paddlepaddle-gpu==0.15.0.post85
32+
pip install paddlepaddle-gpu==1.0.1.post85
3333
3434
# For installation on other platform, refer to http://paddlepaddle.org/
3535
```
@@ -76,26 +76,26 @@ pip install paddlepaddle-gpu==0.15.0.post85
7676

7777
## Installation
7878

79-
It is recommended to read [this doc](http://paddlepaddle.org/documentation/docs/zh/0.15.0/new_docs/beginners_guide/install/install_doc.html) on our website.
79+
It is recommended to read [this doc](http://paddlepaddle.org/documentation/docs/zh/1.0/beginners_guide/index.html) on our website.
8080

8181
## Documentation
8282

83-
We provide [English](http://paddlepaddle.org/documentation/docs/en/0.15.0/getstarted/index_en.html) and
84-
[Chinese](http://paddlepaddle.org/documentation/docs/zh/0.15.0/new_docs/beginners_guide/index.html) documentation.
83+
We provide [English](http://paddlepaddle.org/documentation/docs/en/1.0.0/getstarted/index_en.html) and
84+
[Chinese](http://paddlepaddle.org/documentation/docs/zh/1.0/beginners_guide/index.html) documentation.
8585

8686
- [Deep Learning 101](https://github.com/PaddlePaddle/book)
8787

8888
You might want to start from this online interactive book that can run in a Jupyter Notebook.
8989

90-
- [Distributed Training](http://paddlepaddle.org/documentation/docs/zh/0.15.0/new_docs/user_guides/howto/training/cluster_howto.html)
90+
- [Distributed Training](http://paddlepaddle.org/documentation/docs/zh/1.0/user_guides/howto/training/cluster_howto.html)
9191

9292
You can run distributed training jobs on MPI clusters.
9393

94-
- [Python API](http://paddlepaddle.org/documentation/api/zh/0.15.0/fluid.html)
94+
- [Python API](http://paddlepaddle.org/documentation/api/zh/1.0/fluid.html)
9595

9696
Our new API enables much shorter programs.
9797

98-
- [How to Contribute](http://paddlepaddle.org/documentation/docs/zh/0.15.0/new_docs/advanced_usage/development/contribute_to_paddle.html)
98+
- [How to Contribute](http://paddlepaddle.org/documentation/docs/zh/1.0/advanced_usage/development/contribute_to_paddle.html)
9999

100100
We appreciate your contributions!
101101

benchmark/fluid/run.sh

100644100755
File mode changed.

cmake/generic.cmake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,13 @@ function(cc_library TARGET_NAME)
261261
add_dependencies(${TARGET_NAME} mklml)
262262
target_link_libraries(${TARGET_NAME} "-L${MKLML_LIB_DIR} -liomp5 -Wl,--as-needed")
263263
endif()
264+
# remove link to python, see notes at:
265+
# https://github.com/pybind/pybind11/blob/master/docs/compiling.rst#building-manually
266+
if("${cc_library_DEPS};" MATCHES "python;")
267+
list(REMOVE_ITEM cc_library_DEPS python)
268+
add_dependencies(${TARGET_NAME} python)
269+
target_link_libraries(${TARGET_NAME} "-Wl,-undefined,dynamic_lookup")
270+
endif()
264271
target_link_libraries(${TARGET_NAME} ${cc_library_DEPS})
265272
add_dependencies(${TARGET_NAME} ${cc_library_DEPS})
266273
endif()
@@ -311,6 +318,8 @@ function(cc_test TARGET_NAME)
311318
set_property(TEST ${TARGET_NAME} PROPERTY ENVIRONMENT FLAGS_cpu_deterministic=true)
312319
set_property(TEST ${TARGET_NAME} PROPERTY ENVIRONMENT FLAGS_init_allocated_mem=true)
313320
set_property(TEST ${TARGET_NAME} PROPERTY ENVIRONMENT FLAGS_cudnn_deterministic=true)
321+
# No unit test should exceed 10 minutes.
322+
set_tests_properties(${TARGET_NAME} PROPERTIES TIMEOUT 600)
314323
endif()
315324
endfunction(cc_test)
316325

@@ -629,6 +638,8 @@ function(py_test TARGET_NAME)
629638
PYTHONPATH=${PADDLE_BINARY_DIR}/python ${py_test_ENVS}
630639
${PYTHON_EXECUTABLE} -u ${py_test_SRCS} ${py_test_ARGS}
631640
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
641+
# No unit test should exceed 10 minutes.
642+
set_tests_properties(${TARGET_NAME} PROPERTIES TIMEOUT 600)
632643
endif()
633644
endfunction()
634645

cmake/inference_lib.cmake

Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -150,16 +150,16 @@ if (WITH_ANAKIN AND WITH_MKL)
150150
SRCS
151151
${PADDLE_BINARY_DIR}/paddle/fluid/inference/api/libinference_anakin_api* # compiled anakin api
152152
${ANAKIN_INSTALL_DIR} # anakin release
153-
DSTS ${dst_dir}/inference/anakin ${FLUID_INSTALL_DIR}/third_party/install/anakin)
153+
DSTS ${FLUID_INSTALL_DIR}/third_party/install/anakin ${FLUID_INSTALL_DIR}/third_party/install/anakin)
154154
list(APPEND inference_deps anakin_inference_lib)
155155
endif()
156156

157157
set(module "inference")
158158
copy(inference_lib DEPS ${inference_deps}
159159
SRCS ${src_dir}/${module}/*.h ${PADDLE_BINARY_DIR}/paddle/fluid/inference/libpaddle_fluid.*
160-
${src_dir}/${module}/api/paddle_inference_api.h ${src_dir}/${module}/api/demo_ci
160+
${src_dir}/${module}/api/paddle_inference_api.h
161161
${PADDLE_BINARY_DIR}/paddle/fluid/inference/api/paddle_inference_pass.h
162-
DSTS ${dst_dir}/${module} ${dst_dir}/${module} ${dst_dir}/${module} ${dst_dir}/${module} ${dst_dir}/${module}
162+
DSTS ${dst_dir}/${module} ${dst_dir}/${module} ${dst_dir}/${module} ${dst_dir}/${module}
163163
)
164164

165165
set(module "platform")
@@ -188,18 +188,38 @@ copy(cmake_cache
188188
# This command generates a complete fluid library for both train and inference
189189
add_custom_target(fluid_lib_dist DEPENDS ${fluid_lib_dist_dep})
190190

191+
# Following commands generate a inference-only fluid library
192+
# third_party, version.txt and CMakeCache.txt are the same position with ${FLUID_INSTALL_DIR}
193+
copy(third_party DEPS fluid_lib_dist
194+
SRCS ${FLUID_INSTALL_DIR}/third_party ${FLUID_INSTALL_DIR}/CMakeCache.txt
195+
DSTS ${FLUID_INFERENCE_INSTALL_DIR} ${FLUID_INFERENCE_INSTALL_DIR}
196+
)
197+
198+
# only need libpaddle_fluid.so/a and paddle_inference_api.h for inference-only library
199+
copy(inference_api_lib DEPS fluid_lib_dist
200+
SRCS ${FLUID_INSTALL_DIR}/paddle/fluid/inference/libpaddle_fluid.*
201+
${FLUID_INSTALL_DIR}/paddle/fluid/inference/paddle_inference_api.h
202+
DSTS ${FLUID_INFERENCE_INSTALL_DIR}/paddle/lib ${FLUID_INFERENCE_INSTALL_DIR}/paddle/include
203+
)
204+
205+
add_custom_target(inference_lib_dist DEPENDS third_party inference_api_lib)
206+
191207
# paddle fluid version
192-
execute_process(
193-
COMMAND ${GIT_EXECUTABLE} log --pretty=format:%H -1
194-
WORKING_DIRECTORY ${PADDLE_SOURCE_DIR}
195-
OUTPUT_VARIABLE PADDLE_GIT_COMMIT)
196-
set(version_file ${FLUID_INSTALL_DIR}/version.txt)
197-
file(WRITE ${version_file}
198-
"GIT COMMIT ID: ${PADDLE_GIT_COMMIT}\n"
199-
"WITH_MKL: ${WITH_MKL}\n"
200-
"WITH_GPU: ${WITH_GPU}\n")
201-
if(WITH_GPU)
202-
file(APPEND ${version_file}
203-
"CUDA version: ${CUDA_VERSION}\n"
204-
"CUDNN version: v${CUDNN_MAJOR_VERSION}\n")
205-
endif()
208+
function(version version_file)
209+
execute_process(
210+
COMMAND ${GIT_EXECUTABLE} log --pretty=format:%H -1
211+
WORKING_DIRECTORY ${PADDLE_SOURCE_DIR}
212+
OUTPUT_VARIABLE PADDLE_GIT_COMMIT)
213+
file(WRITE ${version_file}
214+
"GIT COMMIT ID: ${PADDLE_GIT_COMMIT}\n"
215+
"WITH_MKL: ${WITH_MKL}\n"
216+
"WITH_MKLDNN: ${WITH_MKLDNN}\n"
217+
"WITH_GPU: ${WITH_GPU}\n")
218+
if(WITH_GPU)
219+
file(APPEND ${version_file}
220+
"CUDA version: ${CUDA_VERSION}\n"
221+
"CUDNN version: v${CUDNN_MAJOR_VERSION}\n")
222+
endif()
223+
endfunction()
224+
version(${FLUID_INSTALL_DIR}/version.txt)
225+
version(${FLUID_INFERENCE_INSTALL_DIR}/version.txt)

paddle/fluid/API.spec

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ paddle.fluid.layers.cos_sim ArgSpec(args=['X', 'Y'], varargs=None, keywords=None
6161
paddle.fluid.layers.cross_entropy ArgSpec(args=['input', 'label', 'soft_label', 'ignore_index'], varargs=None, keywords=None, defaults=(False, -100))
6262
paddle.fluid.layers.square_error_cost ArgSpec(args=['input', 'label'], varargs=None, keywords=None, defaults=None)
6363
paddle.fluid.layers.chunk_eval ArgSpec(args=['input', 'label', 'chunk_scheme', 'num_chunk_types', 'excluded_chunk_types'], varargs=None, keywords=None, defaults=(None,))
64-
paddle.fluid.layers.sequence_conv ArgSpec(args=['input', 'num_filters', 'filter_size', 'filter_stride', 'padding', 'bias_attr', 'param_attr', 'act'], varargs=None, keywords=None, defaults=(3, 1, None, None, None, None))
64+
paddle.fluid.layers.sequence_conv ArgSpec(args=['input', 'num_filters', 'filter_size', 'filter_stride', 'padding', 'bias_attr', 'param_attr', 'act', 'name'], varargs=None, keywords=None, defaults=(3, 1, None, None, None, None, None))
6565
paddle.fluid.layers.conv2d ArgSpec(args=['input', 'num_filters', 'filter_size', 'stride', 'padding', 'dilation', 'groups', 'param_attr', 'bias_attr', 'use_cudnn', 'act', 'name'], varargs=None, keywords=None, defaults=(1, 0, 1, None, None, None, True, None, None))
6666
paddle.fluid.layers.conv3d ArgSpec(args=['input', 'num_filters', 'filter_size', 'stride', 'padding', 'dilation', 'groups', 'param_attr', 'bias_attr', 'use_cudnn', 'act', 'name'], varargs=None, keywords=None, defaults=(1, 0, 1, None, None, None, True, None, None))
6767
paddle.fluid.layers.sequence_pool ArgSpec(args=['input', 'pool_type'], varargs=None, keywords=None, defaults=None)
68-
paddle.fluid.layers.sequence_softmax ArgSpec(args=['input', 'param_attr', 'bias_attr', 'use_cudnn'], varargs=None, keywords=None, defaults=(None, None, False))
69-
paddle.fluid.layers.softmax ArgSpec(args=['input', 'param_attr', 'bias_attr', 'use_cudnn', 'name'], varargs=None, keywords=None, defaults=(None, None, True, None))
68+
paddle.fluid.layers.sequence_softmax ArgSpec(args=['input', 'use_cudnn', 'name'], varargs=None, keywords=None, defaults=(False, None))
69+
paddle.fluid.layers.softmax ArgSpec(args=['input', 'use_cudnn', 'name'], varargs=None, keywords=None, defaults=(True, None))
7070
paddle.fluid.layers.pool2d ArgSpec(args=['input', 'pool_size', 'pool_type', 'pool_stride', 'pool_padding', 'global_pooling', 'use_cudnn', 'ceil_mode', 'name'], varargs=None, keywords=None, defaults=(-1, 'max', 1, 0, False, True, False, None))
7171
paddle.fluid.layers.pool3d ArgSpec(args=['input', 'pool_size', 'pool_type', 'pool_stride', 'pool_padding', 'global_pooling', 'use_cudnn', 'ceil_mode', 'name'], varargs=None, keywords=None, defaults=(-1, 'max', 1, 0, False, True, False, None))
7272
paddle.fluid.layers.batch_norm ArgSpec(args=['input', 'act', 'is_test', 'momentum', 'epsilon', 'param_attr', 'bias_attr', 'data_layout', 'in_place', 'name', 'moving_mean_name', 'moving_variance_name', 'do_model_average_for_mean_and_var', 'fuse_with_relu'], varargs=None, keywords=None, defaults=(None, False, 0.9, 1e-05, None, None, 'NCHW', False, None, None, None, False, False))
@@ -97,8 +97,8 @@ paddle.fluid.layers.warpctc ArgSpec(args=['input', 'label', 'blank', 'norm_by_ti
9797
paddle.fluid.layers.sequence_reshape ArgSpec(args=['input', 'new_dim'], varargs=None, keywords=None, defaults=None)
9898
paddle.fluid.layers.transpose ArgSpec(args=['x', 'perm', 'name'], varargs=None, keywords=None, defaults=(None,))
9999
paddle.fluid.layers.im2sequence ArgSpec(args=['input', 'filter_size', 'stride', 'padding', 'input_image_size', 'out_stride', 'name'], varargs=None, keywords=None, defaults=(1, 1, 0, None, 1, None))
100-
paddle.fluid.layers.nce ArgSpec(args=['input', 'label', 'num_total_classes', 'sample_weight', 'param_attr', 'bias_attr', 'num_neg_samples'], varargs=None, keywords=None, defaults=(None, None, None, None))
101-
paddle.fluid.layers.hsigmoid ArgSpec(args=['input', 'label', 'num_classes', 'param_attr', 'bias_attr'], varargs=None, keywords=None, defaults=(None, None))
100+
paddle.fluid.layers.nce ArgSpec(args=['input', 'label', 'num_total_classes', 'sample_weight', 'param_attr', 'bias_attr', 'num_neg_samples', 'name'], varargs=None, keywords=None, defaults=(None, None, None, None, None))
101+
paddle.fluid.layers.hsigmoid ArgSpec(args=['input', 'label', 'num_classes', 'param_attr', 'bias_attr', 'name'], varargs=None, keywords=None, defaults=(None, None, None))
102102
paddle.fluid.layers.beam_search ArgSpec(args=['pre_ids', 'pre_scores', 'ids', 'scores', 'beam_size', 'end_id', 'level', 'name'], varargs=None, keywords=None, defaults=(0, None))
103103
paddle.fluid.layers.row_conv ArgSpec(args=['input', 'future_context_size', 'param_attr', 'act'], varargs=None, keywords=None, defaults=(None, None))
104104
paddle.fluid.layers.multiplex ArgSpec(args=['inputs', 'index'], varargs=None, keywords=None, defaults=None)
@@ -116,6 +116,7 @@ paddle.fluid.layers.pad ArgSpec(args=['x', 'paddings', 'pad_value', 'name'], var
116116
paddle.fluid.layers.pad_constant_like ArgSpec(args=['x', 'y', 'pad_value', 'name'], varargs=None, keywords=None, defaults=(0.0, None))
117117
paddle.fluid.layers.label_smooth ArgSpec(args=['label', 'prior_dist', 'epsilon', 'dtype', 'name'], varargs=None, keywords=None, defaults=(None, 0.1, 'float32', None))
118118
paddle.fluid.layers.roi_pool ArgSpec(args=['input', 'rois', 'pooled_height', 'pooled_width', 'spatial_scale'], varargs=None, keywords=None, defaults=(1, 1, 1.0))
119+
paddle.fluid.layers.roi_align ArgSpec(args=['input', 'rois', 'pooled_height', 'pooled_width', 'spatial_scale', 'sampling_ratio', 'name'], varargs=None, keywords=None, defaults=(1, 1, 1.0, -1, None))
119120
paddle.fluid.layers.dice_loss ArgSpec(args=['input', 'label', 'epsilon'], varargs=None, keywords=None, defaults=(1e-05,))
120121
paddle.fluid.layers.image_resize ArgSpec(args=['input', 'out_shape', 'scale', 'name', 'resample'], varargs=None, keywords=None, defaults=(None, None, None, 'BILINEAR'))
121122
paddle.fluid.layers.image_resize_short ArgSpec(args=['input', 'out_short_len', 'resample'], varargs=None, keywords=None, defaults=('BILINEAR',))
@@ -173,6 +174,7 @@ paddle.fluid.layers.mean ArgSpec(args=['x', 'name'], varargs=None, keywords=None
173174
paddle.fluid.layers.mul ArgSpec(args=['x', 'y', 'x_num_col_dims', 'y_num_col_dims', 'name'], varargs=None, keywords=None, defaults=(1, 1, None))
174175
paddle.fluid.layers.sigmoid_cross_entropy_with_logits ArgSpec(args=['x', 'label', 'name'], varargs=None, keywords=None, defaults=(None,))
175176
paddle.fluid.layers.maxout ArgSpec(args=['x', 'groups', 'name'], varargs=None, keywords=None, defaults=(None,))
177+
paddle.fluid.layers.affine_channel ArgSpec(args=['x', 'scale', 'bias', 'data_layout', 'name'], varargs=None, keywords=None, defaults=(None, None, 'NCHW', None))
176178
paddle.fluid.layers.data ArgSpec(args=['name', 'shape', 'append_batch_size', 'dtype', 'lod_level', 'type', 'stop_gradient'], varargs=None, keywords=None, defaults=(True, 'float32', 0, VarType.LOD_TENSOR, True))
177179
paddle.fluid.layers.open_files ArgSpec(args=['filenames', 'shapes', 'lod_levels', 'dtypes', 'thread_num', 'buffer_size', 'pass_num', 'is_test'], varargs=None, keywords=None, defaults=(None, None, 1, None))
178180
paddle.fluid.layers.read_file ArgSpec(args=['reader'], varargs=None, keywords=None, defaults=None)

paddle/fluid/framework/details/var_handle.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ struct VarHandleBase {
4949

5050
void AddOutput(OpHandleBase* out, ir::Node* node) {
5151
if (pending_ops_.find(out) == pending_ops_.end()) {
52+
PADDLE_ENFORCE(out != nullptr, "The output of %s should not be nullptr",
53+
this->Node()->Name());
5254
pending_ops_.insert(out);
5355
node_->outputs.push_back(node);
5456
}

paddle/fluid/framework/ir/CMakeLists.txt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function(pass_library TARGET DEST)
1010
set(oneValueArgs "")
1111
set(multiValueArgs SRCS DEPS)
1212
cmake_parse_arguments(op_library "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
13-
cc_library(${TARGET} SRCS ${TARGET}.cc DEPS graph_pattern_detector pass ${op_library_DEPS})
13+
cc_library(${TARGET} SRCS ${TARGET}.cc DEPS graph_pattern_detector pass fuse_pass_base ${op_library_DEPS})
1414
# add more DEST here, such as train, dist and collect USE_PASS into a file automatically.
1515
if (${DEST} STREQUAL "base" OR ${DEST} STREQUAL "inference")
1616
message(STATUS "add pass ${TARGET} ${DEST}")
@@ -25,20 +25,25 @@ cc_library(graph_helper SRCS graph_helper.cc DEPS graph)
2525
cc_library(pass SRCS pass.cc DEPS graph node graph_helper)
2626
cc_library(graph_traits SRCS graph_traits.cc DEPS graph)
2727
cc_library(graph_pattern_detector SRCS graph_pattern_detector.cc DEPS graph graph_helper graph_traits)
28+
cc_library(fuse_pass_base SRCS fuse_pass_base.cc DEPS pass)
2829

2930
pass_library(graph_to_program_pass base)
3031
pass_library(graph_viz_pass base)
3132
pass_library(fc_fuse_pass inference)
32-
if (WITH_MKLDNN)
33-
pass_library(conv_relu_mkldnn_fuse_pass inference)
34-
endif ()
3533
pass_library(attention_lstm_fuse_pass inference)
3634
pass_library(infer_clean_graph_pass inference)
3735
pass_library(fc_lstm_fuse_pass inference)
3836
pass_library(embedding_fc_lstm_fuse_pass inference)
3937
pass_library(fc_gru_fuse_pass inference)
4038
pass_library(seq_concat_fc_fuse_pass inference)
4139
pass_library(conv_bn_fuse_pass inference)
40+
pass_library(seqconv_eltadd_relu_fuse_pass inference)
41+
if(WITH_MKLDNN)
42+
pass_library(mkldnn_placement_pass base)
43+
pass_library(conv_bias_mkldnn_fuse_pass inference)
44+
pass_library(conv_relu_mkldnn_fuse_pass inference)
45+
pass_library(conv_elementwise_add_mkldnn_fuse_pass inference)
46+
endif()
4247

4348
cc_library(fuse_elewise_add_act_pass SRCS fuse_elewise_add_act_pass.cc DEPS pass graph_pattern_detector )
4449

@@ -54,4 +59,5 @@ cc_test(test_graph_pattern_detector SRCS graph_pattern_detector_tester.cc DEPS g
5459
cc_test(test_fc_fuse_pass SRCS fc_fuse_pass_tester.cc DEPS fc_fuse_pass framework_proto)
5560
if (WITH_MKLDNN)
5661
cc_test(test_conv_relu_mkldnn_fuse_pass SRCS conv_relu_mkldnn_fuse_pass_tester.cc DEPS conv_relu_mkldnn_fuse_pass)
62+
cc_test(test_conv_elementwise_add_mkldnn_fuse_pass SRCS conv_elementwise_add_mkldnn_fuse_pass_tester.cc DEPS conv_elementwise_add_mkldnn_fuse_pass)
5763
endif ()

paddle/fluid/framework/ir/attention_lstm_fuse_pass.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ std::unique_ptr<ir::Graph> AttentionLSTMFusePass::ApplyImpl(
262262
std::unordered_set<std::string> specified_vars({"data_lod_attention",
263263
"cell_init", "hidden_init",
264264
"data", "week", "minute"});
265-
int count = 0;
265+
size_t count = 0;
266266
for (auto* node : graph->Nodes()) {
267267
if (node->IsVar() && specified_vars.count(node->Name())) {
268268
++count;

0 commit comments

Comments
 (0)