From 916da5205bb4603bbf7a6e8e30446fdf561faa7a Mon Sep 17 00:00:00 2001 From: rich04lin <152049331+rich04lin@users.noreply.github.com> Date: Sun, 24 Nov 2024 22:56:47 +0800 Subject: [PATCH 1/2] [CodeStyle][Typos][A-28,C-[18-21]] Fix typos (annotaion,choses,choos,choosed,choosen) --- _typos.toml | 5 ----- paddle/fluid/distributed/fleet_executor/dist_model.cc | 2 +- paddle/phi/kernels/gpu/yolo_box_post_kernel.cu | 2 +- paddle/phi/kernels/onednn/stack_kernel.cc | 2 +- test/dygraph_to_static/test_convert_operators.py | 2 +- tools/gen_pybind11_stub.py | 2 +- 6 files changed, 5 insertions(+), 10 deletions(-) diff --git a/_typos.toml b/_typos.toml index 850cbaabbb112b..702dda1f73e339 100644 --- a/_typos.toml +++ b/_typos.toml @@ -35,7 +35,6 @@ acitve = 'acitve' actualy = 'actualy' actural = 'actural' Actural = 'Actural' -annotaion = 'annotaion' assigend = 'assigend' assined = 'assined' assgin = 'assgin' @@ -81,10 +80,6 @@ cann = 'cann' vart = 'vart' checkings = 'checkings' childs = 'childs' -choses = 'choses' -choos = 'choos' -choosed = 'choosed' -choosen = 'choosen' Chunck = 'Chunck' clen = 'clen' Clas = 'Clas' diff --git a/paddle/fluid/distributed/fleet_executor/dist_model.cc b/paddle/fluid/distributed/fleet_executor/dist_model.cc index a8ccaa84f7b2f4..0cfdc01b0a6b53 100644 --- a/paddle/fluid/distributed/fleet_executor/dist_model.cc +++ b/paddle/fluid/distributed/fleet_executor/dist_model.cc @@ -225,7 +225,7 @@ bool DistModel::PreparePlace() { place_ = phi::CustomPlace(config_.device_type, config_.device_id); } else { PADDLE_THROW(common::errors::InvalidArgument( - "Place must be choosen from GPU or CPU or XPU, but got %s.", + "Place must be chosen from GPU or CPU or XPU, but got %s.", config_.place)); } return true; diff --git a/paddle/phi/kernels/gpu/yolo_box_post_kernel.cu b/paddle/phi/kernels/gpu/yolo_box_post_kernel.cu index 30d22c4b43a1b6..d5a74bed0e1a08 100644 --- a/paddle/phi/kernels/gpu/yolo_box_post_kernel.cu +++ b/paddle/phi/kernels/gpu/yolo_box_post_kernel.cu @@ -251,7 +251,7 @@ static void YoloTensorParseCuda( (grid_size / threads_per_block.y) + 1, (anchors_num / threads_per_block.z) + 1); - // Estimate how many boxes will be choosed + // Estimate how many boxes will be chosen int bbox_count = 0; #ifdef PADDLE_WITH_HIP hipMemcpy( diff --git a/paddle/phi/kernels/onednn/stack_kernel.cc b/paddle/phi/kernels/onednn/stack_kernel.cc index f0520cb903502d..c4777e20f519e3 100644 --- a/paddle/phi/kernels/onednn/stack_kernel.cc +++ b/paddle/phi/kernels/onednn/stack_kernel.cc @@ -63,7 +63,7 @@ class StackOneDNNHandler : public OneDNNHandlerNoCachingT { srcs_md.push_back(input->mem_desc().reshape(extended_input_dims)); } - // concat primitive choses suboptimal format tag because it cannot + // concat primitive chooses suboptimal format tag because it cannot // distinguish between f.e. abcd and abdc if last dim is equal to 1 so // enforcing is needed for better performance dst_fmt = GetPlainOneDNNFormat(extended_input_dims.size()); // NOLINT diff --git a/test/dygraph_to_static/test_convert_operators.py b/test/dygraph_to_static/test_convert_operators.py index e88c08fe6bc038..7004ebe8ccd606 100644 --- a/test/dygraph_to_static/test_convert_operators.py +++ b/test/dygraph_to_static/test_convert_operators.py @@ -76,7 +76,7 @@ def forward(self, x): x = paddle.reshape(x, [-1, x.shape[1]]) bs = x.shape[0] # -1 - # for trigger choos_shape_attr_or_api + # for trigger choose_shape_attr_or_api out = paddle.zeros([bs, 1], dtype='float32') return out diff --git a/tools/gen_pybind11_stub.py b/tools/gen_pybind11_stub.py index 9eb08a013364f7..22d7620bfd772d 100644 --- a/tools/gen_pybind11_stub.py +++ b/tools/gen_pybind11_stub.py @@ -185,7 +185,7 @@ def wrapper(self, arg: Any): def _patch_pybind11_invalid_annotation(): - # patch invalid annotaion as `Value`, e.g. 'capsule' to 'typing_extensions.CapsuleType' + # patch invalid annotation as `Value`, e.g. 'capsule' to 'typing_extensions.CapsuleType' def wrap_name(func): @functools.wraps(func) def wrapper(self, arg: Annotation): From ce526eb931e6b902d77041d662eb79dade022427 Mon Sep 17 00:00:00 2001 From: rich04lin <152049331+rich04lin@users.noreply.github.com> Date: Sun, 24 Nov 2024 23:12:32 +0800 Subject: [PATCH 2/2] [CodeStyle][Typos][A-28,C-[18-21]] Fix typos (annotaion,choses,choos,choosed,choosen) --- paddle/fluid/distributed/ps/thirdparty/round_robin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/distributed/ps/thirdparty/round_robin.h b/paddle/fluid/distributed/ps/thirdparty/round_robin.h index 5de5668a3d83b7..313d715d47c878 100644 --- a/paddle/fluid/distributed/ps/thirdparty/round_robin.h +++ b/paddle/fluid/distributed/ps/thirdparty/round_robin.h @@ -944,7 +944,7 @@ struct WrapKeyEqual : public T { // or a DataNode with a pointer to std::pair. Which DataNode // representation to use // depends on how fast the swap() operation is. Heuristically, this is -// automatically choosen +// automatically chosen // based on sizeof(). there are always 2^n Nodes. // // * info: Each Node in the map has a corresponding info byte, so there are 2^n