未验证 提交 8f49f9d5 编写于 作者: W wawltor 提交者: GitHub

change the elementwise ops version check, test=op_version

change the elementwise ops version check, test=op_version
上级 b23faf37
...@@ -244,5 +244,5 @@ REGISTER_PASS_CAPABILITY(conv_eltwiseadd_affine_channel_fuse_pass) ...@@ -244,5 +244,5 @@ REGISTER_PASS_CAPABILITY(conv_eltwiseadd_affine_channel_fuse_pass)
.AddCombination( .AddCombination(
paddle::framework::compatible::OpVersionComparatorCombination() paddle::framework::compatible::OpVersionComparatorCombination()
.LE("conv2d", 1) .LE("conv2d", 1)
.EQ("elementwise_add", 0) .LE("elementwise_add", 1)
.EQ("affine_channel", 0)); .EQ("affine_channel", 0));
...@@ -389,5 +389,5 @@ REGISTER_PASS_CAPABILITY(conv_eltwiseadd_bn_fuse_pass) ...@@ -389,5 +389,5 @@ REGISTER_PASS_CAPABILITY(conv_eltwiseadd_bn_fuse_pass)
.AddCombination( .AddCombination(
paddle::framework::compatible::OpVersionComparatorCombination() paddle::framework::compatible::OpVersionComparatorCombination()
.LE("conv2d", 1) .LE("conv2d", 1)
.EQ("elementwise_add", 0) .LE("elementwise_add", 1)
.EQ("batch_norm", 0)); .EQ("batch_norm", 0));
...@@ -122,6 +122,6 @@ REGISTER_PASS_CAPABILITY(conv_elementwise_add2_act_fuse_pass) ...@@ -122,6 +122,6 @@ REGISTER_PASS_CAPABILITY(conv_elementwise_add2_act_fuse_pass)
.AddCombination( .AddCombination(
paddle::framework::compatible::OpVersionComparatorCombination() paddle::framework::compatible::OpVersionComparatorCombination()
.LE("conv2d", 1) .LE("conv2d", 1)
.EQ("elementwise_add", 0) .LE("elementwise_add", 1)
.EQ("relu", 0) .EQ("relu", 0)
.EQ("identity", 0)); .EQ("identity", 0));
...@@ -109,6 +109,6 @@ REGISTER_PASS_CAPABILITY(conv_elementwise_add_act_fuse_pass) ...@@ -109,6 +109,6 @@ REGISTER_PASS_CAPABILITY(conv_elementwise_add_act_fuse_pass)
.AddCombination( .AddCombination(
paddle::framework::compatible::OpVersionComparatorCombination() paddle::framework::compatible::OpVersionComparatorCombination()
.LE("conv2d", 1) .LE("conv2d", 1)
.EQ("elementwise_add", 0) .LE("elementwise_add", 1)
.EQ("relu", 0) .EQ("relu", 0)
.EQ("identity", 0)); .EQ("identity", 0));
...@@ -95,4 +95,4 @@ REGISTER_PASS_CAPABILITY(conv_elementwise_add_fuse_pass) ...@@ -95,4 +95,4 @@ REGISTER_PASS_CAPABILITY(conv_elementwise_add_fuse_pass)
.AddCombination( .AddCombination(
paddle::framework::compatible::OpVersionComparatorCombination() paddle::framework::compatible::OpVersionComparatorCombination()
.LE("conv2d", 1) .LE("conv2d", 1)
.EQ("elementwise_add", 0)); .LE("elementwise_add", 1));
...@@ -263,6 +263,6 @@ REGISTER_PASS_CAPABILITY(embedding_fc_lstm_fuse_pass) ...@@ -263,6 +263,6 @@ REGISTER_PASS_CAPABILITY(embedding_fc_lstm_fuse_pass)
paddle::framework::compatible::OpVersionComparatorCombination() paddle::framework::compatible::OpVersionComparatorCombination()
.EQ("lookup_table_v2", 0) .EQ("lookup_table_v2", 0)
.EQ("mul", 0) .EQ("mul", 0)
.EQ("elementwise_add", 0) .LE("elementwise_add", 1)
.EQ("lstm", 0) .EQ("lstm", 0)
.EQ("fused_embedding_fc_lstm", 0)); .EQ("fused_embedding_fc_lstm", 0));
...@@ -187,6 +187,6 @@ REGISTER_PASS_CAPABILITY(fc_fuse_pass) ...@@ -187,6 +187,6 @@ REGISTER_PASS_CAPABILITY(fc_fuse_pass)
.AddCombination( .AddCombination(
paddle::framework::compatible::OpVersionComparatorCombination() paddle::framework::compatible::OpVersionComparatorCombination()
.EQ("mul", 0) .EQ("mul", 0)
.EQ("elementwise_add", 0) .LE("elementwise_add", 1)
.EQ("relu", 0) .EQ("relu", 0)
.EQ("fc", 0)); .EQ("fc", 0));
...@@ -208,6 +208,6 @@ REGISTER_PASS_CAPABILITY(fc_gru_fuse_pass) ...@@ -208,6 +208,6 @@ REGISTER_PASS_CAPABILITY(fc_gru_fuse_pass)
.AddCombination( .AddCombination(
paddle::framework::compatible::OpVersionComparatorCombination() paddle::framework::compatible::OpVersionComparatorCombination()
.EQ("mul", 0) .EQ("mul", 0)
.EQ("elementwise_add", 0) .LE("elementwise_add", 1)
.EQ("gru", 0) .EQ("gru", 0)
.LE("fusion_gru", 1)); .LE("fusion_gru", 1));
...@@ -202,7 +202,7 @@ REGISTER_PASS_CAPABILITY(fc_lstm_fuse_pass) ...@@ -202,7 +202,7 @@ REGISTER_PASS_CAPABILITY(fc_lstm_fuse_pass)
.AddCombination( .AddCombination(
paddle::framework::compatible::OpVersionComparatorCombination() paddle::framework::compatible::OpVersionComparatorCombination()
.EQ("mul", 0) .EQ("mul", 0)
.EQ("elementwise_add", 0) .LE("elementwise_add", 1)
.EQ("lstm", 0) .EQ("lstm", 0)
.EQ("fusion_lstm", 0)); .EQ("fusion_lstm", 0));
REGISTER_PASS_CAPABILITY(mul_lstm_fuse_pass) REGISTER_PASS_CAPABILITY(mul_lstm_fuse_pass)
......
...@@ -716,7 +716,7 @@ REGISTER_PASS_CAPABILITY(multihead_matmul_fuse_pass_v2) ...@@ -716,7 +716,7 @@ REGISTER_PASS_CAPABILITY(multihead_matmul_fuse_pass_v2)
.AddCombination( .AddCombination(
paddle::framework::compatible::OpVersionComparatorCombination() paddle::framework::compatible::OpVersionComparatorCombination()
.EQ("mul", 0) .EQ("mul", 0)
.EQ("elementwise_add", 0) .LE("elementwise_add", 1)
.EQ("reshape2", 0) .EQ("reshape2", 0)
.EQ("transpose2", 0) .EQ("transpose2", 0)
.EQ("scale", 0) .EQ("scale", 0)
......
...@@ -262,7 +262,7 @@ REGISTER_PASS_CAPABILITY(seq_concat_fc_fuse_pass) ...@@ -262,7 +262,7 @@ REGISTER_PASS_CAPABILITY(seq_concat_fc_fuse_pass)
.EQ("sequence_expand", 0) .EQ("sequence_expand", 0)
.EQ("concat", 0) .EQ("concat", 0)
.EQ("mul", 0) .EQ("mul", 0)
.EQ("elementwise_add", 0) .LE("elementwise_add", 1)
.EQ("sigmoid", 0) .EQ("sigmoid", 0)
.EQ("tanh", 0) .EQ("tanh", 0)
.EQ("relu", 0) .EQ("relu", 0)
......
...@@ -106,5 +106,5 @@ REGISTER_PASS_CAPABILITY(seqconv_eltadd_relu_fuse_pass) ...@@ -106,5 +106,5 @@ REGISTER_PASS_CAPABILITY(seqconv_eltadd_relu_fuse_pass)
.AddCombination( .AddCombination(
paddle::framework::compatible::OpVersionComparatorCombination() paddle::framework::compatible::OpVersionComparatorCombination()
.EQ("sequence_conv", 0) .EQ("sequence_conv", 0)
.EQ("elementwise_add", 0) .LE("elementwise_add", 1)
.EQ("relu", 0)); .EQ("relu", 0));
...@@ -193,5 +193,5 @@ REGISTER_PASS(skip_layernorm_fuse_pass, ...@@ -193,5 +193,5 @@ REGISTER_PASS(skip_layernorm_fuse_pass,
REGISTER_PASS_CAPABILITY(skip_layernorm_fuse_pass) REGISTER_PASS_CAPABILITY(skip_layernorm_fuse_pass)
.AddCombination( .AddCombination(
paddle::framework::compatible::OpVersionComparatorCombination() paddle::framework::compatible::OpVersionComparatorCombination()
.EQ("elementwise_add", 0) .LE("elementwise_add", 1)
.EQ("layer_norm", 0)); .EQ("layer_norm", 0));
...@@ -392,7 +392,7 @@ REGISTER_PASS_CAPABILITY(squared_mat_sub_fuse_pass) ...@@ -392,7 +392,7 @@ REGISTER_PASS_CAPABILITY(squared_mat_sub_fuse_pass)
.EQ("matmul", 0) .EQ("matmul", 0)
.EQ("matmul_v2", 0) .EQ("matmul_v2", 0)
.EQ("square", 0) .EQ("square", 0)
.EQ("elementwise_mul", 0) .LE("elementwise_mul", 1)
.EQ("elementwise_sub", 0) .LE("elementwise_sub", 1)
.EQ("fill_constant", 1) .EQ("fill_constant", 1)
.EQ("fusion_squared_mat_sub", 0)); .EQ("fusion_squared_mat_sub", 0));
...@@ -131,4 +131,4 @@ REGISTER_PASS_CAPABILITY(unsqueeze2_eltwise_fuse_pass) ...@@ -131,4 +131,4 @@ REGISTER_PASS_CAPABILITY(unsqueeze2_eltwise_fuse_pass)
.AddCombination( .AddCombination(
paddle::framework::compatible::OpVersionComparatorCombination() paddle::framework::compatible::OpVersionComparatorCombination()
.EQ("unsqueeze2", 0) .EQ("unsqueeze2", 0)
.EQ("elementwise_mul", 0)); .LE("elementwise_mul", 1));
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册