Adjust Conv+bias to placement pass

test=develop
ce
Michal Gallus 7 years ago
parent d7509d63f1
commit c504a5a1b7

@ -71,6 +71,13 @@ std::unique_ptr<ir::Graph> ConvBiasFusePass::ApplyImpl(
PADDLE_ENFORCE(subgraph.count(conv_input));
// check if fuse can be done and if MKL-DNN should be used
FuseOptions fuse_option = FindFuseOption(*conv, *eltwise);
if (fuse_option == DO_NOT_FUSE || fuse_option == FUSE_NATIVE) {
VLOG(3) << "do not perform conv+bias fuse";
return;
}
auto* eltwise_bias_tensor =
scope->FindVar(eltwise_bias->Name())->GetMutable<LoDTensor>();

Loading…
Cancel
Save