From a84ccdf499707d6419b2897d6e5ebf9389f4775d Mon Sep 17 00:00:00 2001 From: co63oc Date: Sun, 10 Aug 2025 16:40:29 +0800 Subject: [PATCH 1/3] Fix --- test/ir/inference/inference_pass_test.py | 10 +++++----- test/ir/inference/quant_dequant_test.py | 10 +++++----- test/ir/inference/test_conv_act_onednn_fuse_pass.py | 2 +- test/ir/inference/test_conv_bn_fuse_pass.py | 2 +- test/ir/inference/test_conv_transpose_bn_fuse_pass.py | 6 +++--- .../test_conv_transpose_eltwiseadd_bn_fuse_pass.py | 6 +++--- .../test_fc_elementwise_layernorm_fuse_pass.py | 2 +- .../test_mkldnn_int8_scale_calculation_pass.py | 4 ++-- .../test_mkldnn_matmul_activation_fuse_pass.py | 2 +- ...ldnn_matmul_elementwise_add_activation_fuse_pass.py | 6 +++--- .../test_mkldnn_matmul_elementwise_add_fuse_pass.py | 6 +++--- .../test_mkldnn_matmul_v2_activation_fuse_pass.py | 2 +- .../ir/inference/test_mkldnn_scale_matmul_fuse_pass.py | 2 +- test/ir/inference/test_onednn_conv_bias_fuse_pass.py | 8 ++++---- test/ir/inference/test_onednn_conv_bn_fuse_pass.py | 4 ++-- ...test_onednn_elementwise_add_activation_fuse_pass.py | 2 +- .../inference/test_onednn_fc_activation_fuse_pass.py | 2 +- test/ir/inference/test_onednn_fc_gru_fuse_pass.py | 2 +- test/ir/inference/test_onednn_fc_lstm_fuse_pass.py | 2 +- test/ir/inference/test_onednn_multi_gru_fuse_pass.py | 2 +- .../inference/test_onednn_multi_gru_seq_fuse_pass.py | 2 +- .../test_onednn_operator_reshape2_fuse_pass.py | 2 +- .../test_onednn_operator_unsqueeze2_fuse_pass.py | 4 ++-- .../test_onednn_quant_transpose_dequant_fuse_pass.py | 6 +++--- .../test_onednn_squeeze2_transpose2_fuse_pass.py | 2 +- 25 files changed, 49 insertions(+), 49 deletions(-) diff --git a/test/ir/inference/inference_pass_test.py b/test/ir/inference/inference_pass_test.py index 34bdfb4d2c16c5..ae823dfeea9ad9 100644 --- a/test/ir/inference/inference_pass_test.py +++ b/test/ir/inference/inference_pass_test.py @@ -37,7 +37,7 @@ def __init__(self, methodName='runTest'): self.feeds = None self.fetch_list = None - self.enable_mkldnn = False + self.enable_onednn = False self.enable_onednn_bfloat16 = False self.enable_trt = False self.enable_tensorrt_varseqlen = False @@ -130,7 +130,7 @@ def _get_inference_outs(self, config): return outs def _get_analysis_config( - self, use_gpu=False, use_trt=False, use_mkldnn=False + self, use_gpu=False, use_trt=False, use_onednn=False ): ''' Return a new object of AnalysisConfig. @@ -178,7 +178,7 @@ def _get_analysis_config( if self.enable_tensorrt_varseqlen: config.enable_tensorrt_varseqlen() - elif use_mkldnn: + elif use_onednn: config.enable_onednn() if self.enable_onednn_bfloat16: config.enable_onednn_bfloat16() @@ -286,10 +286,10 @@ def check_output_with_option( ) # Check whether the onednn results and the CPU results are the same. - if (not use_gpu) and self.enable_mkldnn: + if (not use_gpu) and self.enable_onednn: onednn_outputs = self._get_inference_outs( self._get_analysis_config( - use_gpu=use_gpu, use_mkldnn=self.enable_mkldnn + use_gpu=use_gpu, use_onednn=self.enable_onednn ) ) diff --git a/test/ir/inference/quant_dequant_test.py b/test/ir/inference/quant_dequant_test.py index f955273a88667f..1091e0282fb74a 100644 --- a/test/ir/inference/quant_dequant_test.py +++ b/test/ir/inference/quant_dequant_test.py @@ -46,7 +46,7 @@ def __init__(self, methodName='runTest'): self.test_startup_program = paddle.static.Program() self.feeds = None self.fetch_list = None - self.enable_mkldnn = False + self.enable_onednn = False self.enable_onednn_bfloat16 = False self.enable_trt = False self.enable_tensorrt_varseqlen = True @@ -190,7 +190,7 @@ def _get_inference_outs(self, config): return outs def _get_analysis_config( - self, use_gpu=False, use_trt=False, use_mkldnn=False + self, use_gpu=False, use_trt=False, use_onednn=False ): ''' Return a new object of AnalysisConfig. @@ -230,7 +230,7 @@ def _get_analysis_config( if self.enable_tensorrt_varseqlen: config.enable_tensorrt_varseqlen() - elif use_mkldnn: + elif use_onednn: config.enable_onednn() if self.enable_onednn_bfloat16: config.enable_onednn_bfloat16() @@ -388,10 +388,10 @@ def check_output_with_option( ) # Check whether the onednn results and the CPU results are the same. - if (not use_gpu) and self.enable_mkldnn: + if (not use_gpu) and self.enable_onednn: onednn_outputs = self._get_inference_outs( self._get_analysis_config( - use_gpu=use_gpu, use_mkldnn=self.enable_mkldnn + use_gpu=use_gpu, use_onednn=self.enable_onednn ) ) diff --git a/test/ir/inference/test_conv_act_onednn_fuse_pass.py b/test/ir/inference/test_conv_act_onednn_fuse_pass.py index 8392b19875abfa..4c7b0d2e1cc5aa 100755 --- a/test/ir/inference/test_conv_act_onednn_fuse_pass.py +++ b/test/ir/inference/test_conv_act_onednn_fuse_pass.py @@ -207,7 +207,7 @@ def sample_program_config(self, draw): groups=groups, dilations=dilations, data_format=data_format, - use_mkldnn=True, + use_onednn=True, ) ops = [conv2d_op, act_op] diff --git a/test/ir/inference/test_conv_bn_fuse_pass.py b/test/ir/inference/test_conv_bn_fuse_pass.py index 9cfd09d53ca9e7..b80eefde750b7a 100644 --- a/test/ir/inference/test_conv_bn_fuse_pass.py +++ b/test/ir/inference/test_conv_bn_fuse_pass.py @@ -108,7 +108,7 @@ def generate_bn_Var(): groups=groups, paddings=paddings, strides=strides, - use_mkldnn=use_onednn, + use_onednn=use_onednn, has_bias=False, is_test=True, ) diff --git a/test/ir/inference/test_conv_transpose_bn_fuse_pass.py b/test/ir/inference/test_conv_transpose_bn_fuse_pass.py index 31e9bc98973814..99fddb614697ef 100644 --- a/test/ir/inference/test_conv_transpose_bn_fuse_pass.py +++ b/test/ir/inference/test_conv_transpose_bn_fuse_pass.py @@ -67,7 +67,7 @@ def sample_program_config(self, draw): st.sampled_from(["EXPLICIT", "SAME", "VALID"]) ) random_data_layout = draw(st.sampled_from(["NCHW", "NHWC"])) - random_use_mkldnn = draw(st.booleans()) + random_use_onednn = draw(st.booleans()) random_output_size = [] random_filter = draw( st.lists( @@ -133,7 +133,7 @@ def generate_batch_norm_Variance(): 'data_format': random_data_layout, 'output_size': random_output_size, 'output_padding': random_output_size, - 'use_mkldnn': random_use_mkldnn, + 'use_mkldnn': random_use_onednn, 'is_test': True, }, ) @@ -160,7 +160,7 @@ def generate_batch_norm_Variance(): 'is_test': True, 'trainable_statistics': False, 'data_layout': random_data_layout, - 'use_mkldnn': random_use_mkldnn, + 'use_mkldnn': random_use_onednn, }, ) diff --git a/test/ir/inference/test_conv_transpose_eltwiseadd_bn_fuse_pass.py b/test/ir/inference/test_conv_transpose_eltwiseadd_bn_fuse_pass.py index 50b19a7ffba3a4..216b661156b76e 100644 --- a/test/ir/inference/test_conv_transpose_eltwiseadd_bn_fuse_pass.py +++ b/test/ir/inference/test_conv_transpose_eltwiseadd_bn_fuse_pass.py @@ -71,7 +71,7 @@ def sample_program_config(self, draw): st.sampled_from(["EXPLICIT", "SAME", "VALID"]) ) random_data_layout = draw(st.sampled_from(["NCHW", "NHWC"])) - random_use_mkldnn = draw(st.booleans()) + random_use_onednn = draw(st.booleans()) random_output_size = [] random_filter = draw( st.lists( @@ -141,7 +141,7 @@ def generate_batch_norm_Variance(): 'data_format': random_data_layout, 'output_size': random_output_size, 'output_padding': random_output_size, - 'use_mkldnn': random_use_mkldnn, + 'use_mkldnn': random_use_onednn, 'is_test': True, }, ) @@ -182,7 +182,7 @@ def generate_batch_norm_Variance(): 'is_test': True, 'trainable_statistics': False, 'data_layout': random_data_layout, - 'use_mkldnn': random_use_mkldnn, + 'use_mkldnn': random_use_onednn, }, ) diff --git a/test/ir/inference/test_fc_elementwise_layernorm_fuse_pass.py b/test/ir/inference/test_fc_elementwise_layernorm_fuse_pass.py index 80cd83e79f8338..cd01ad161725ae 100644 --- a/test/ir/inference/test_fc_elementwise_layernorm_fuse_pass.py +++ b/test/ir/inference/test_fc_elementwise_layernorm_fuse_pass.py @@ -99,7 +99,7 @@ def sample_program_config(self, draw): padding_weights=False, activation_type="", use_quantizer=False, - use_mkldnn=False, + use_onednn=False, ) add_op = OpConfig( "elementwise_add", diff --git a/test/ir/inference/test_mkldnn_int8_scale_calculation_pass.py b/test/ir/inference/test_mkldnn_int8_scale_calculation_pass.py index 6c61d24ac269f8..456a0781118b54 100644 --- a/test/ir/inference/test_mkldnn_int8_scale_calculation_pass.py +++ b/test/ir/inference/test_mkldnn_int8_scale_calculation_pass.py @@ -123,7 +123,7 @@ def sample_program_config(self, draw): bias_shape = [f_shape[0]] inputs = {} weights = {} - use_mkldnn = True + use_onednn = True has_bias = draw(st.booleans()) if has_bias: @@ -154,7 +154,7 @@ def sample_program_config(self, draw): groups=groups, dilations=dilations, data_format=data_format, - use_mkldnn=use_mkldnn, + use_onednn=use_onednn, mkldnn_data_type="int8", ) diff --git a/test/ir/inference/test_mkldnn_matmul_activation_fuse_pass.py b/test/ir/inference/test_mkldnn_matmul_activation_fuse_pass.py index eb73fa54ae6806..e53c32bcdaf298 100644 --- a/test/ir/inference/test_mkldnn_matmul_activation_fuse_pass.py +++ b/test/ir/inference/test_mkldnn_matmul_activation_fuse_pass.py @@ -140,7 +140,7 @@ def generate_input(type): def sample_predictor_configs(self, program_config): config = self.create_inference_config( - use_mkldnn=True, + use_onednn=True, passes=[ 'matmul_activation_onednn_fuse_pass', 'operator_scale_onednn_fuse_pass', diff --git a/test/ir/inference/test_mkldnn_matmul_elementwise_add_activation_fuse_pass.py b/test/ir/inference/test_mkldnn_matmul_elementwise_add_activation_fuse_pass.py index 278b2b4102cf2d..8531d05adf3046 100644 --- a/test/ir/inference/test_mkldnn_matmul_elementwise_add_activation_fuse_pass.py +++ b/test/ir/inference/test_mkldnn_matmul_elementwise_add_activation_fuse_pass.py @@ -60,7 +60,7 @@ def generate_input(): inputs={'X': ['matmul_x'], 'Y': ['matmul_y']}, outputs={'Out': ['matmul_output']}, attrs={ - 'use_mkldnn': True, + 'use_onednn': True, }, ) @@ -73,7 +73,7 @@ def generate_input(): type='elementwise_add', inputs=inputs, outputs={'Out': ['elementwise_add_output']}, - attrs={'axis': axis, 'use_mkldnn': True}, + attrs={'axis': axis, 'use_onednn': True}, ) if activation_type == "relu6": @@ -131,7 +131,7 @@ def generate_input(): def sample_predictor_configs(self, program_config): config = self.create_inference_config( - use_mkldnn=True, + use_onednn=True, passes=[ 'matmul_elementwise_add_onednn_fuse_pass', 'matmul_activation_onednn_fuse_pass', diff --git a/test/ir/inference/test_mkldnn_matmul_elementwise_add_fuse_pass.py b/test/ir/inference/test_mkldnn_matmul_elementwise_add_fuse_pass.py index 0f9db3a18eadb7..96b978d88c5cf7 100644 --- a/test/ir/inference/test_mkldnn_matmul_elementwise_add_fuse_pass.py +++ b/test/ir/inference/test_mkldnn_matmul_elementwise_add_fuse_pass.py @@ -74,7 +74,7 @@ def generate_input(): def sample_predictor_configs(self, program_config): config = self.create_inference_config( - use_mkldnn=True, passes=['matmul_elementwise_add_onednn_fuse_pass'] + use_onednn=True, passes=['matmul_elementwise_add_onednn_fuse_pass'] ) yield config, ['fused_matmul'], (1e-5, 1e-5) @@ -137,7 +137,7 @@ def generate_input(): def sample_predictor_configs(self, program_config): config = self.create_inference_config( - use_mkldnn=True, passes=['matmul_elementwise_add_onednn_fuse_pass'] + use_onednn=True, passes=['matmul_elementwise_add_onednn_fuse_pass'] ) yield config, ['fused_matmul'], (1e-5, 1e-5) @@ -203,7 +203,7 @@ def generate_input_redisual(): def sample_predictor_configs(self, program_config): config = self.create_inference_config( - use_mkldnn=True, passes=['matmul_elementwise_add_onednn_fuse_pass'] + use_onednn=True, passes=['matmul_elementwise_add_onednn_fuse_pass'] ) yield config, ['fused_matmul'], (1e-5, 1e-5) diff --git a/test/ir/inference/test_mkldnn_matmul_v2_activation_fuse_pass.py b/test/ir/inference/test_mkldnn_matmul_v2_activation_fuse_pass.py index 7ac863e675ac7c..017b7387e5c45f 100644 --- a/test/ir/inference/test_mkldnn_matmul_v2_activation_fuse_pass.py +++ b/test/ir/inference/test_mkldnn_matmul_v2_activation_fuse_pass.py @@ -144,7 +144,7 @@ def generate_input(type): def sample_predictor_configs(self, program_config): config = self.create_inference_config( - use_mkldnn=True, + use_onednn=True, passes=[ 'matmul_activation_onednn_fuse_pass', 'operator_scale_onednn_fuse_pass', diff --git a/test/ir/inference/test_mkldnn_scale_matmul_fuse_pass.py b/test/ir/inference/test_mkldnn_scale_matmul_fuse_pass.py index b4181a7e6580e0..0d86d8385d0c28 100644 --- a/test/ir/inference/test_mkldnn_scale_matmul_fuse_pass.py +++ b/test/ir/inference/test_mkldnn_scale_matmul_fuse_pass.py @@ -137,7 +137,7 @@ def generate_input(attrs, type): def sample_predictor_configs(self, program_config): config = self.create_inference_config( - use_mkldnn=True, passes=['scale_matmul_fuse_pass'] + use_onednn=True, passes=['scale_matmul_fuse_pass'] ) yield config, ['matmul'], (1e-5, 1e-5) diff --git a/test/ir/inference/test_onednn_conv_bias_fuse_pass.py b/test/ir/inference/test_onednn_conv_bias_fuse_pass.py index ac82c4997da3af..3a1435ad0bc0a8 100644 --- a/test/ir/inference/test_onednn_conv_bias_fuse_pass.py +++ b/test/ir/inference/test_onednn_conv_bias_fuse_pass.py @@ -130,7 +130,7 @@ def sample_program_config(self, draw): conv_bias_shape = [] inputs = {} weights = {} - use_mkldnn = None + use_onednn = None conv_type = 'conv2d' if draw(st.booleans()): conv_bias_shape = [f_shape[0]] @@ -145,7 +145,7 @@ def sample_program_config(self, draw): 'bias': TensorConfig(shape=bias_shape), 'conv_bias': TensorConfig(shape=conv_bias_shape), } - use_mkldnn = True + use_onednn = True else: inputs = { 'Input': ['input_x'], @@ -155,7 +155,7 @@ def sample_program_config(self, draw): 'filter': TensorConfig(shape=f_shape), 'bias': TensorConfig(shape=bias_shape), } - use_mkldnn = False + use_onednn = False conv2d_op = OpConfig( conv_type, @@ -167,7 +167,7 @@ def sample_program_config(self, draw): groups=groups, dilations=dilations, data_format=data_format, - use_mkldnn=use_mkldnn, + use_onednn=use_onednn, ) add_op = OpConfig( diff --git a/test/ir/inference/test_onednn_conv_bn_fuse_pass.py b/test/ir/inference/test_onednn_conv_bn_fuse_pass.py index da95b32fcda80b..18a4da54a54464 100644 --- a/test/ir/inference/test_onednn_conv_bn_fuse_pass.py +++ b/test/ir/inference/test_onednn_conv_bn_fuse_pass.py @@ -23,7 +23,7 @@ class TestOneDNNConvBnFusePass(PassAutoScanTest): def sample_program_config(self, draw): - use_mkldnn = True + use_onednn = True padding_algorithm = draw(st.sampled_from(["EXPLICIT", "SAME", "VALID"])) groups = draw(st.integers(min_value=1, max_value=3)) data_format = draw(st.sampled_from(["NCHW", "NHWC"])) @@ -78,7 +78,7 @@ def generate_data(shape): groups=groups, paddings=paddings, strides=strides, - use_mkldnn=use_mkldnn, + use_onednn=use_onednn, has_bias=False, is_test=True, ) diff --git a/test/ir/inference/test_onednn_elementwise_add_activation_fuse_pass.py b/test/ir/inference/test_onednn_elementwise_add_activation_fuse_pass.py index 3d396968a76018..3cf14d3c772c2c 100644 --- a/test/ir/inference/test_onednn_elementwise_add_activation_fuse_pass.py +++ b/test/ir/inference/test_onednn_elementwise_add_activation_fuse_pass.py @@ -116,7 +116,7 @@ def generate_input(): def sample_predictor_configs(self, program_config): config = self.create_inference_config( - use_mkldnn=True, + use_onednn=True, passes=[ 'elementwise_act_onednn_fuse_pass', 'operator_scale_onednn_fuse_pass', diff --git a/test/ir/inference/test_onednn_fc_activation_fuse_pass.py b/test/ir/inference/test_onednn_fc_activation_fuse_pass.py index 84517b6dfc8546..01923c2c3031f2 100644 --- a/test/ir/inference/test_onednn_fc_activation_fuse_pass.py +++ b/test/ir/inference/test_onednn_fc_activation_fuse_pass.py @@ -134,7 +134,7 @@ def generate_input(shape): def sample_predictor_configs(self, program_config): config = self.create_inference_config( - use_mkldnn=True, + use_onednn=True, passes=[ "fc_act_onednn_fuse_pass", "operator_scale_onednn_fuse_pass", diff --git a/test/ir/inference/test_onednn_fc_gru_fuse_pass.py b/test/ir/inference/test_onednn_fc_gru_fuse_pass.py index 1b2d7b0be6e4f5..069ed1fe44169d 100644 --- a/test/ir/inference/test_onednn_fc_gru_fuse_pass.py +++ b/test/ir/inference/test_onednn_fc_gru_fuse_pass.py @@ -103,7 +103,7 @@ def generate_input(shape): def sample_predictor_configs(self, program_config): config = self.create_inference_config( - use_mkldnn=True, + use_onednn=True, passes=[ 'onednn_placement_pass', 'fc_gru_fuse_pass', diff --git a/test/ir/inference/test_onednn_fc_lstm_fuse_pass.py b/test/ir/inference/test_onednn_fc_lstm_fuse_pass.py index 93e755f4032ff3..933c3477ea8330 100644 --- a/test/ir/inference/test_onednn_fc_lstm_fuse_pass.py +++ b/test/ir/inference/test_onednn_fc_lstm_fuse_pass.py @@ -107,7 +107,7 @@ def generate_data(shape): def sample_predictor_configs(self, program_config): config = self.create_inference_config( - use_mkldnn=True, + use_onednn=True, passes=[ 'onednn_placement_pass', 'fc_lstm_fuse_pass', diff --git a/test/ir/inference/test_onednn_multi_gru_fuse_pass.py b/test/ir/inference/test_onednn_multi_gru_fuse_pass.py index 1133504a149caa..9a5dbbf2273a8a 100644 --- a/test/ir/inference/test_onednn_multi_gru_fuse_pass.py +++ b/test/ir/inference/test_onednn_multi_gru_fuse_pass.py @@ -121,7 +121,7 @@ def generate_bias(shape): def sample_predictor_configs(self, program_config): config = self.create_inference_config( - use_mkldnn=True, + use_onednn=True, passes=['multi_gru_fuse_pass'], ) yield config, ['multi_gru'], (1e-5, 1e-5) diff --git a/test/ir/inference/test_onednn_multi_gru_seq_fuse_pass.py b/test/ir/inference/test_onednn_multi_gru_seq_fuse_pass.py index dbb1439dda96cb..43a7f1952c8bd1 100644 --- a/test/ir/inference/test_onednn_multi_gru_seq_fuse_pass.py +++ b/test/ir/inference/test_onednn_multi_gru_seq_fuse_pass.py @@ -196,7 +196,7 @@ def generate_bias(shape): def sample_predictor_configs(self, program_config): config = self.create_inference_config( - use_mkldnn=True, + use_onednn=True, passes=['multi_gru_fuse_pass', 'multi_gru_seq_fuse_pass'], ) yield config, ['multi_gru'], (1e-5, 1e-5) diff --git a/test/ir/inference/test_onednn_operator_reshape2_fuse_pass.py b/test/ir/inference/test_onednn_operator_reshape2_fuse_pass.py index 758950be6ee678..abd8f90f099632 100644 --- a/test/ir/inference/test_onednn_operator_reshape2_fuse_pass.py +++ b/test/ir/inference/test_onednn_operator_reshape2_fuse_pass.py @@ -75,7 +75,7 @@ def generate_input(shape): def sample_predictor_configs(self, program_config): config = self.create_inference_config( - use_mkldnn=True, + use_onednn=True, passes=[ "operator_reshape2_onednn_fuse_pass", ], diff --git a/test/ir/inference/test_onednn_operator_unsqueeze2_fuse_pass.py b/test/ir/inference/test_onednn_operator_unsqueeze2_fuse_pass.py index d1f441f3444cab..f35c355eb0314f 100644 --- a/test/ir/inference/test_onednn_operator_unsqueeze2_fuse_pass.py +++ b/test/ir/inference/test_onednn_operator_unsqueeze2_fuse_pass.py @@ -73,7 +73,7 @@ def generate_input(shape): def sample_predictor_configs(self, program_config): config = self.create_inference_config( - use_mkldnn=True, + use_onednn=True, passes=[ "operator_unsqueeze2_onednn_fuse_pass", ], @@ -138,7 +138,7 @@ def generate_input(shape): def sample_predictor_configs(self, program_config): config = self.create_inference_config( - use_mkldnn=True, + use_onednn=True, passes=[ "operator_unsqueeze2_onednn_fuse_pass", ], diff --git a/test/ir/inference/test_onednn_quant_transpose_dequant_fuse_pass.py b/test/ir/inference/test_onednn_quant_transpose_dequant_fuse_pass.py index 5c8f89bd5f8063..1ffcbf37b1054f 100644 --- a/test/ir/inference/test_onednn_quant_transpose_dequant_fuse_pass.py +++ b/test/ir/inference/test_onednn_quant_transpose_dequant_fuse_pass.py @@ -65,7 +65,7 @@ def generate_input(): 'use_mkldnn': True, 'mkldnn_data_type': 'int8', }, - use_mkldnn=True, + use_onednn=True, ) transpose2_op_2 = OpConfig( @@ -80,7 +80,7 @@ def generate_input(): 'use_mkldnn': True, 'mkldnn_data_type': 'int8', }, - use_mkldnn=True, + use_onednn=True, ) dequantize_op = OpConfig( @@ -106,7 +106,7 @@ def generate_input(): def sample_predictor_configs(self, program_config): config = self.create_inference_config( - use_mkldnn=True, + use_onednn=True, passes=['quant_transpose2_dequant_onednn_fuse_pass'], ) yield config, ['fused_transpose', 'fused_transpose'], (1e-5, 1e-5) diff --git a/test/ir/inference/test_onednn_squeeze2_transpose2_fuse_pass.py b/test/ir/inference/test_onednn_squeeze2_transpose2_fuse_pass.py index 3387f244bd4e8d..3b6f86d7d027dc 100644 --- a/test/ir/inference/test_onednn_squeeze2_transpose2_fuse_pass.py +++ b/test/ir/inference/test_onednn_squeeze2_transpose2_fuse_pass.py @@ -78,7 +78,7 @@ def generate_input(shape): def sample_predictor_configs(self, program_config): config = self.create_inference_config( - use_mkldnn=True, + use_onednn=True, passes=[ "squeeze2_transpose2_onednn_fuse_pass", ], From debcea53bdaca7c166a797e14f1aa1d39841c596 Mon Sep 17 00:00:00 2001 From: co63oc Date: Sun, 10 Aug 2025 19:13:02 +0800 Subject: [PATCH 2/3] Fix --- ...test_mkldnn_matmul_elementwise_add_activation_fuse_pass.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/ir/inference/test_mkldnn_matmul_elementwise_add_activation_fuse_pass.py b/test/ir/inference/test_mkldnn_matmul_elementwise_add_activation_fuse_pass.py index 8531d05adf3046..252378c60b36d5 100644 --- a/test/ir/inference/test_mkldnn_matmul_elementwise_add_activation_fuse_pass.py +++ b/test/ir/inference/test_mkldnn_matmul_elementwise_add_activation_fuse_pass.py @@ -60,7 +60,7 @@ def generate_input(): inputs={'X': ['matmul_x'], 'Y': ['matmul_y']}, outputs={'Out': ['matmul_output']}, attrs={ - 'use_onednn': True, + 'use_mkldnn': True, }, ) @@ -73,7 +73,7 @@ def generate_input(): type='elementwise_add', inputs=inputs, outputs={'Out': ['elementwise_add_output']}, - attrs={'axis': axis, 'use_onednn': True}, + attrs={'axis': axis, 'use_mkldnn': True}, ) if activation_type == "relu6": From e7ef63d8d438a07b15fd1c3cab2bf5e9fa6ddd28 Mon Sep 17 00:00:00 2001 From: co63oc Date: Mon, 11 Aug 2025 06:55:59 +0800 Subject: [PATCH 3/3] Fix --- test/ir/inference/test_conv_bn_fuse_pass.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ir/inference/test_conv_bn_fuse_pass.py b/test/ir/inference/test_conv_bn_fuse_pass.py index b80eefde750b7a..d4861008858257 100644 --- a/test/ir/inference/test_conv_bn_fuse_pass.py +++ b/test/ir/inference/test_conv_bn_fuse_pass.py @@ -158,7 +158,7 @@ def generate_bn_Var(): def sample_predictor_configs(self, program_config): # for onednn - if program_config.ops[0].attrs['use_mkldnn']: + if program_config.ops[0].attrs['use_onednn']: config = self.create_inference_config(use_onednn=True) yield config, ['fused_conv2d'], (1e-5, 1e-5) else: