From 8415f18ec352469f2d6e03dc33cbcb5ed6ecc434 Mon Sep 17 00:00:00 2001 From: little1d <2431542525@qq.com> Date: Wed, 20 Nov 2024 17:05:47 +0800 Subject: [PATCH 1/5] Typos C-[10-15] --- _typos.toml | 7 +------ paddle/fluid/framework/data_feed.cc | 4 ++-- .../interface/infer_symbolic_shape/unary_infer_sym.cc | 2 +- paddle/fluid/pybind/sot/cpython_internals.c | 4 ++-- security/advisory/pdsa-2023-013.md | 2 +- security/advisory/pdsa-2023-016.md | 2 +- test/dygraph_to_static/transformer_util.py | 4 ++-- tools/gen_ut_cmakelists.py | 2 +- 8 files changed, 11 insertions(+), 16 deletions(-) diff --git a/_typos.toml b/_typos.toml index d2625002e74aa6..3ac77edaf42d12 100644 --- a/_typos.toml +++ b/_typos.toml @@ -149,7 +149,6 @@ Uniqe = 'Uniqe' valuse = 'valuse' exsits = 'exsits' sucessfully = 'sucessfully' -CACH = 'CACH' endianess = 'endianess' VAILD = 'VAILD' ues = 'ues' @@ -196,7 +195,6 @@ sotring = 'sotring' overriden = 'overriden' Maxinum = 'Maxinum' caculate = 'caculate' -cahr = 'cahr' occures = 'occures' framwork = 'framwork' localy = 'localy' @@ -242,7 +240,6 @@ starup = 'starup' iy = 'iy' bindins = 'bindins' choses = 'choses' -catched = 'catched' rewrited = 'rewrited' targt = 'targt' Theoritical = 'Theoritical' @@ -332,7 +329,6 @@ funtion = 'funtion' optin = 'optin' defualt = 'defualt' envirnment = 'envirnment' -cuase = 'cuase' fot = 'fot' coloumn = 'coloumn' inital = 'inital' @@ -460,7 +456,6 @@ Leafs = 'Leafs' effecient = 'effecient' modifed = 'modifed' deserailize = 'deserailize' -channnel = 'channnel' Suger = 'Suger' Actural = 'Actural' subsituted = 'subsituted' @@ -773,7 +768,6 @@ varn = 'varn' exmaple = 'exmaple' happend = 'happend' sequentail = 'sequentail' -channles = 'channles' Mutiply = 'Mutiply' Currenly = 'Currenly' dimention = 'dimention' @@ -822,3 +816,4 @@ compatable = 'compatable' SMAE = 'SMAE' commericial = 'commericial' wieghts = 'wieghts' +follwing = 'follwing' diff --git a/paddle/fluid/framework/data_feed.cc b/paddle/fluid/framework/data_feed.cc index 99dc3d95dbcae4..9b105b44cfd0ac 100644 --- a/paddle/fluid/framework/data_feed.cc +++ b/paddle/fluid/framework/data_feed.cc @@ -419,12 +419,12 @@ int InMemoryDataFeed::Next() { PADDLE_ENFORCE_EQ(output_channel_ != nullptr, true, common::errors::InvalidArgument( - "Output channnel should not be null, please check!")); + "Output channel should not be null, please check!")); PADDLE_ENFORCE_EQ( consume_channel_ != nullptr, true, common::errors::InvalidArgument( - "Consume channnel should not be null, please check!")); + "Consume channel should not be null, please check!")); VLOG(3) << "output_channel_ size=" << output_channel_->Size() << ", consume_channel_ size=" << consume_channel_->Size() << ", thread_id=" << thread_id_; diff --git a/paddle/fluid/pir/dialect/operator/interface/infer_symbolic_shape/unary_infer_sym.cc b/paddle/fluid/pir/dialect/operator/interface/infer_symbolic_shape/unary_infer_sym.cc index 5aab34d5bdf865..95e044446b6ab8 100644 --- a/paddle/fluid/pir/dialect/operator/interface/infer_symbolic_shape/unary_infer_sym.cc +++ b/paddle/fluid/pir/dialect/operator/interface/infer_symbolic_shape/unary_infer_sym.cc @@ -2534,7 +2534,7 @@ bool PixelShuffleOpInferSymbolicShape( const bool channel_last = (data_format == "NHWC"); - // the number of channles shoule be able to be divided by the upscale_factor + // the number of channels shoule be able to be divided by the upscale_factor // ^ 2. // TODO(Lans1ot, Buaa): add constrain for the channel number and // upscale_factor diff --git a/paddle/fluid/pybind/sot/cpython_internals.c b/paddle/fluid/pybind/sot/cpython_internals.c index 63969db55667fb..1c12c51066e885 100644 --- a/paddle/fluid/pybind/sot/cpython_internals.c +++ b/paddle/fluid/pybind/sot/cpython_internals.c @@ -311,7 +311,7 @@ static void Internal_frame_init_get_vars(_PyInterpreterFrame *frame) { PyObject *o = PyTuple_GET_ITEM(closure, i); frame->localsplus[offset + i] = Py_NewRef(o); } - // COPY_FREE_VARS doesn't have inline CACHEs, either: + // COPY_FREE_VARS doesn't have inline caches, either: frame->prev_instr = _PyCode_CODE(frame->f_code); } @@ -534,7 +534,7 @@ int Internal_PyFrame_FastToLocalsWithError(_PyInterpreterFrame *frame) { Py_INCREF(o); frame->localsplus[offset + i] = o; } - // COPY_FREE_VARS doesn't have inline CACHEs, either: + // COPY_FREE_VARS doesn't have inline caches, either: frame->prev_instr = _PyCode_CODE(frame->f_code); } for (int i = 0; i < co->co_nlocalsplus; i++) { diff --git a/security/advisory/pdsa-2023-013.md b/security/advisory/pdsa-2023-013.md index 53deab6f3c346a..9761c2e6103312 100644 --- a/security/advisory/pdsa-2023-013.md +++ b/security/advisory/pdsa-2023-013.md @@ -6,7 +6,7 @@ CVE-2023-52304 ### Impact -Invalid shapes cuase stack buffer overflow in `paddle.searchsorted`. The PoC is as follows: +Invalid shapes cause stack buffer overflow in `paddle.searchsorted`. The PoC is as follows: ```python import paddle diff --git a/security/advisory/pdsa-2023-016.md b/security/advisory/pdsa-2023-016.md index 2c6e93e3f87717..0594b3c34fe9ff 100644 --- a/security/advisory/pdsa-2023-016.md +++ b/security/advisory/pdsa-2023-016.md @@ -6,7 +6,7 @@ CVE-2023-52307 ### Impact -Invalid shapes cuase stack buffer overflow in `paddle.linalg.lu_unpack`. The PoC is as follows: +Invalid shapes cause stack buffer overflow in `paddle.linalg.lu_unpack`. The PoC is as follows: ```python import paddle diff --git a/test/dygraph_to_static/transformer_util.py b/test/dygraph_to_static/transformer_util.py index 17017fd380752d..ae59190969a578 100644 --- a/test/dygraph_to_static/transformer_util.py +++ b/test/dygraph_to_static/transformer_util.py @@ -395,7 +395,7 @@ def load(program, model_path, executor=None, var_list=None): paddle.static.load(program, model_path, executor, var_list) except UnicodeDecodeError: warnings.warn( - "An UnicodeDecodeError is catched, which might be caused by loading " + "An UnicodeDecodeError is caught, which might be caused by loading " "a python2 saved model. Encoding of pickle.load would be set and " "load again automatically." ) @@ -419,7 +419,7 @@ def load_dygraph(model_path, keep_name_table=False): return para_dict, opti_dict except UnicodeDecodeError: warnings.warn( - "An UnicodeDecodeError is catched, which might be caused by loading " + "An UnicodeDecodeError is caught, which might be caused by loading " "a python2 saved model. Encoding of pickle.load would be set and " "load again automatically." ) diff --git a/tools/gen_ut_cmakelists.py b/tools/gen_ut_cmakelists.py index 659d64cb52b873..a8eb6a0f6d76ed 100644 --- a/tools/gen_ut_cmakelists.py +++ b/tools/gen_ut_cmakelists.py @@ -270,7 +270,7 @@ def _init_dist_ut_ports_from_cmakefile(self, cmake_file_name): break name = lines[k - 1].strip() - # matcg right tets name format, the name must start with 'test_' follwed bu at least one cahr of + # matcg right tets name format, the name must start with 'test_' follwed bu at least one char of # '0-9'. 'a-z'. 'A-Z' or '_' assert re.compile("^test_[0-9a-zA-Z_]+").search( name From 7f055e2ee933cd2e0b2a721fd8c5a279196083c8 Mon Sep 17 00:00:00 2001 From: Zachary_Yang <115958756+little1d@users.noreply.github.com> Date: Wed, 20 Nov 2024 17:46:38 +0800 Subject: [PATCH 2/5] Update data_feed.cc --- paddle/fluid/framework/data_feed.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/framework/data_feed.cc b/paddle/fluid/framework/data_feed.cc index 9b105b44cfd0ac..44146561047a1c 100644 --- a/paddle/fluid/framework/data_feed.cc +++ b/paddle/fluid/framework/data_feed.cc @@ -419,7 +419,7 @@ int InMemoryDataFeed::Next() { PADDLE_ENFORCE_EQ(output_channel_ != nullptr, true, common::errors::InvalidArgument( - "Output channel should not be null, please check!")); + "Output channel should not be null, please check!")); PADDLE_ENFORCE_EQ( consume_channel_ != nullptr, true, From 624e558772fb038ee9cfce539ea0b63fd429862d Mon Sep 17 00:00:00 2001 From: Zachary_Yang <115958756+little1d@users.noreply.github.com> Date: Wed, 20 Nov 2024 17:47:27 +0800 Subject: [PATCH 3/5] Update data_feed.cc --- paddle/fluid/framework/data_feed.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/framework/data_feed.cc b/paddle/fluid/framework/data_feed.cc index 44146561047a1c..e75515cc9195f4 100644 --- a/paddle/fluid/framework/data_feed.cc +++ b/paddle/fluid/framework/data_feed.cc @@ -424,7 +424,7 @@ int InMemoryDataFeed::Next() { consume_channel_ != nullptr, true, common::errors::InvalidArgument( - "Consume channel should not be null, please check!")); + "Consume channel should not be null, please check!")); VLOG(3) << "output_channel_ size=" << output_channel_->Size() << ", consume_channel_ size=" << consume_channel_->Size() << ", thread_id=" << thread_id_; From 92f6f0886c7d1d35b1d0663fdd7b2074e6aa5695 Mon Sep 17 00:00:00 2001 From: Zachary_Yang <115958756+little1d@users.noreply.github.com> Date: Wed, 20 Nov 2024 17:50:36 +0800 Subject: [PATCH 4/5] Update _typos.toml --- _typos.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/_typos.toml b/_typos.toml index 3ac77edaf42d12..d9351a355bcd8b 100644 --- a/_typos.toml +++ b/_typos.toml @@ -816,4 +816,3 @@ compatable = 'compatable' SMAE = 'SMAE' commericial = 'commericial' wieghts = 'wieghts' -follwing = 'follwing' From 8491240a677244540b7cbec0a49aa3ec2365e9f8 Mon Sep 17 00:00:00 2001 From: Zachary_Yang <115958756+little1d@users.noreply.github.com> Date: Wed, 20 Nov 2024 19:44:29 +0800 Subject: [PATCH 5/5] Update _typos.toml --- _typos.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/_typos.toml b/_typos.toml index d9351a355bcd8b..3ac77edaf42d12 100644 --- a/_typos.toml +++ b/_typos.toml @@ -816,3 +816,4 @@ compatable = 'compatable' SMAE = 'SMAE' commericial = 'commericial' wieghts = 'wieghts' +follwing = 'follwing'