diff --git a/_typos.toml b/_typos.toml index 42f0c700542637..9cce0142a1ac54 100644 --- a/_typos.toml +++ b/_typos.toml @@ -49,16 +49,6 @@ deciamls = 'deciamls' decalared = 'decalared' decompse = 'decompse' decompositing = 'decompositing' -defferent = 'defferent' -differenciation = 'differenciation' -differnt = 'differnt' -diffrent = 'diffrent' -difficults = 'difficults' -dimensinal = 'dimensinal' -dimenstions = 'dimenstions' -dimenstion = 'dimenstion' -dimention = 'dimention' -demension = 'demension' Direcly = 'Direcly' direcly = 'direcly' direcotory = 'direcotory' diff --git a/paddle/cinn/operator_fusion/graph_transformer/operation.h b/paddle/cinn/operator_fusion/graph_transformer/operation.h index 320c955c76c083..3aaaa2a1b0825f 100644 --- a/paddle/cinn/operator_fusion/graph_transformer/operation.h +++ b/paddle/cinn/operator_fusion/graph_transformer/operation.h @@ -113,7 +113,7 @@ struct MergeReduceTreeAndTrivialOperation { merged_node->set_fusion_iters( graph->iters_fusion_policy()->SingleDownstreamItersFusion(node, downstream)); - // TODO(huangjiyi): Support relationship analysis for defferent iters, for + // TODO(huangjiyi): Support relationship analysis for different iters, for // example the input iters and output iters of reshape op. auto sig = merged_node->fusion_iters(); const auto upstream_iters = node->fusion_iters(); diff --git a/paddle/cinn/operator_fusion/pir_graph_analyzing/dim_relation.h b/paddle/cinn/operator_fusion/pir_graph_analyzing/dim_relation.h index a1967f50d257d7..d17be091ce3603 100644 --- a/paddle/cinn/operator_fusion/pir_graph_analyzing/dim_relation.h +++ b/paddle/cinn/operator_fusion/pir_graph_analyzing/dim_relation.h @@ -19,7 +19,7 @@ namespace cinn::fusion { // TODO(@wuzhanfei) ops like a = b + b, the Value b is used by AddOp twice -// Currently we can not mark them as two differnt DimUsage +// Currently we can not mark them as two different DimUsage struct DimUsage { pir::Value v_; diff --git a/paddle/common/flags.cc b/paddle/common/flags.cc index 363dc9fb8b3670..df2ed74b3204b4 100644 --- a/paddle/common/flags.cc +++ b/paddle/common/flags.cc @@ -1106,11 +1106,11 @@ PHI_DEFINE_EXPORTED_string(cinn_subgraph_graphviz_dir, * Since Version: 3.0 Beta * Value Range: bool, default=false * Example: FLAGS_cinn_specify_input_dynamic_dim=true will use file set by - * FLAGS_cinn_input_dynamic_dim_spec_file to specify input dynamic dimention. + * FLAGS_cinn_input_dynamic_dim_spec_file to specify input dynamic dimension. */ PHI_DEFINE_EXPORTED_bool(cinn_specify_input_dynamic_dim, false, - "Whether to specify input dynamic dimention."); + "Whether to specify input dynamic dimension."); /* * CINN related FLAG @@ -1118,13 +1118,13 @@ PHI_DEFINE_EXPORTED_bool(cinn_specify_input_dynamic_dim, * Since Version: 3.0 Beta * Value Range: string, default="" * Example: FLAGS_cinn_input_dynamic_dim_spec_file="./config.json", - * FLAGS_cinn_specify_input_dynamic_dim=true would use input dynamic dimention - * predefined in ./config.json to specify input dynamic dimention. + * FLAGS_cinn_specify_input_dynamic_dim=true would use input dynamic dimension + * predefined in ./config.json to specify input dynamic dimension. */ PHI_DEFINE_EXPORTED_string( cinn_input_dynamic_dim_spec_file, "", - "File path of predefined input dynamic dimention specification."); + "File path of predefined input dynamic dimension specification."); #endif diff --git a/paddle/fluid/pir/serialize_deserialize/include/deserialize_utils.h b/paddle/fluid/pir/serialize_deserialize/include/deserialize_utils.h index ffb8d07ff0b5ed..c284b1fb8d53f0 100644 --- a/paddle/fluid/pir/serialize_deserialize/include/deserialize_utils.h +++ b/paddle/fluid/pir/serialize_deserialize/include/deserialize_utils.h @@ -428,7 +428,7 @@ pir::Attribute AttrTypeReader::ReadPaddleOperatorAttr( std::vector>(attr_json, ctx); } else if (attr_name == paddle::dialect::ScalarAttribute::name()) { VLOG(8) << "Parse ScalarAttribute ."; - // this func's return type is pir::Attribute which is diffrent + // this func's return type is pir::Attribute which is different // from paddle::dialect::ScalarAttribute return pir::deserializeAttrFromJson_scalarAttr(attr_json, ctx); } else if (attr_name == paddle::dialect::DataTypeAttribute::name()) { diff --git a/paddle/fluid/pybind/imperative.cc b/paddle/fluid/pybind/imperative.cc index a1ab35c523475d..b110d398823413 100644 --- a/paddle/fluid/pybind/imperative.cc +++ b/paddle/fluid/pybind/imperative.cc @@ -1162,7 +1162,7 @@ void BindImperative(py::module *m_ptr) { count (Tensor): The count tensor, and the data type should be `int64` currently. Besides, `count` should be placed on CPUPlace. The shape of `count` - should be one-dimensinal. + should be one-dimensional. Examples: .. code-block:: python @@ -1395,7 +1395,7 @@ void BindImperative(py::module *m_ptr) { count (Tensor): The count tensor, and the data type should be `int64` currently. Besides, `count` should be placed on CPUPlace. The shape of `count` - should be one-dimensinal. + should be one-dimensional. Examples: .. code-block:: python diff --git a/paddle/phi/backends/onednn/onednn_reuse.h b/paddle/phi/backends/onednn/onednn_reuse.h index 952c2a73b1376d..ba30fe6216cc9c 100644 --- a/paddle/phi/backends/onednn/onednn_reuse.h +++ b/paddle/phi/backends/onednn/onednn_reuse.h @@ -1751,7 +1751,7 @@ class PoolingOneDNNHandler const OneDNNContext& dev_ctx, const std::string& unique_name) { dnnl::memory::desc workspace_md = this->fwd_pd_->workspace_desc(); // Pooling Workspace has to be passed to Grad op that - // may be executed by diffrent thread, hence + // may be executed by different thread, hence // for that one we use key that does not contain TID std::string workspace_key = CreateKey(dev_ctx, workspace_md.get_dims(), diff --git a/paddle/phi/infermeta/spmd_rules/utils.cc b/paddle/phi/infermeta/spmd_rules/utils.cc index 790c03238c9511..f84a1b0f270598 100644 --- a/paddle/phi/infermeta/spmd_rules/utils.cc +++ b/paddle/phi/infermeta/spmd_rules/utils.cc @@ -299,7 +299,7 @@ void AlignDimsSharding(std::vector* input_attrs_ptr, return false; }; - // a dim can not be sharded twice along diffrent mesh_dim + // a dim can not be sharded twice along different mesh_dim std::set sharded_axis; std::map partial_dim_to_type; std::map mesh_dim_to_axis; diff --git a/paddle/phi/infermeta/unary.cc b/paddle/phi/infermeta/unary.cc index 13fca26bcc32a8..026e92b6fb93bd 100644 --- a/paddle/phi/infermeta/unary.cc +++ b/paddle/phi/infermeta/unary.cc @@ -4773,7 +4773,7 @@ void SumInferMeta(const MetaTensor& x, } void DetInferMeta(const MetaTensor& x, MetaTensor* out, MetaConfig config) { - // remove the last two demension + // remove the last two dimension auto out_dim = common::vectorize(x.dims()); out_dim.pop_back(); out_dim.pop_back(); diff --git a/paddle/phi/kernels/gpu/flash_attn_grad_kernel.cu b/paddle/phi/kernels/gpu/flash_attn_grad_kernel.cu index f9a48dd2723f10..62e45cd4c3a2df 100644 --- a/paddle/phi/kernels/gpu/flash_attn_grad_kernel.cu +++ b/paddle/phi/kernels/gpu/flash_attn_grad_kernel.cu @@ -143,11 +143,11 @@ static void kvReduceForGQA(const Context& ctx, PADDLE_ENFORCE_EQ( dk->strides()[2], 1, - common::errors::InvalidArgument("headdim dimention must be contiguous")); + common::errors::InvalidArgument("headdim dimension must be contiguous")); PADDLE_ENFORCE_EQ( dk_tmp.strides()[3], 1, - common::errors::InvalidArgument("headdim dimention must be contiguous")); + common::errors::InvalidArgument("headdim dimension must be contiguous")); const int64_t reduceDimSize = dk_tmp.dims()[2]; const size_t blockNum = std::min((static_cast(dk_tmp.dims()[0] + 31) / 32), @@ -177,19 +177,19 @@ static void kvReduceBatchedForGQA(const Context& ctx, PADDLE_ENFORCE_EQ( dk->strides()[3], 1, - common::errors::InvalidArgument("headdim dimention must be contiguous")); + common::errors::InvalidArgument("headdim dimension must be contiguous")); PADDLE_ENFORCE_EQ( dk_tmp.strides()[4], 1, - common::errors::InvalidArgument("headdim dimention must be contiguous")); + common::errors::InvalidArgument("headdim dimension must be contiguous")); PADDLE_ENFORCE_EQ(dk->strides()[0], dk->strides()[1] * dk->dims()[1], common::errors::InvalidArgument( - "batchsize dimention must be contiguous")); + "batchsize dimension must be contiguous")); PADDLE_ENFORCE_EQ(dk_tmp.strides()[0], dk_tmp.strides()[1] * dk_tmp.dims()[1], common::errors::InvalidArgument( - "batchsize dimention must be contiguous")); + "batchsize dimension must be contiguous")); const int64_t reduceDimSize = dk_tmp.dims()[3]; const size_t blockNum = std::min( (static_cast(dk_tmp.dims()[0] * dk_tmp.dims()[1] + 31) / 32), diff --git a/paddle/phi/kernels/gpu/flash_attn_utils.h b/paddle/phi/kernels/gpu/flash_attn_utils.h index aeb1232bd8568d..42cd09c21e2ddf 100644 --- a/paddle/phi/kernels/gpu/flash_attn_utils.h +++ b/paddle/phi/kernels/gpu/flash_attn_utils.h @@ -100,7 +100,7 @@ static std::vector GetAttnSparseMaskDims( rank, 4, common::errors::InvalidArgument( - "The number of dimenstions of startend_row_indices is expected to " + "The number of dimensions of startend_row_indices is expected to " "be greater or equal to 4, but recieved %d. The shape of " "startend_row_indices is [%s]", rank, diff --git a/test/cpp/inference/api/full_pascalvoc_test_preprocess.py b/test/cpp/inference/api/full_pascalvoc_test_preprocess.py index 843cf9d1c414af..949b0d2f9c444f 100644 --- a/test/cpp/inference/api/full_pascalvoc_test_preprocess.py +++ b/test/cpp/inference/api/full_pascalvoc_test_preprocess.py @@ -81,7 +81,7 @@ def convert_pascalvoc_local2bin(args): boxes = [] lbls = [] - difficults = [] + difficulties = [] object_nums = [] for line in lines: @@ -127,12 +127,12 @@ def convert_pascalvoc_local2bin(args): lbls.extend(bbox_labels[:, 0]) boxes.extend(bbox_labels[:, 1:5]) - difficults.extend(bbox_labels[:, -1]) + difficulties.extend(bbox_labels[:, -1]) f1.write(np.array(object_nums).astype('uint64').tobytes()) f1.write(np.array(lbls).astype('int64').tobytes()) f1.write(np.array(boxes).astype('float32').tobytes()) - f1.write(np.array(difficults).astype('int64').tobytes()) + f1.write(np.array(difficulties).astype('int64').tobytes()) f1.close() object_nums_sum = sum(object_nums) @@ -168,7 +168,7 @@ def convert_pascalvoc_tar2bin(tar_path, data_out_path): gt_labels = {} boxes = [] lbls = [] - difficults = [] + difficulties = [] object_nums = [] # map label to number (index) @@ -254,7 +254,7 @@ def convert_pascalvoc_tar2bin(tar_path, data_out_path): continue lbls.extend(bbox_labels[:, 0]) boxes.extend(bbox_labels[:, 1:5]) - difficults.extend(bbox_labels[:, -1]) + difficulties.extend(bbox_labels[:, -1]) if line_idx % per_percentage: print_processbar(line_idx / per_percentage) @@ -265,7 +265,7 @@ def convert_pascalvoc_tar2bin(tar_path, data_out_path): f1.write(np.array(object_nums).astype('uint64').tobytes()) f1.write(np.array(lbls).astype('int64').tobytes()) f1.write(np.array(boxes).astype('float32').tobytes()) - f1.write(np.array(difficults).astype('int64').tobytes()) + f1.write(np.array(difficulties).astype('int64').tobytes()) f1.close() print_processbar(100) print("Conversion finished!\n") diff --git a/test/cpp/pir/cinn/tile_config_performance_test.cc b/test/cpp/pir/cinn/tile_config_performance_test.cc index 0d045fe34eb521..163f3ffe0cbd45 100644 --- a/test/cpp/pir/cinn/tile_config_performance_test.cc +++ b/test/cpp/pir/cinn/tile_config_performance_test.cc @@ -631,13 +631,13 @@ void TestPerformanceForTileConfig(int spatial_left_bound, best_tile_config_map, iter_space_type); } // end of r_dimension_lower loop - } // end of s_dimention_lower loop + } // end of s_dimension_lower loop if (test_single_large) { // (II) Test in the single large areas, // i.e., S:[4096-32768]*R:[2-1024], S:[2-1024]*R:[4096-32768] for (int s_dimension_lower = 2; s_dimension_lower < 1024; s_dimension_lower += spatial_tile_config) { - // adjust the tile size for the spatial dimension dymaically + // adjust the tile size for the spatial dimension dynamically spatial_tile_config = get_tile_size_config_in_large_area(s_dimension_lower); spatial_tile_width = (is_spatial_dynamic ? spatial_tile_config : 1); diff --git a/test/ipu/test_eval_model_ipu.py b/test/ipu/test_eval_model_ipu.py index 7c34f260d37ff2..692628ecc5bae0 100644 --- a/test/ipu/test_eval_model_ipu.py +++ b/test/ipu/test_eval_model_ipu.py @@ -120,7 +120,7 @@ def _test_optimizer(self, run_ipu=True): return np.array(result) def test(self): - # cpu and ipu dimenstion mismatch, cpu:(100, 1, 1), ipu:(100, 1) + # cpu and ipu dimension mismatch, cpu:(100, 1, 1), ipu:(100, 1) ipu_loss = self._test_optimizer(True).flatten() cpu_loss = self._test_optimizer(False).flatten() self.assertTrue(ipu_loss[0] == ipu_loss[99]) diff --git a/test/ipu/test_lr_sheduler_ipu.py b/test/ipu/test_lr_sheduler_ipu.py index eb2d12b52eeb88..13c6823a73de97 100644 --- a/test/ipu/test_lr_sheduler_ipu.py +++ b/test/ipu/test_lr_sheduler_ipu.py @@ -81,7 +81,7 @@ def run_model(self, run_ipu=True): def test_training(self): data = np.random.rand(1, 3, 10, 10).astype(np.float32) self.feed = {'image': data} - # cpu and ipu dimenstion mismatch, cpu:(100, 1, 1), ipu:(100, 1) + # cpu and ipu dimension mismatch, cpu:(100, 1, 1), ipu:(100, 1) ipu_loss = self.run_model(True).flatten() cpu_loss = self.run_model(False).flatten() diff --git a/test/ipu/test_weight_decay_ipu.py b/test/ipu/test_weight_decay_ipu.py index ac8621680ad764..489b1de1785eb8 100644 --- a/test/ipu/test_weight_decay_ipu.py +++ b/test/ipu/test_weight_decay_ipu.py @@ -120,7 +120,7 @@ def exclude_fn(param): return np.array(result) def test(self): - # cpu and ipu dimenstion mismatch, cpu:(100, 1, 1), ipu:(100, 1) + # cpu and ipu dimension mismatch, cpu:(100, 1, 1), ipu:(100, 1) ipu_loss = self._test_optimizer(True).flatten() cpu_loss = self._test_optimizer(False).flatten() diff --git a/test/legacy_test/gradient_checker.py b/test/legacy_test/gradient_checker.py index 769bda2fe8416c..7997b8ecf2e98d 100644 --- a/test/legacy_test/gradient_checker.py +++ b/test/legacy_test/gradient_checker.py @@ -541,7 +541,7 @@ def double_grad_check( # TODO(jiabin): We currently support only triple grad check here, extend this to support -# higher order differenciation later. +# higher order differentiation later. # check triple grad and two outputs of the triple Kernel diff --git a/test/legacy_test/test_group_norm_op_v2.py b/test/legacy_test/test_group_norm_op_v2.py index 06432ba8740d8c..f2449f8544f1b1 100644 --- a/test/legacy_test/test_group_norm_op_v2.py +++ b/test/legacy_test/test_group_norm_op_v2.py @@ -26,7 +26,7 @@ def group_norm_naive_for_general_dimension( x, scale, bias, epsilon, groups, channel_last=False ): # original version group norm only support 4-D tensor - # this function generalizes to support differnt dimensions tensor (>= 2-D) + # this function generalizes to support different dimensions tensor (>= 2-D) if channel_last: shape = list(range(x.ndim)) shape.insert(1, shape.pop(-1))