From 415b261555de939c7620dc8bcec94107160998d0 Mon Sep 17 00:00:00 2001 From: Tomasz Patejko Date: Thu, 18 Oct 2018 15:51:04 +0200 Subject: [PATCH] MKLDNN conv + elementwise_add fusion: fusion options added --- .../fluid/framework/ir/conv_elementwise_add_mkldnn_fuse_pass.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/paddle/fluid/framework/ir/conv_elementwise_add_mkldnn_fuse_pass.cc b/paddle/fluid/framework/ir/conv_elementwise_add_mkldnn_fuse_pass.cc index 2612a10415..7aad9de1be 100644 --- a/paddle/fluid/framework/ir/conv_elementwise_add_mkldnn_fuse_pass.cc +++ b/paddle/fluid/framework/ir/conv_elementwise_add_mkldnn_fuse_pass.cc @@ -81,6 +81,8 @@ graph_ptr ConvElementwiseAddMKLDNNFusePass::ApplyImpl(graph_ptr graph) const { GET_IR_NODE_FROM_SUBGRAPH(elementwise_add_out, elementwise_add_out, elementwise_add_pattern); + if (FindFuseOption(conv_op, elementwise_add_op) != FUSE_MKLDNN) return; + OpDesc op_desc; op_desc.SetType("conv2d"); -- GitLab