Skip to content

Commit 5eab1a3

Browse files
Shixiaowei02LielinJiangjuncaipengqili93joey12300
authored
git cherry-pick the commits of operator version registries, test=release/2.0 (#30292)
* Register op version for grid_sampler, test=op_version (#29916) * add op version for fake_quant and fake_dequant ops, test=op_version (#29923) * Register op version for print, test=op_version (#29945) * add gru op_register_version; test=op_version; (#29931) * Register op version for coalesce_tensor. (#29940) * register op version for conv2d_transpose, conv3d_transpose and depthwise_conv2d_transpose, test=op_version (#29937) * add op_register_version for allclose op; test=op_version (#29968) * register ModifyAttr for instance_norm, test=op_version (#29938) * add op_version for flip op [test=op_version] (#30019) * add the op version check for the elementwise ops, test=op_version (#30010) * add the support the op version check for matmul, test=op_version (#30011) * Revert "register ModifyAttr for instance_norm, test=op_version (#29938)" * add REGISTER_OP_VERSION for generate_proposals, roi_align, roi_pool test=op_version (#30034) * Fix rank_attention op_version, test=op_version (#30006) * fix rank_attention, test=op_version * Register op version for linspace,test=op_version (#30025) * fix op_register_version for compare ops, test=op_version (#30007) Co-authored-by: zhoushunjie <zhoushunjie@baidu.com> * register ModifyAttr for instance_norm, test=op_version (#30065) * register instance norm, test=op_version * add trace op_register_version and fix version bug; test=op_version (#30000) * fix a bug in op_version_registry, test=develop, test=op_version (#29994) * Add version checking, test=op_version (#30129) * fix a bug in gaussian_random_op version, test=release/2.0 Co-authored-by: LielinJiang <50691816+LielinJiang@users.noreply.github.com> Co-authored-by: cc <52520497+juncaipeng@users.noreply.github.com> Co-authored-by: Qi Li <qili93@qq.com> Co-authored-by: Jack Zhou <zhoushunjie@baidu.com> Co-authored-by: Guo Sheng <whucsgs@163.com> Co-authored-by: wangxinxin08 <69842442+wangxinxin08@users.noreply.github.com> Co-authored-by: wawltor <fangzeyang0904@hotmail.com> Co-authored-by: FlyingQianMM <245467267@qq.com> Co-authored-by: ceci3 <ceci3@users.noreply.github.com> Co-authored-by: hutuxian <hutuxian2011@sina.cn> Co-authored-by: chalsliu <45041955+chalsliu@users.noreply.github.com> Co-authored-by: wangguanzhong <jerrywgz@126.com> Co-authored-by: ShenLiang <shenliang03@baidu.com> Co-authored-by: yinhaofeng <66763551+yinhaofeng@users.noreply.github.com> Co-authored-by: channings <chenlingchi@baidu.com> Co-authored-by: chentianyu03 <chentianyu03@baidu.com> Co-authored-by: ruri <shipeng1108@163.com>
1 parent 0fbfbea commit 5eab1a3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+433
-114
lines changed

paddle/fluid/framework/ir/conv_affine_channel_fuse_pass.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,5 +244,5 @@ REGISTER_PASS_CAPABILITY(conv_eltwiseadd_affine_channel_fuse_pass)
244244
.AddCombination(
245245
paddle::framework::compatible::OpVersionComparatorCombination()
246246
.LE("conv2d", 1)
247-
.EQ("elementwise_add", 0)
247+
.LE("elementwise_add", 1)
248248
.EQ("affine_channel", 0));

paddle/fluid/framework/ir/conv_bn_fuse_pass.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,5 +389,5 @@ REGISTER_PASS_CAPABILITY(conv_eltwiseadd_bn_fuse_pass)
389389
.AddCombination(
390390
paddle::framework::compatible::OpVersionComparatorCombination()
391391
.LE("conv2d", 1)
392-
.EQ("elementwise_add", 0)
392+
.LE("elementwise_add", 1)
393393
.EQ("batch_norm", 0));

paddle/fluid/framework/ir/conv_elementwise_add2_act_fuse_pass.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,6 @@ REGISTER_PASS_CAPABILITY(conv_elementwise_add2_act_fuse_pass)
122122
.AddCombination(
123123
paddle::framework::compatible::OpVersionComparatorCombination()
124124
.LE("conv2d", 1)
125-
.EQ("elementwise_add", 0)
125+
.LE("elementwise_add", 1)
126126
.EQ("relu", 0)
127127
.EQ("identity", 0));

paddle/fluid/framework/ir/conv_elementwise_add_act_fuse_pass.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,6 @@ REGISTER_PASS_CAPABILITY(conv_elementwise_add_act_fuse_pass)
109109
.AddCombination(
110110
paddle::framework::compatible::OpVersionComparatorCombination()
111111
.LE("conv2d", 1)
112-
.EQ("elementwise_add", 0)
112+
.LE("elementwise_add", 1)
113113
.EQ("relu", 0)
114114
.EQ("identity", 0));

paddle/fluid/framework/ir/conv_elementwise_add_fuse_pass.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ REGISTER_PASS_CAPABILITY(conv_elementwise_add_fuse_pass)
9595
.AddCombination(
9696
paddle::framework::compatible::OpVersionComparatorCombination()
9797
.LE("conv2d", 1)
98-
.EQ("elementwise_add", 0));
98+
.LE("elementwise_add", 1));

paddle/fluid/framework/ir/embedding_fc_lstm_fuse_pass.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,6 @@ REGISTER_PASS_CAPABILITY(embedding_fc_lstm_fuse_pass)
263263
paddle::framework::compatible::OpVersionComparatorCombination()
264264
.EQ("lookup_table_v2", 0)
265265
.EQ("mul", 0)
266-
.EQ("elementwise_add", 0)
266+
.LE("elementwise_add", 1)
267267
.EQ("lstm", 0)
268268
.EQ("fused_embedding_fc_lstm", 0));

