Skip to content

Commit 62c2173

Browse files
author
Pei Yang
authored
remove pass restrictions for skip-ln pass (#32082)
1 parent 3a25588 commit 62c2173

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

paddle/fluid/framework/ir/skip_layernorm_fuse_pass.cc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,6 @@ void SkipLayerNormFusePass::ApplyImpl(ir::Graph *graph) const {
134134
GET_IR_NODE_FROM_SUBGRAPH(layer_norm_variance, layer_norm_variance,
135135
fused_pattern);
136136

137-
// check if is in ernie or not
138-
if (!graph->Has(kEmbEltwiseLayernormPass) ||
139-
!graph->Has(kMultiheadMatmulPass)) {
140-
LOG(INFO) << "The skip_layernorm_fuse_pass is only supported in "
141-
<< "Ernie/Bert model. Just skip this pass.";
142-
return;
143-
}
144-
145137
std::unordered_set<const Node *> del_node_set;
146138

147139
// Create an SkipLayerNorm op node

0 commit comments

Comments
 (0)