Skip to content

Commit d50ba31

Browse files
committed
Fix
1 parent 21f0c78 commit d50ba31

File tree

7 files changed

+19
-19
lines changed

7 files changed

+19
-19
lines changed

test/ir/pir/cinn/symbolic/test_cinn_sub_graph_symbolic.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def eval_symbolic(self, use_cinn):
106106
out = net(self.x)
107107
return out
108108

109-
def test_eval_symolic(self):
109+
def test_eval_symbolic(self):
110110
cinn_out = self.eval_symbolic(use_cinn=True)
111111
dy_out = self.eval_symbolic(use_cinn=False)
112112
np.testing.assert_allclose(cinn_out.numpy(), dy_out.numpy(), atol=1e-8)
@@ -128,7 +128,7 @@ def eval_symbolic(self, use_cinn):
128128
out = net(self.x)
129129
return out
130130

131-
def test_eval_symolic(self):
131+
def test_eval_symbolic(self):
132132
import os
133133

134134
is_debug = os.getenv('IS_DEBUG_DY_SHAPE')
@@ -161,7 +161,7 @@ def eval_symbolic(self, use_cinn):
161161
out = net(self.x, self.y)
162162
return out
163163

164-
def test_eval_symolic(self):
164+
def test_eval_symbolic(self):
165165
# cinn_out = self.eval_symbolic(use_cinn=True)
166166
dy_out = self.eval_symbolic(use_cinn=False)
167167
# np.testing.assert_allclose(cinn_out.numpy(), dy_out.numpy(), atol=1e-8)

test/ir/pir/fused_pass/pass_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ def check_fused_ops(self, program):
4949
)
5050
op_names = [op.name() for op in program.global_block().ops]
5151
for valid_op_name, valid_op_count in self.valid_op_map.items():
52-
acctual_valid_op_count = op_names.count(valid_op_name)
52+
actual_valid_op_count = op_names.count(valid_op_name)
5353
self.assertTrue(
54-
valid_op_count == acctual_valid_op_count,
54+
valid_op_count == actual_valid_op_count,
5555
"Checking of the number of fused operator < {} > failed. "
5656
"Expected: {}, Received: {}".format(
57-
valid_op_name, valid_op_count, acctual_valid_op_count
57+
valid_op_name, valid_op_count, actual_valid_op_count
5858
),
5959
)
6060

test/ir/pir/fused_pass/test_conv2d_add_act_fuse_pass.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class TestConv2dAddActFusePattern(PassTest):
4343
def is_program_valid(self, program):
4444
return True
4545

46-
def build_ir_progam(self):
46+
def build_ir_program(self):
4747
with paddle.pir_utils.IrGuard():
4848
main_prog = paddle.static.Program()
4949
start_prog = paddle.static.Program()
@@ -86,7 +86,7 @@ def setUp(self):
8686
self.skip_accuracy_verification = True
8787

8888
def sample_program(self):
89-
yield self.build_ir_progam(), False
89+
yield self.build_ir_program(), False
9090

9191
def test_check_output(self):
9292
self.check_pass_correct()
@@ -114,7 +114,7 @@ class TestConv2dAdd2ActFusePattern(PassTest):
114114
def is_program_valid(self, program):
115115
return True
116116

117-
def build_ir_progam(self):
117+
def build_ir_program(self):
118118
with paddle.pir_utils.IrGuard():
119119
main_prog = paddle.static.Program()
120120
start_prog = paddle.static.Program()
@@ -165,7 +165,7 @@ def setUp(self):
165165
self.skip_accuracy_verification = True
166166

167167
def sample_program(self):
168-
yield self.build_ir_progam(), False
168+
yield self.build_ir_program(), False
169169

170170
def test_check_output(self):
171171
self.check_pass_correct()

test/ir/pir/fused_pass/test_conv2d_add_fuse_pass.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class TestConv2dAddFusePass(PassTest):
3535
def is_program_valid(self, program=None):
3636
return True
3737

38-
def build_ir_progam(self):
38+
def build_ir_program(self):
3939
with paddle.pir_utils.IrGuard():
4040
main_prog = paddle.static.Program()
4141
start_prog = paddle.static.Program()
@@ -70,7 +70,7 @@ def build_ir_progam(self):
7070
return [main_prog, start_prog]
7171

7272
def sample_program(self):
73-
yield self.build_ir_progam(), False
73+
yield self.build_ir_program(), False
7474

7575
def setUp(self):
7676
if core.is_compiled_with_cuda():

test/ir/pir/fused_pass/test_conv2d_bn_fuse_pass.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class TestConv2dBnPassPattern(PassTest):
3535
def is_program_valid(self, program=None):
3636
return True
3737

38-
def build_ir_progam(self):
38+
def build_ir_program(self):
3939
with paddle.pir_utils.IrGuard():
4040
main_prog = paddle.static.Program()
4141
start_prog = paddle.static.Program()
@@ -70,7 +70,7 @@ def build_ir_progam(self):
7070
return [main_prog, start_prog]
7171

7272
def sample_program(self):
73-
pir_program = self.build_ir_progam()
73+
pir_program = self.build_ir_program()
7474
yield pir_program, False
7575

7676
def test_check_output(self):

test/ir/pir/fused_pass/test_fused_weight_only_linear_pass.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def get_cuda_version():
4444
"weight_only_linear requires CUDA >= 11.2",
4545
)
4646
class TestFusedWeightOnlyLinearPass_Fp32(PassTest):
47-
def is_conifg_valid(self, w_shape, bias_shape):
47+
def is_config_valid(self, w_shape, bias_shape):
4848
if w_shape[-1] != bias_shape[0]:
4949
return False
5050

@@ -99,7 +99,7 @@ def sample_program(self):
9999
for dtype in ['float16', "float32"]:
100100
for w_shape in [[64, 64], [64, 15]]:
101101
for bias_shape in [[64], [15]]:
102-
if self.is_conifg_valid(w_shape, bias_shape) is False:
102+
if self.is_config_valid(w_shape, bias_shape) is False:
103103
continue
104104
with paddle.pir_utils.IrGuard():
105105
start_prog = paddle.static.Program()

test/ir/pir/fused_pass/test_pir_fc_elementwise_layernorm_fuse_pass.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def sample_program(self):
3939
for x_shape in [[3, 2]]:
4040
for w_shape in [[2, 3]]:
4141
for y_shape in [[1, 3], [3]]:
42-
for bais_shape in [[3, 3]]:
42+
for bias_shape in [[3, 3]]:
4343
for with_relu in [True, False]:
4444
with paddle.pir_utils.IrGuard():
4545
start_prog = paddle.static.Program()
@@ -68,7 +68,7 @@ def sample_program(self):
6868

6969
bias1 = paddle.static.data(
7070
name='bias1',
71-
shape=bais_shape,
71+
shape=bias_shape,
7272
dtype='float32',
7373
)
7474

@@ -93,7 +93,7 @@ def sample_program(self):
9393
"float32"
9494
),
9595
"bias1": np.random.random(
96-
bais_shape
96+
bias_shape
9797
).astype("float32"),
9898
}
9999
self.fetch_list = [out]

0 commit comments

Comments
 (0)