diff --git a/test/ir/pir/cinn/symbolic/test_cinn_sub_graph_symbolic.py b/test/ir/pir/cinn/symbolic/test_cinn_sub_graph_symbolic.py index 5eb9e6af6da85a..0ff352acf590f5 100644 --- a/test/ir/pir/cinn/symbolic/test_cinn_sub_graph_symbolic.py +++ b/test/ir/pir/cinn/symbolic/test_cinn_sub_graph_symbolic.py @@ -106,7 +106,7 @@ def eval_symbolic(self, use_cinn): out = net(self.x) return out - def test_eval_symolic(self): + def test_eval_symbolic(self): cinn_out = self.eval_symbolic(use_cinn=True) dy_out = self.eval_symbolic(use_cinn=False) np.testing.assert_allclose(cinn_out.numpy(), dy_out.numpy(), atol=1e-8) @@ -128,7 +128,7 @@ def eval_symbolic(self, use_cinn): out = net(self.x) return out - def test_eval_symolic(self): + def test_eval_symbolic(self): import os is_debug = os.getenv('IS_DEBUG_DY_SHAPE') @@ -161,7 +161,7 @@ def eval_symbolic(self, use_cinn): out = net(self.x, self.y) return out - def test_eval_symolic(self): + def test_eval_symbolic(self): # cinn_out = self.eval_symbolic(use_cinn=True) dy_out = self.eval_symbolic(use_cinn=False) # np.testing.assert_allclose(cinn_out.numpy(), dy_out.numpy(), atol=1e-8) diff --git a/test/ir/pir/fused_pass/pass_test.py b/test/ir/pir/fused_pass/pass_test.py index 057cd7bfb7fb5c..a0e00a0f10ea24 100644 --- a/test/ir/pir/fused_pass/pass_test.py +++ b/test/ir/pir/fused_pass/pass_test.py @@ -49,12 +49,12 @@ def check_fused_ops(self, program): ) op_names = [op.name() for op in program.global_block().ops] for valid_op_name, valid_op_count in self.valid_op_map.items(): - acctual_valid_op_count = op_names.count(valid_op_name) + actual_valid_op_count = op_names.count(valid_op_name) self.assertTrue( - valid_op_count == acctual_valid_op_count, + valid_op_count == actual_valid_op_count, "Checking of the number of fused operator < {} > failed. " "Expected: {}, Received: {}".format( - valid_op_name, valid_op_count, acctual_valid_op_count + valid_op_name, valid_op_count, actual_valid_op_count ), ) diff --git a/test/ir/pir/fused_pass/test_conv2d_add_act_fuse_pass.py b/test/ir/pir/fused_pass/test_conv2d_add_act_fuse_pass.py index 701212a7c92d1f..ca397cbebce820 100644 --- a/test/ir/pir/fused_pass/test_conv2d_add_act_fuse_pass.py +++ b/test/ir/pir/fused_pass/test_conv2d_add_act_fuse_pass.py @@ -43,7 +43,7 @@ class TestConv2dAddActFusePattern(PassTest): def is_program_valid(self, program): return True - def build_ir_progam(self): + def build_ir_program(self): with paddle.pir_utils.IrGuard(): main_prog = paddle.static.Program() start_prog = paddle.static.Program() @@ -86,7 +86,7 @@ def setUp(self): self.skip_accuracy_verification = True def sample_program(self): - yield self.build_ir_progam(), False + yield self.build_ir_program(), False def test_check_output(self): self.check_pass_correct() @@ -114,7 +114,7 @@ class TestConv2dAdd2ActFusePattern(PassTest): def is_program_valid(self, program): return True - def build_ir_progam(self): + def build_ir_program(self): with paddle.pir_utils.IrGuard(): main_prog = paddle.static.Program() start_prog = paddle.static.Program() @@ -165,7 +165,7 @@ def setUp(self): self.skip_accuracy_verification = True def sample_program(self): - yield self.build_ir_progam(), False + yield self.build_ir_program(), False def test_check_output(self): self.check_pass_correct() diff --git a/test/ir/pir/fused_pass/test_conv2d_add_fuse_pass.py b/test/ir/pir/fused_pass/test_conv2d_add_fuse_pass.py index 2ee06bca9365c8..cff8c6addd0e69 100644 --- a/test/ir/pir/fused_pass/test_conv2d_add_fuse_pass.py +++ b/test/ir/pir/fused_pass/test_conv2d_add_fuse_pass.py @@ -35,7 +35,7 @@ class TestConv2dAddFusePass(PassTest): def is_program_valid(self, program=None): return True - def build_ir_progam(self): + def build_ir_program(self): with paddle.pir_utils.IrGuard(): main_prog = paddle.static.Program() start_prog = paddle.static.Program() @@ -70,7 +70,7 @@ def build_ir_progam(self): return [main_prog, start_prog] def sample_program(self): - yield self.build_ir_progam(), False + yield self.build_ir_program(), False def setUp(self): if core.is_compiled_with_cuda(): diff --git a/test/ir/pir/fused_pass/test_conv2d_bn_fuse_pass.py b/test/ir/pir/fused_pass/test_conv2d_bn_fuse_pass.py index 80c65f8bb42dd4..dbbb5b14b325cf 100644 --- a/test/ir/pir/fused_pass/test_conv2d_bn_fuse_pass.py +++ b/test/ir/pir/fused_pass/test_conv2d_bn_fuse_pass.py @@ -35,7 +35,7 @@ class TestConv2dBnPassPattern(PassTest): def is_program_valid(self, program=None): return True - def build_ir_progam(self): + def build_ir_program(self): with paddle.pir_utils.IrGuard(): main_prog = paddle.static.Program() start_prog = paddle.static.Program() @@ -70,7 +70,7 @@ def build_ir_progam(self): return [main_prog, start_prog] def sample_program(self): - pir_program = self.build_ir_progam() + pir_program = self.build_ir_program() yield pir_program, False def test_check_output(self): diff --git a/test/ir/pir/fused_pass/test_fused_weight_only_linear_pass.py b/test/ir/pir/fused_pass/test_fused_weight_only_linear_pass.py index 92d09962caf475..e08678e8e8cb10 100644 --- a/test/ir/pir/fused_pass/test_fused_weight_only_linear_pass.py +++ b/test/ir/pir/fused_pass/test_fused_weight_only_linear_pass.py @@ -44,7 +44,7 @@ def get_cuda_version(): "weight_only_linear requires CUDA >= 11.2", ) class TestFusedWeightOnlyLinearPass_Fp32(PassTest): - def is_conifg_valid(self, w_shape, bias_shape): + def is_config_valid(self, w_shape, bias_shape): if w_shape[-1] != bias_shape[0]: return False @@ -99,7 +99,7 @@ def sample_program(self): for dtype in ['float16', "float32"]: for w_shape in [[64, 64], [64, 15]]: for bias_shape in [[64], [15]]: - if self.is_conifg_valid(w_shape, bias_shape) is False: + if self.is_config_valid(w_shape, bias_shape) is False: continue with paddle.pir_utils.IrGuard(): start_prog = paddle.static.Program() diff --git a/test/ir/pir/fused_pass/test_pir_fc_elementwise_layernorm_fuse_pass.py b/test/ir/pir/fused_pass/test_pir_fc_elementwise_layernorm_fuse_pass.py index c17a4574fb752c..6aaa3ee413fb09 100644 --- a/test/ir/pir/fused_pass/test_pir_fc_elementwise_layernorm_fuse_pass.py +++ b/test/ir/pir/fused_pass/test_pir_fc_elementwise_layernorm_fuse_pass.py @@ -39,7 +39,7 @@ def sample_program(self): for x_shape in [[3, 2]]: for w_shape in [[2, 3]]: for y_shape in [[1, 3], [3]]: - for bais_shape in [[3, 3]]: + for bias_shape in [[3, 3]]: for with_relu in [True, False]: with paddle.pir_utils.IrGuard(): start_prog = paddle.static.Program() @@ -68,7 +68,7 @@ def sample_program(self): bias1 = paddle.static.data( name='bias1', - shape=bais_shape, + shape=bias_shape, dtype='float32', ) @@ -93,7 +93,7 @@ def sample_program(self): "float32" ), "bias1": np.random.random( - bais_shape + bias_shape ).astype("float32"), } self.fetch_list = [out]