paddle/fluid/framework/ir/fc_fuse_pass.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,6 @@ REGISTER_PASS_CAPABILITY(fc_fuse_pass)
187187
.AddCombination(
188188
paddle::framework::compatible::OpVersionComparatorCombination()
189189
.EQ("mul", 0)
190-
.EQ("elementwise_add", 0)
190+
.LE("elementwise_add", 1)
191191
.EQ("relu", 0)
192192
.EQ("fc", 0));

paddle/fluid/framework/ir/fc_gru_fuse_pass.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,11 @@ REGISTER_PASS_CAPABILITY(mul_gru_fuse_pass)
203203
paddle::framework::compatible::OpVersionComparatorCombination()
204204
.EQ("mul", 0)
205205
.EQ("gru", 0)
206-
.EQ("fusion_gru", 0));
206+
.LE("fusion_gru", 1));
207207
REGISTER_PASS_CAPABILITY(fc_gru_fuse_pass)
208208
.AddCombination(
209209
paddle::framework::compatible::OpVersionComparatorCombination()
210210
.EQ("mul", 0)
211-
.EQ("elementwise_add", 0)
211+
.LE("elementwise_add", 1)
212212
.EQ("gru", 0)
213-
.EQ("fusion_gru", 0));
213+
.LE("fusion_gru", 1));

paddle/fluid/framework/ir/fc_lstm_fuse_pass.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ REGISTER_PASS_CAPABILITY(fc_lstm_fuse_pass)
202202
.AddCombination(
203203
paddle::framework::compatible::OpVersionComparatorCombination()
204204
.EQ("mul", 0)
205-
.EQ("elementwise_add", 0)
205+
.LE("elementwise_add", 1)
206206
.EQ("lstm", 0)
207207
.EQ("fusion_lstm", 0));
208208
REGISTER_PASS_CAPABILITY(mul_lstm_fuse_pass)

paddle/fluid/framework/ir/map_matmul_to_mul_pass.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,15 +227,15 @@ REGISTER_PASS(map_matmul_to_mul_pass, paddle::framework::ir::MapMatmul2MulPass);
227227
REGISTER_PASS_CAPABILITY(map_matmul_to_mul_pass)
228228
.AddCombination(
229229
paddle::framework::compatible::OpVersionComparatorCombination()
230-
.EQ("matmul", 0)
230+
.LE("matmul", 1)
231231
.EQ("mul", 0));
232232

233233
REGISTER_PASS(squeeze2_matmul_fuse_pass,
234234
paddle::framework::ir::Squeeze2MatmulFusePass);
235235
REGISTER_PASS_CAPABILITY(squeeze2_matmul_fuse_pass)
236236
.AddCombination(
237237
paddle::framework::compatible::OpVersionComparatorCombination()
238-
.EQ("matmul", 0)
238+
.LE("matmul", 1)
239239
.EQ("squeeze2", 0)
240240
.EQ("mul", 0));
241241

@@ -244,6 +244,6 @@ REGISTER_PASS(reshape2_matmul_fuse_pass,
244244
REGISTER_PASS_CAPABILITY(reshape2_matmul_fuse_pass)
245245
.AddCombination(
246246
paddle::framework::compatible::OpVersionComparatorCombination()
247-
.EQ("matmul", 0)
247+
.LE("matmul", 1)
248248
.EQ("reshape2", 0)
249249
.EQ("mul", 0));

0 commit comments

Comments
 (0)