open fuse_all_optimizer_ops (#19087)

test=develop
padding_in_crf
chengduo 6 years ago committed by GitHub
parent 1fc242a7ed
commit e044e84264
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -89,7 +89,7 @@ struct BuildStrategy {
bool fuse_elewise_add_act_ops_{false};
// Fuse_all_optimizer_ops and fuse_all_reduce_ops require that gradients
// should not be sparse types
bool fuse_all_optimizer_ops_{false};
bool fuse_all_optimizer_ops_{true};
bool fuse_all_reduce_ops_{false};
// fuse_relu_depthwise_conv can fuse the `relu ->
// depthwise_conv`

@ -65,7 +65,8 @@ class FuseAdamOpPass : public FuseOptimizerOpPass {
for (auto &node : not_need_ctrl_var_nodes) {
// remove this node from the input op node.
PADDLE_ENFORCE(!node->inputs.empty());
PADDLE_ENFORCE(!node->inputs.empty(),
"The input should not be empty here.");
auto op_node = node->inputs.front();
PADDLE_ENFORCE(op_node->IsOp());
op_node->outputs.erase(

Loading…
Cancel
Save