Skip to content

Commit

Permalink
remove pass restrictions for skip-ln pass (#32082)
Browse files Browse the repository at this point in the history
  • Loading branch information
cryoco authored Apr 6, 2021
1 parent 3a25588 commit 62c2173
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions paddle/fluid/framework/ir/skip_layernorm_fuse_pass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,6 @@ void SkipLayerNormFusePass::ApplyImpl(ir::Graph *graph) const {
GET_IR_NODE_FROM_SUBGRAPH(layer_norm_variance, layer_norm_variance,
fused_pattern);

// check if is in ernie or not
if (!graph->Has(kEmbEltwiseLayernormPass) ||
!graph->Has(kMultiheadMatmulPass)) {
LOG(INFO) << "The skip_layernorm_fuse_pass is only supported in "
<< "Ernie/Bert model. Just skip this pass.";
return;
}

std::unordered_set<const Node *> del_node_set;

// Create an SkipLayerNorm op node
Expand Down

0 comments on commit 62c2173

Please sign in to comment.