Skip to content

Commit

Permalink
more pass
Browse files Browse the repository at this point in the history
  • Loading branch information
b3602sss committed Feb 22, 2022
1 parent 6c5e81e commit 6a14a4f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 209 deletions.
45 changes: 21 additions & 24 deletions paddle/fluid/inference/api/paddle_pass_builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,10 @@ void PaddlePassBuilder::ClearPasses() { passes_.clear(); }

const std::vector<std::string> kTRTSubgraphPasses({
"adaptive_pool2d_convert_global_pass",
"conv_eltwiseadd_affine_channel_fuse_pass", //
"shuffle_channel_detect_pass", //
"quant_conv2d_dequant_fuse_pass", //
"delete_quant_dequant_op_pass", //
"delete_quant_dequant_filter_op_pass", //
"shuffle_channel_detect_pass", //
"quant_conv2d_dequant_fuse_pass", //
"delete_quant_dequant_op_pass", //
"delete_quant_dequant_filter_op_pass", //
// "fc_fuse_pass", //
"simplify_with_basic_ops_pass", //
"embedding_eltwise_layernorm_fuse_pass", //
Expand Down Expand Up @@ -133,21 +132,20 @@ const std::vector<std::string> kLiteSubgraphPasses({
GpuPassStrategy::GpuPassStrategy() : PassStrategy({}) {
passes_.assign({
// "identity_scale_op_clean_pass", //
"is_test_pass", //
"simplify_with_basic_ops_pass", //
"conv_eltwiseadd_affine_channel_fuse_pass", //
"conv_bn_fuse_pass", //
"conv_eltwiseadd_bn_fuse_pass", //
"embedding_eltwise_layernorm_fuse_pass", //
"multihead_matmul_fuse_pass_v2", //
"gpu_cpu_squeeze2_matmul_fuse_pass", //
"gpu_cpu_reshape2_matmul_fuse_pass", //
"gpu_cpu_flatten2_matmul_fuse_pass", //
"gpu_cpu_map_matmul_v2_to_mul_pass", //
"gpu_cpu_map_matmul_v2_to_matmul_pass", //
"gpu_cpu_map_matmul_to_mul_pass", //
"fc_fuse_pass", //
"fc_elementwise_layernorm_fuse_pass", //
"is_test_pass", //
"simplify_with_basic_ops_pass", //
"conv_bn_fuse_pass", //
"conv_eltwiseadd_bn_fuse_pass", //
"embedding_eltwise_layernorm_fuse_pass", //
"multihead_matmul_fuse_pass_v2", //
"gpu_cpu_squeeze2_matmul_fuse_pass", //
"gpu_cpu_reshape2_matmul_fuse_pass", //
"gpu_cpu_flatten2_matmul_fuse_pass", //
"gpu_cpu_map_matmul_v2_to_mul_pass", //
"gpu_cpu_map_matmul_v2_to_matmul_pass", //
"gpu_cpu_map_matmul_to_mul_pass", //
"fc_fuse_pass", //
"fc_elementwise_layernorm_fuse_pass", //
#if CUDNN_VERSION >= 7100 // To run conv_fusion, the version of cudnn must be
// guaranteed at least v7
// cudnn8.0 has memory leak problem in conv + eltwise + act, so we
Expand Down Expand Up @@ -237,10 +235,9 @@ void CpuPassStrategy::EnableMKLDNN() {
"depthwise_conv_mkldnn_pass", //
"conv_bn_fuse_pass", // Execute BN passes again to
"conv_eltwiseadd_bn_fuse_pass", // preserve correct pass order
"conv_eltwiseadd_affine_channel_fuse_pass", //
"conv_transpose_bn_fuse_pass", //
"conv_transpose_eltwiseadd_bn_fuse_pass", //
"conv_bias_mkldnn_fuse_pass", //
"conv_transpose_bn_fuse_pass", //
"conv_transpose_eltwiseadd_bn_fuse_pass", //
"conv_bias_mkldnn_fuse_pass", //
"conv_transpose_bias_mkldnn_fuse_pass",
// TODO(baoachun): Need to support 5-dimensional input.
// "conv3d_bias_mkldnn_fuse_pass", //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,6 @@ def _optimize_fp32_graph(self, graph):
graph = self._apply_pass(graph, 'depthwise_conv_mkldnn_pass')
graph = self._apply_pass(graph, 'conv_bn_fuse_pass')
graph = self._apply_pass(graph, 'conv_eltwiseadd_bn_fuse_pass')
graph = self._apply_pass(graph,
'conv_eltwiseadd_affine_channel_fuse_pass')
graph = self._apply_pass(graph, 'conv_transpose_bn_fuse_pass')
graph = self._apply_pass(graph,
'conv_transpose_eltwiseadd_bn_fuse_pass')
Expand Down

This file was deleted.

1 comment on commit 6a14a4f

@paddle-bot-old
Copy link

@paddle-bot-old paddle-bot-old bot commented on 6a14a4f Feb 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵️ CI failures summary

🔍 PR: #39817 Commit ID: 6a14a4f contains failed CI.

🔹 Failed: PR-CI-Coverage

Unknown Failed
2022-03-01 13:11:07 Makefile:140: recipe for target 'all' failed
2022-03-01 13:11:07 make: *** [all] Error 2
2022-03-01 13:11:07 + build_error=2
2022-03-01 13:11:07 + collect_ccache_hits
2022-03-01 13:11:07 ++ ccache -s
2022-03-01 13:11:07 ++ grep 'cache hit rate'
2022-03-01 13:11:07 ++ awk '{print $4}'
2022-03-01 13:11:11 + rate=88.89
2022-03-01 13:11:11 + echo 'ccache hit rate: 88.89%'
2022-03-01 13:11:11 ccache hit rate: 88.89%
2022-03-01 13:11:11 + echo 'ipipe_log_param_Ccache_Hit_Rate: 88.89%'
2022-03-01 13:11:11 + '[' 2 '!=' 0 ']'
2022-03-01 13:11:11 + exit 7
2022-03-01 13:11:11 + EXCODE=7
2022-03-01 13:11:11 + '[' 7 -eq 0 ']'
2022-03-01 13:11:11 + set +x
2022-03-01 13:11:11 Sorry, build failed.
2022-03-01 13:11:11 + exit 7
2022-03-01 13:11:11 {build code state=7}

Please sign in to comment.