From 390d81cc1a092b42273dee77510c19873d2bcdc5 Mon Sep 17 00:00:00 2001 From: a2064968462 <2064968462@qq.com> Date: Wed, 20 Nov 2024 23:38:33 +0800 Subject: [PATCH 1/2] update a38--a40 --- _typos.toml | 2 -- .../interface/infer_symbolic_shape/multiary_infer_sym.cc | 8 ++++---- paddle/phi/core/string_tensor.cc | 2 +- test/legacy_test/test_eager_tensor.py | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/_typos.toml b/_typos.toml index d2625002e74aa..d438309aa4b12 100644 --- a/_typos.toml +++ b/_typos.toml @@ -293,7 +293,6 @@ configurated = 'configurated' perfome = 'perfome' consructor = 'consructor' quitted = 'quitted' -attribtes = 'attribtes' orignal = 'orignal' furture = 'furture' Indext = 'Indext' @@ -662,7 +661,6 @@ Succeess = 'Succeess' assined = 'assined' expolitation = 'expolitation' keyward = 'keyward' -attemps = 'attemps' Swith = 'Swith' implementated = 'implementated' flattern = 'flattern' diff --git a/paddle/fluid/pir/dialect/operator/interface/infer_symbolic_shape/multiary_infer_sym.cc b/paddle/fluid/pir/dialect/operator/interface/infer_symbolic_shape/multiary_infer_sym.cc index a6a9a6faf9dbe..e42f0fbb44f22 100644 --- a/paddle/fluid/pir/dialect/operator/interface/infer_symbolic_shape/multiary_infer_sym.cc +++ b/paddle/fluid/pir/dialect/operator/interface/infer_symbolic_shape/multiary_infer_sym.cc @@ -1747,7 +1747,7 @@ bool FusedAttentionOpInferSymbolicShape( symbol::ShapeOrDataDimExprs{ symbol::TensorShapeOrDataDimExprs(x_shape)}); } else { - // The follwing three code used to set unoptional output value. + // The following three code used to set unoptional output value. // Now it's result related to the infermeta. infer_context->SetSymbolForValueByStaticShape(op->result(0)); infer_context->SetSymbolForValueByStaticShape(op->result(1)); @@ -1863,7 +1863,7 @@ bool FusedAttentionOpInferSymbolicShape( symbol::ShapeOrDataDimExprs{symbol::TensorShapeOrDataDimExprs( {x_shape[0], num_heads, x_shape[1], out_seq_len})}); } else { - // The follwing code used to set unoptional output value. + // The following code used to set unoptional output value. // Now it's result related to the infermeta. infer_context->SetSymbolForValueByStaticShape(op->result(11)); } @@ -1878,7 +1878,7 @@ bool FusedAttentionOpInferSymbolicShape( symbol::ShapeOrDataDimExprs{symbol::TensorShapeOrDataDimExprs( {x_shape[0], num_heads, x_shape[1], out_seq_len})}); } else { - // The follwing code used to set unoptional output value. + // The following code used to set unoptional output value. // Now it's result related to the infermeta. infer_context->SetSymbolForValueByStaticShape(op->result(9)); } @@ -1910,7 +1910,7 @@ bool FusedAttentionOpInferSymbolicShape( symbol::ShapeOrDataDimExprs{ symbol::TensorShapeOrDataDimExprs(x_shape)}); } else { - // The follwing code used to set unoptional output value. + // The following code used to set unoptional output value. // Now it's result related to the infermeta. infer_context->SetSymbolForValueByStaticShape(op->result(14)); } diff --git a/paddle/phi/core/string_tensor.cc b/paddle/phi/core/string_tensor.cc index 45351ec20feac..46e4004ba8fd4 100644 --- a/paddle/phi/core/string_tensor.cc +++ b/paddle/phi/core/string_tensor.cc @@ -128,7 +128,7 @@ void StringTensor::init_holder() { // TODO(zhoushunjie): Need to support more places PADDLE_THROW( errors::Unimplemented("StringTensor can only be created in CPU or GPU " - "place. But now attemps to " + "place. But now attempts to " "create StringTensor on %s", place.DebugString())); } diff --git a/test/legacy_test/test_eager_tensor.py b/test/legacy_test/test_eager_tensor.py index ddf1dbe76ac07..ae29779ad31cf 100644 --- a/test/legacy_test/test_eager_tensor.py +++ b/test/legacy_test/test_eager_tensor.py @@ -365,7 +365,7 @@ def test_to_tensor_with_lodtensor(self): np.testing.assert_array_equal(a_np, a.numpy()) self.assertTrue(a.place.__repr__(), "Place(cpu)") - def test_to_tensor_attribtes(self): + def test_to_tensor_attributes(self): var = paddle.to_tensor(self.array) np.testing.assert_array_equal(var.numpy(), self.array) # default value From d3eff2b835d05fab2df7ef17b1a5495852166877 Mon Sep 17 00:00:00 2001 From: mouren <2064968462@qq.com> Date: Thu, 21 Nov 2024 08:24:21 +0800 Subject: [PATCH 2/2] update _typos.toml --- _typos.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_typos.toml b/_typos.toml index d438309aa4b12..9fe9ba97cf3e1 100644 --- a/_typos.toml +++ b/_typos.toml @@ -10,6 +10,7 @@ grad = "grad" arange = "arange" ot = 'ot' pash = 'pash' +astroid = 'astroid' eles = 'eles' # These words need to be fixed @@ -714,7 +715,6 @@ learing = 'learing' noraml = 'noraml' padd = 'padd' Requred = 'Requred' -astroid = 'astroid' Fidn = 'Fidn' mak = 'mak' temporaly = 'temporaly'