|
|
|
@ -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>();
|
|
|
|
|
|
|
|
|
|