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/9] [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 850cbaabbb112..702dda1f73e33 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 a8ccaa84f7b2f..0cfdc01b0a6b5 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 30d22c4b43a1b..d5a74bed0e1a0 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 f0520cb903502..c4777e20f519e 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 e88c08fe6bc03..7004ebe8ccd60 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 9eb08a013364f..22d7620bfd772 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/9] [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 5de5668a3d83b..313d715d47c87 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 From cfedcde1487eddefa0e49831d4e256bc64b87abe Mon Sep 17 00:00:00 2001 From: rich04lin <152049331+rich04lin@users.noreply.github.com> Date: Mon, 25 Nov 2024 20:14:24 +0800 Subject: [PATCH 3/9] [CodeStyle][Typos][C-[25-31]] Fix typos (cliping,clos,coalesc,coloumn,commericial,commiter,comparision) --- _typos.toml | 9 ++------- cmake/coverallsGcovJsons.cmake | 4 ++-- paddle/phi/kernels/sparse/gpu/sparse_attention_kernel.cu | 2 +- paddle/scripts/musl_build/README.md | 2 +- .../paddle/distributed/passes/auto_parallel_grad_clip.py | 2 +- python/paddle/incubate/optimizer/lars_momentum.py | 4 ++-- python/paddle/incubate/optimizer/lbfgs.py | 4 ++-- python/paddle/nn/clip.py | 4 ++-- python/paddle/optimizer/adadelta.py | 4 ++-- test/cpp/phi/core/test_string_tensor.cc | 2 +- 10 files changed, 16 insertions(+), 21 deletions(-) diff --git a/_typos.toml b/_typos.toml index 702dda1f73e33..244b2a1d8c492 100644 --- a/_typos.toml +++ b/_typos.toml @@ -22,6 +22,7 @@ ot = 'ot' pash = 'pash' UE = "UE" unpacket = "unpacket" +clos = 'clos' # These words need to be fixed Acceses = 'Acceses' @@ -84,13 +85,7 @@ Chunck = 'Chunck' clen = 'clen' Clas = 'Clas' clas = 'clas' -cliping = 'cliping' -clos = 'clos' -coalesc = 'coalesc' -coloumn = 'coloumn' -commericial = 'commericial' -commiter = 'commiter' -comparision = 'comparision' +#cliping = 'cliping' compability = 'compability' compatiblity = 'compatiblity' Compitable = 'Compitable' diff --git a/cmake/coverallsGcovJsons.cmake b/cmake/coverallsGcovJsons.cmake index c2b48615cef1a..6cf4b2f0ee8fb 100644 --- a/cmake/coverallsGcovJsons.cmake +++ b/cmake/coverallsGcovJsons.cmake @@ -74,8 +74,8 @@ if(GIT_FOUND) message("Git branch: ${GIT_BRANCH}") message("Git author: ${GIT_AUTHOR_NAME}") message("Git e-mail: ${GIT_AUTHOR_EMAIL}") - message("Git commiter name: ${GIT_COMMITTER_NAME}") - message("Git commiter e-mail: ${GIT_COMMITTER_EMAIL}") + message("Git committer name: ${GIT_COMMITTER_NAME}") + message("Git committer e-mail: ${GIT_COMMITTER_EMAIL}") message("Git commit message: ${GIT_COMMIT_MESSAGE}") endif() diff --git a/paddle/phi/kernels/sparse/gpu/sparse_attention_kernel.cu b/paddle/phi/kernels/sparse/gpu/sparse_attention_kernel.cu index e9f39b074eb31..c671a3d4c6d0e 100644 --- a/paddle/phi/kernels/sparse/gpu/sparse_attention_kernel.cu +++ b/paddle/phi/kernels/sparse/gpu/sparse_attention_kernel.cu @@ -86,7 +86,7 @@ __global__ void BlockSparseSoftmaxForward(T* softmax, const T* attnptr = (attn_mask == nullptr) ? nullptr : (attn_mask + cur_block_row * num_rows); - // the coloumn start index in current row + // the column start index in current row const int* colindex = layout_colindex + layout_rowptr[cur_block_row]; for (int j = 0; j < iter; j++) { int cur_block_col = j * WarpSize + threadIdx.x; diff --git a/paddle/scripts/musl_build/README.md b/paddle/scripts/musl_build/README.md index eeede34385fdd..baf96eb3e2e90 100644 --- a/paddle/scripts/musl_build/README.md +++ b/paddle/scripts/musl_build/README.md @@ -2,7 +2,7 @@ Paddle for Linux-musl Usage Guide =========================================== # Introduction -Paddle can be built for linux-musl such as alpine, and be used in libos-liked SGX TEE environment. Currently supported commericial product TEE Scone, and community maintanced TEE Occlum. We also working on to support open source TEE Graphene. +Paddle can be built for linux-musl such as alpine, and be used in libos-liked SGX TEE environment. Currently supported commercial product TEE Scone, and community maintanced TEE Occlum. We also working on to support open source TEE Graphene. # Build Automatically diff --git a/python/paddle/distributed/passes/auto_parallel_grad_clip.py b/python/paddle/distributed/passes/auto_parallel_grad_clip.py index 4daaf1c0681cc..5d38fd5192f24 100644 --- a/python/paddle/distributed/passes/auto_parallel_grad_clip.py +++ b/python/paddle/distributed/passes/auto_parallel_grad_clip.py @@ -523,7 +523,7 @@ def _remove_no_need_ops_vars(self, block): OpRole.Optimize, process_mesh=[ -1 - ], # hack to avoid initialize the dist attr for coalesc var + ], # hack to avoid initialize the dist attr for coalesce var is_recompute=False, sync=False, op_namescope="grad_clip_fill_constant_dep", diff --git a/python/paddle/incubate/optimizer/lars_momentum.py b/python/paddle/incubate/optimizer/lars_momentum.py index 60dcde1d8a0e9..f11aadcf6a710 100644 --- a/python/paddle/incubate/optimizer/lars_momentum.py +++ b/python/paddle/incubate/optimizer/lars_momentum.py @@ -51,8 +51,8 @@ class LarsMomentumOptimizer(Optimizer): regularizer using :ref:`api_paddle_ParamAttr` already, the regularization setting here in optimizer will be \ ignored for this parameter. Otherwise, the regularization setting here in optimizer will take effect. \ Default None, meaning there is no regularization. - grad_clip (GradientClipBase, optional): Gradient cliping strategy, it's an instance of - some derived class of ``GradientClipBase`` . There are three cliping strategies + grad_clip (GradientClipBase, optional): Gradient clipping strategy, it's an instance of + some derived class of ``GradientClipBase`` . There are three clipping strategies ( :ref:`api_paddle_nn_ClipGradByGlobalNorm` , :ref:`api_paddle_nn_ClipGradByNorm` , :ref:`api_paddle_nn_ClipGradByValue` ). Default None, meaning there is no gradient clipping. name (str, optional): This parameter is used by developers to print debugging information. \ diff --git a/python/paddle/incubate/optimizer/lbfgs.py b/python/paddle/incubate/optimizer/lbfgs.py index a130c815cdd54..2f64953a8298a 100644 --- a/python/paddle/incubate/optimizer/lbfgs.py +++ b/python/paddle/incubate/optimizer/lbfgs.py @@ -73,8 +73,8 @@ class LBFGS(Optimizer): the regularization setting here in optimizer will be ignored for this parameter. \ Otherwise, the regularization setting here in optimizer will take effect. \ Default None, meaning there is no regularization. - grad_clip (GradientClipBase, optional): Gradient cliping strategy, it's an instance of \ - some derived class of ``GradientClipBase`` . There are three cliping strategies \ + grad_clip (GradientClipBase, optional): Gradient clipping strategy, it's an instance of \ + some derived class of ``GradientClipBase`` . There are three clipping strategies \ ( :ref:`api_paddle_nn_ClipGradByGlobalNorm` , :ref:`api_paddle_nn_ClipGradByNorm` , \ :ref:`api_paddle_nn_ClipGradByValue` ). Default None, meaning there is no gradient clipping. name (str, optional): Normally there is no need for user to set this property. diff --git a/python/paddle/nn/clip.py b/python/paddle/nn/clip.py index 66f476e1055bb..df8aae7ec45cd 100644 --- a/python/paddle/nn/clip.py +++ b/python/paddle/nn/clip.py @@ -1326,8 +1326,8 @@ def set_gradient_clip(clip, param_list=None, program=None): To specify parameters that require gradient clip. Args: - grad_clip (GradientClipBase, optional): Gradient cliping strategy, it's an instance of - some derived class of ``GradientClipBase`` . There are three cliping strategies + grad_clip (GradientClipBase, optional): Gradient clipping strategy, it's an instance of + some derived class of ``GradientClipBase`` . There are three clipping strategies ( :ref:`api_paddle_nn_ClipGradByGlobalNorm` , :ref:`api_paddle_nn_ClipGradByNorm` , :ref:`api_paddle_nn_ClipGradByValue` ). Default value: None, and there is no gradient clipping. diff --git a/python/paddle/optimizer/adadelta.py b/python/paddle/optimizer/adadelta.py index 59528197b1865..acbb05e3164c9 100644 --- a/python/paddle/optimizer/adadelta.py +++ b/python/paddle/optimizer/adadelta.py @@ -79,8 +79,8 @@ class Adadelta(Optimizer): the regularization setting here in optimizer will be ignored for this parameter. \ Otherwise, the regularization setting here in optimizer will take effect. \ Default None, meaning there is no regularization. - grad_clip (GradientClipBase|None, optional): Gradient cliping strategy, it's an instance of - some derived class of ``GradientClipBase`` . There are three cliping strategies + grad_clip (GradientClipBase|None, optional): Gradient clipping strategy, it's an instance of + some derived class of ``GradientClipBase`` . There are three clipping strategies ( :ref:`api_paddle_nn_ClipGradByGlobalNorm` , :ref:`api_paddle_nn_ClipGradByNorm` , :ref:`api_paddle_nn_ClipGradByValue` ). Default None, meaning there is no gradient clipping. name (str|None, optional): The default value is None. Normally there is no need for user diff --git a/test/cpp/phi/core/test_string_tensor.cc b/test/cpp/phi/core/test_string_tensor.cc index d6df1baab01c0..b9f4b0fcd91f6 100644 --- a/test/cpp/phi/core/test_string_tensor.cc +++ b/test/cpp/phi/core/test_string_tensor.cc @@ -267,7 +267,7 @@ TEST(pstring, func) { common::errors::InvalidArgument( "The oss2 should be '%s', but got '%s'.", long_str, oss2.str())); - // Test comparision operators + // Test comparison operators PADDLE_ENFORCE_EQ((long_str < short_str), true, common::errors::InvalidArgument( From be2fd4b66991f4f158bbc9db5616dd23cbf53d4e Mon Sep 17 00:00:00 2001 From: rich04lin <152049331+rich04lin@users.noreply.github.com> Date: Mon, 25 Nov 2024 22:45:59 +0800 Subject: [PATCH 4/9] [CodeStyle][Typos][C-[25-31]] Fix typos (cliping,clos,coalesc,coloumn,commericial,commiter,comparision) --- _typos.toml | 2 -- test/legacy_test/test_sparse_utils_op.py | 24 ++++++++++++------------ 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/_typos.toml b/_typos.toml index 244b2a1d8c492..ec5da8f50e6cd 100644 --- a/_typos.toml +++ b/_typos.toml @@ -22,7 +22,6 @@ ot = 'ot' pash = 'pash' UE = "UE" unpacket = "unpacket" -clos = 'clos' # These words need to be fixed Acceses = 'Acceses' @@ -85,7 +84,6 @@ Chunck = 'Chunck' clen = 'clen' Clas = 'Clas' clas = 'clas' -#cliping = 'cliping' compability = 'compability' compatiblity = 'compatiblity' Compitable = 'Compitable' diff --git a/test/legacy_test/test_sparse_utils_op.py b/test/legacy_test/test_sparse_utils_op.py index 98fe07c0ca137..0db09f825695c 100644 --- a/test/legacy_test/test_sparse_utils_op.py +++ b/test/legacy_test/test_sparse_utils_op.py @@ -128,32 +128,32 @@ def test_create_coo_no_shape(self): def test_create_csr_no_shape(self): # 2D sparse tensor crows = [0, 2, 3, 5] - clos = [1, 3, 2, 0, 1] + cols = [1, 3, 2, 0, 1] values = [1.0, 2.0, 3.0, 4.0, 5.0] crows = paddle.to_tensor(crows, dtype='int32') - clos = paddle.to_tensor(clos, dtype='int32') + cols = paddle.to_tensor(cols, dtype='int32') values = paddle.to_tensor(values, dtype='float32') - csr = paddle.sparse.sparse_csr_tensor(crows, clos, values) + csr = paddle.sparse.sparse_csr_tensor(crows, cols, values) assert [3, 4] == csr.shape # 3D sparse tensor crows = [0, 2, 2, 0, 1, 1, 0, 0, 0] - clos = [0, 1, 1] + cols = [0, 1, 1] values = [1, 2, 5] crows = paddle.to_tensor(crows, dtype='int32') - clos = paddle.to_tensor(clos, dtype='int32') + cols = paddle.to_tensor(cols, dtype='int32') values = paddle.to_tensor(values, dtype='float32') - csr = paddle.sparse.sparse_csr_tensor(crows, clos, values) + csr = paddle.sparse.sparse_csr_tensor(crows, cols, values) assert [3, 2, 2] == csr.shape # 3D sparse tensor crows = [0, 1, 2, 0, 1, 1, 0, 1, 2] - clos = [0, 2, 1, 0, 1] + cols = [0, 2, 1, 0, 1] values = [1, 2, 3, 4, 5] crows = paddle.to_tensor(crows, dtype='int32') - clos = paddle.to_tensor(clos, dtype='int32') + cols = paddle.to_tensor(cols, dtype='int32') values = paddle.to_tensor(values, dtype='float32') - csr = paddle.sparse.sparse_csr_tensor(crows, clos, values) + csr = paddle.sparse.sparse_csr_tensor(crows, cols, values) assert [3, 2, 3] == csr.shape @@ -523,12 +523,12 @@ def test_dtype(self): def test_error_crows(self): with self.assertRaises(ValueError): crows = [0, 2, 2, 0, 1, 1, 0, 0, 0, 0] - clos = [0, 1, 1] + cols = [0, 1, 1] values = [1, 2, 5] crows = paddle.to_tensor(crows, dtype='int32') - clos = paddle.to_tensor(clos, dtype='int32') + cols = paddle.to_tensor(cols, dtype='int32') values = paddle.to_tensor(values, dtype='float32') - coo = paddle.sparse.sparse_csr_tensor(crows, clos, values) + coo = paddle.sparse.sparse_csr_tensor(crows, cols, values) devices = [] From 22ed7d73e47616de77f3eb4203ac7f07c5715c2d Mon Sep 17 00:00:00 2001 From: rich04lin <152049331+rich04lin@users.noreply.github.com> Date: Tue, 26 Nov 2024 22:20:23 +0800 Subject: [PATCH 5/9] [CodeStyle][Typos][C-[22-24]] Fix typos (Chunck,clen,Clas,clas) --- _typos.toml | 6 ++---- paddle/fluid/pir/dialect/operator/ir/api_builder.h | 4 ++-- paddle/fluid/pybind/pir.cc | 4 ++-- paddle/phi/api/profiler/event_tracing.h | 2 +- test/cpp/inference/infer_ut/run.sh | 4 ++-- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/_typos.toml b/_typos.toml index ec5da8f50e6cd..4da748da099b3 100644 --- a/_typos.toml +++ b/_typos.toml @@ -22,6 +22,8 @@ ot = 'ot' pash = 'pash' UE = "UE" unpacket = "unpacket" +clen = 'clen' +Clas = 'Clas' # These words need to be fixed Acceses = 'Acceses' @@ -80,10 +82,6 @@ cann = 'cann' vart = 'vart' checkings = 'checkings' childs = 'childs' -Chunck = 'Chunck' -clen = 'clen' -Clas = 'Clas' -clas = 'clas' compability = 'compability' compatiblity = 'compatiblity' Compitable = 'Compitable' diff --git a/paddle/fluid/pir/dialect/operator/ir/api_builder.h b/paddle/fluid/pir/dialect/operator/ir/api_builder.h index 6d6fb89912f9f..251905a1eb831 100644 --- a/paddle/fluid/pir/dialect/operator/ir/api_builder.h +++ b/paddle/fluid/pir/dialect/operator/ir/api_builder.h @@ -78,8 +78,8 @@ class ApiBuilder { void SetOpRole(int op_role) { builder_->set_op_role(op_role); } int GetOpRole() const { return builder_->op_role(); } - void SetChunckId(int chunk_id) { builder_->set_chunk_id(chunk_id); } - int GetChunckId() const { return builder_->chunk_id(); } + void SetChunkId(int chunk_id) { builder_->set_chunk_id(chunk_id); } + int GetChunkId() const { return builder_->chunk_id(); } private: ApiBuilder(); diff --git a/paddle/fluid/pybind/pir.cc b/paddle/fluid/pybind/pir.cc index f18013706b407..6dfe62919265d 100644 --- a/paddle/fluid/pybind/pir.cc +++ b/paddle/fluid/pybind/pir.cc @@ -2191,8 +2191,8 @@ void BindUtils(pybind11::module *m) { m->def("reset_insertion_point_to_end", []() { ApiBuilder::Instance().ResetInsertionPointToEnd(); }); m->def("set_chunk_id", - [](int chunk_id) { ApiBuilder::Instance().SetChunckId(chunk_id); }); - m->def("get_chunk_id", []() { return ApiBuilder::Instance().GetChunckId(); }); + [](int chunk_id) { ApiBuilder::Instance().SetChunkId(chunk_id); }); + m->def("get_chunk_id", []() { return ApiBuilder::Instance().GetChunkId(); }); m->def("set_op_role", [](int op_role) { ApiBuilder::Instance().SetOpRole(op_role); }); m->def("get_op_role", []() { return ApiBuilder::Instance().GetOpRole(); }); diff --git a/paddle/phi/api/profiler/event_tracing.h b/paddle/phi/api/profiler/event_tracing.h index cb1717458f380..e86c937d8e630 100644 --- a/paddle/phi/api/profiler/event_tracing.h +++ b/paddle/phi/api/profiler/event_tracing.h @@ -26,7 +26,7 @@ namespace phi { // It is Recommended to set the level explicitly. static constexpr uint32_t kDefaultTraceLevel = 4; -// Host event tracing. A trace starts when an object of this clas is created and +// Host event tracing. A trace starts when an object of this class is created and // stops when the object is destroyed. // Chrome Trace Viewer Format: Duration Event/Complete Event class TEST_API RecordEvent { diff --git a/test/cpp/inference/infer_ut/run.sh b/test/cpp/inference/infer_ut/run.sh index a4aa7c0c2d943..a594fbbc202ff 100755 --- a/test/cpp/inference/infer_ut/run.sh +++ b/test/cpp/inference/infer_ut/run.sh @@ -94,8 +94,8 @@ for model_name in $ocr_download_list; do download $url_prefix $model_name done -clas_download_list='LeViT' -for model_name in $clas_download_list; do +class_download_list='LeViT' +for model_name in $class_download_list; do url_prefix="https://paddle-qa.bj.bcebos.com/inference_model/2.1.1/class" download $url_prefix $model_name done From e8fbc3f4e27cd387b1b7a3256c672fa5f81805c7 Mon Sep 17 00:00:00 2001 From: rich04lin <152049331+rich04lin@users.noreply.github.com> Date: Tue, 26 Nov 2024 23:09:53 +0800 Subject: [PATCH 6/9] [CodeStyle][Typos][C-[22-24]] Fix typos (Chunck,clen,Clas,clas) --- test/cpp/inference/infer_ut/run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/cpp/inference/infer_ut/run.sh b/test/cpp/inference/infer_ut/run.sh index a594fbbc202ff..a4aa7c0c2d943 100755 --- a/test/cpp/inference/infer_ut/run.sh +++ b/test/cpp/inference/infer_ut/run.sh @@ -94,8 +94,8 @@ for model_name in $ocr_download_list; do download $url_prefix $model_name done -class_download_list='LeViT' -for model_name in $class_download_list; do +clas_download_list='LeViT' +for model_name in $clas_download_list; do url_prefix="https://paddle-qa.bj.bcebos.com/inference_model/2.1.1/class" download $url_prefix $model_name done From f86b52d20f055005971212cbab8ace9ed7d06b74 Mon Sep 17 00:00:00 2001 From: rich04lin <152049331+rich04lin@users.noreply.github.com> Date: Tue, 26 Nov 2024 23:14:07 +0800 Subject: [PATCH 7/9] [CodeStyle][Typos][C-[22-24]] Fix typos (Chunck,clen,Clas,clas) --- _typos.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_typos.toml b/_typos.toml index 10b957e7c731e..a1cf727fb44ba 100644 --- a/_typos.toml +++ b/_typos.toml @@ -12,6 +12,8 @@ extend-exclude = [ anc = 'anc' arange = "arange" astroid = 'astroid' +Clas = 'Clas' +clen = 'clen' dout = "dout" eles = 'eles' grad = "grad" @@ -22,8 +24,6 @@ ot = 'ot' pash = 'pash' UE = "UE" unpacket = "unpacket" -clen = 'clen' -Clas = 'Clas' # These words need to be fixed Acceses = 'Acceses' From 5467f854b3db87ee927feee937a8f1914fa47b91 Mon Sep 17 00:00:00 2001 From: rich04lin <152049331+rich04lin@users.noreply.github.com> Date: Wed, 27 Nov 2024 13:04:15 +0800 Subject: [PATCH 8/9] [CodeStyle][Typos][C-[22-24]] Fix typos (Chunck,clen,Clas,clas) --- paddle/phi/api/profiler/event_tracing.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/paddle/phi/api/profiler/event_tracing.h b/paddle/phi/api/profiler/event_tracing.h index e86c937d8e630..918d6da127c2e 100644 --- a/paddle/phi/api/profiler/event_tracing.h +++ b/paddle/phi/api/profiler/event_tracing.h @@ -26,9 +26,9 @@ namespace phi { // It is Recommended to set the level explicitly. static constexpr uint32_t kDefaultTraceLevel = 4; -// Host event tracing. A trace starts when an object of this class is created and -// stops when the object is destroyed. -// Chrome Trace Viewer Format: Duration Event/Complete Event +// Host event tracing. A trace starts when an object of this class is created +// and stops when the object is destroyed. Chrome Trace Viewer Format: Duration +// Event/Complete Event class TEST_API RecordEvent { public: static bool IsEnabled(); From 9e5ff65f46a9e246dc9908a84bd08304918ab890 Mon Sep 17 00:00:00 2001 From: SigureMo Date: Wed, 27 Nov 2024 14:16:40 +0800 Subject: [PATCH 9/9] re-format code --- paddle/phi/api/profiler/event_tracing.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/phi/api/profiler/event_tracing.h b/paddle/phi/api/profiler/event_tracing.h index 918d6da127c2e..d44192b45206f 100644 --- a/paddle/phi/api/profiler/event_tracing.h +++ b/paddle/phi/api/profiler/event_tracing.h @@ -27,8 +27,8 @@ namespace phi { static constexpr uint32_t kDefaultTraceLevel = 4; // Host event tracing. A trace starts when an object of this class is created -// and stops when the object is destroyed. Chrome Trace Viewer Format: Duration -// Event/Complete Event +// and stops when the object is destroyed. +// Chrome Trace Viewer Format: Duration Event/Complete Event class TEST_API RecordEvent { public: static bool IsEnabled();