Skip to content

Commit f662d57

Browse files
committed
Fix
1 parent 44de935 commit f662d57

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

paddle/fluid/pir/dialect/operator/ir/control_flow_op.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,13 +1003,13 @@ bool WhileOp::InferSymbolicShape(
10031003
auto yield_input_data_opt = yield_input_shape_or_data.data();
10041004
auto input_data_opt =
10051005
infer_context->GetShapeOrDataForValue(body_args[i]).data();
1006-
bool const_data_not_euqal =
1006+
bool const_data_not_equal =
10071007
is_all_const_data(yield_input_data_opt) &&
10081008
(!is_all_const_data(input_data_opt) ||
10091009
is_all_const_data(input_data_opt) &&
10101010
yield_input_data_opt.value() != input_data_opt.value());
10111011
auto result_shape_or_data =
1012-
const_data_not_euqal
1012+
const_data_not_equal
10131013
? symbol::TensorShapeOrDataDimExprs(
10141014
yield_input_shape_or_data.shape(),
10151015
creat_new_data(yield_input_data_opt.value().size()))

paddle/phi/infermeta/unary.cc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4520,31 +4520,31 @@ void SplitInferMeta(const MetaTensor& x,
45204520
} else {
45214521
auto input_axis_dim = x.dims().at(axis_value);
45224522
std::vector<int64_t> sections_vec;
4523-
const int unknow_dim_val = -1;
4524-
int unknow_dim_idx = -1;
4525-
int num_of_unknow = 0;
4523+
const int unknown_dim_val = -1;
4524+
int unknown_dim_idx = -1;
4525+
int num_of_unknown = 0;
45264526
int64_t sum_of_section = 0;
45274527

45284528
for (int i = 0; i < static_cast<int>(sections_data.size()); ++i) {
45294529
sections_vec.push_back(sections_data[i]);
45304530

4531-
if (sections_data[i] == unknow_dim_val) {
4532-
num_of_unknow++;
4533-
unknow_dim_idx = i;
4531+
if (sections_data[i] == unknown_dim_val) {
4532+
num_of_unknown++;
4533+
unknown_dim_idx = i;
45344534
} else {
45354535
sum_of_section += static_cast<int64_t>(sections_data[i]);
45364536
}
45374537
}
45384538

4539-
PADDLE_ENFORCE_LE(num_of_unknow,
4539+
PADDLE_ENFORCE_LE(num_of_unknown,
45404540
1,
45414541
common::errors::InvalidArgument(
45424542
"Only one dimension value of Attr(num_or_sections) "
45434543
"in SplitOp can be -1. "
45444544
"But received Attr(num_or_sections) = [%s].",
45454545
common::make_ddim(sections_data)));
45464546

4547-
if (unknow_dim_idx != -1) {
4547+
if (unknown_dim_idx != -1) {
45484548
// for example, input shape = [4 ,5], axis = 1, sections = [2, 3, -1].
45494549
// input_axis_dim = 5, sum_of_sections = 5.
45504550
// the following check will fail.
@@ -4561,7 +4561,7 @@ void SplitInferMeta(const MetaTensor& x,
45614561
x.dims(),
45624562
axis_value));
45634563

4564-
sections_vec[unknow_dim_idx] = input_axis_dim - sum_of_section;
4564+
sections_vec[unknown_dim_idx] = input_axis_dim - sum_of_section;
45654565
} else {
45664566
PADDLE_ENFORCE_EQ(
45674567
sum_of_section,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ known-first-party = ["paddle"]
173173
"test/dygraph_to_static/test_lambda.py" = ["PLC3002"]
174174
# Ignore docstring in tensor.pyi
175175
"python/paddle/tensor/tensor.prototype.pyi" = ["PYI021", "PYI048"]
176-
# Temproray ignore some dy2st test case because SOT bug
176+
# Temporary ignore some dy2st test case because SOT bug
177177
# See https://github.com/PaddlePaddle/Paddle/pull/67344#discussion_r1714155671 for more details
178178
"test/dygraph_to_static/seq2seq_dygraph_model.py" = ["RUF005"]
179179

0 commit comments

Comments
 (0)