We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7509d6 commit c504a5aCopy full SHA for c504a5a
paddle/fluid/framework/ir/conv_bias_mkldnn_fuse_pass.cc
@@ -71,6 +71,13 @@ std::unique_ptr<ir::Graph> ConvBiasFusePass::ApplyImpl(
71
72
PADDLE_ENFORCE(subgraph.count(conv_input));
73
74
+ // check if fuse can be done and if MKL-DNN should be used
75
+ FuseOptions fuse_option = FindFuseOption(*conv, *eltwise);
76
+ if (fuse_option == DO_NOT_FUSE || fuse_option == FUSE_NATIVE) {
77
+ VLOG(3) << "do not perform conv+bias fuse";
78
+ return;
79
+ }
80
+
81
auto* eltwise_bias_tensor =
82
scope->FindVar(eltwise_bias->Name())->GetMutable<LoDTensor>();
83
0 commit comments