From 2782b29179ed3498f36a06bb35a28cf3cb61da20 Mon Sep 17 00:00:00 2001 From: co63oc Date: Thu, 18 May 2023 14:14:29 +0800 Subject: [PATCH] Fix typos in elementwise dir (#53907) --- paddle/fluid/operators/elementwise/elementwise_add_op.cc | 2 +- paddle/fluid/operators/elementwise/elementwise_div_op.cc | 2 +- paddle/fluid/operators/elementwise/elementwise_floordiv_op.cc | 2 +- .../fluid/operators/elementwise/elementwise_heaviside_op.cc | 2 +- paddle/fluid/operators/elementwise/elementwise_max_op.cc | 4 ++-- paddle/fluid/operators/elementwise/elementwise_min_op.cc | 4 ++-- paddle/fluid/operators/elementwise/elementwise_mod_op.cc | 2 +- paddle/fluid/operators/elementwise/elementwise_mul_op.cc | 2 +- paddle/fluid/operators/elementwise/elementwise_op.h | 4 ++-- paddle/fluid/operators/elementwise/elementwise_pow_op.cc | 2 +- paddle/fluid/operators/elementwise/elementwise_sub_op.cc | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/paddle/fluid/operators/elementwise/elementwise_add_op.cc b/paddle/fluid/operators/elementwise/elementwise_add_op.cc index 0b522c1d6b3..91ed63b3e2e 100644 --- a/paddle/fluid/operators/elementwise/elementwise_add_op.cc +++ b/paddle/fluid/operators/elementwise/elementwise_add_op.cc @@ -46,7 +46,7 @@ class ElementwiseAddOpMaker : public ElementwiseOpMaker { "should be int32, int64, float32, float64."); } - std::string GetOpFuntionality() const override { + std::string GetOpFunctionality() const override { return "Add two tensors element-wise"; } }; diff --git a/paddle/fluid/operators/elementwise/elementwise_div_op.cc b/paddle/fluid/operators/elementwise/elementwise_div_op.cc index 88856658d31..7321157f9c2 100644 --- a/paddle/fluid/operators/elementwise/elementwise_div_op.cc +++ b/paddle/fluid/operators/elementwise/elementwise_div_op.cc @@ -44,7 +44,7 @@ class ElementwiseDivOpMaker : public ElementwiseOpMaker { "should be int32, int64, float32, float64."); } - std::string GetOpFuntionality() const override { + std::string GetOpFunctionality() const override { return "Divide two tensors element-wise"; } }; diff --git a/paddle/fluid/operators/elementwise/elementwise_floordiv_op.cc b/paddle/fluid/operators/elementwise/elementwise_floordiv_op.cc index 27c12c300bd..72011de26af 100644 --- a/paddle/fluid/operators/elementwise/elementwise_floordiv_op.cc +++ b/paddle/fluid/operators/elementwise/elementwise_floordiv_op.cc @@ -48,7 +48,7 @@ class ElementwiseFloorDivOpMaker : public ElementwiseOpMaker { "should be int32, int64."); } - std::string GetOpFuntionality() const override { + std::string GetOpFunctionality() const override { return "Floor divide two tensors element-wise"; } }; diff --git a/paddle/fluid/operators/elementwise/elementwise_heaviside_op.cc b/paddle/fluid/operators/elementwise/elementwise_heaviside_op.cc index 14e5e10743d..c13c6165c6b 100644 --- a/paddle/fluid/operators/elementwise/elementwise_heaviside_op.cc +++ b/paddle/fluid/operators/elementwise/elementwise_heaviside_op.cc @@ -36,7 +36,7 @@ class ElementwiseHeavisideOpMaker : public ElementwiseOpMaker { "which is the value when X = 0. Its dtype should be same as X."); } - std::string GetOpFuntionality() const override { + std::string GetOpFunctionality() const override { return "Computes the Heaviside step function determined by Y " "for each element in X."; } diff --git a/paddle/fluid/operators/elementwise/elementwise_max_op.cc b/paddle/fluid/operators/elementwise/elementwise_max_op.cc index a945456a226..ead7b122be2 100644 --- a/paddle/fluid/operators/elementwise/elementwise_max_op.cc +++ b/paddle/fluid/operators/elementwise/elementwise_max_op.cc @@ -44,7 +44,7 @@ class ElementwiseMaxOpMaker : public ElementwiseOpMaker { AddInput("Y", "The second tensor holding the elements to be compared."); } - std::string GetOpFuntionality() const override { + std::string GetOpFunctionality() const override { return "Compare two tensors and returns a new tensor containing the " "element-wise maxima."; } @@ -63,7 +63,7 @@ class ElementwiseFMaxOpMaker : public ElementwiseOpMaker { AddInput("Y", "The second tensor holding the elements to be compared."); } - std::string GetOpFuntionality() const override { + std::string GetOpFunctionality() const override { return "Compare two tensors and returns a new tensor containing the " "element-wise maxima. If the element of one tensor is nan, " "return the element value of the other tensor, if both are nan, " diff --git a/paddle/fluid/operators/elementwise/elementwise_min_op.cc b/paddle/fluid/operators/elementwise/elementwise_min_op.cc index 9fd70754888..cfc93e791fd 100644 --- a/paddle/fluid/operators/elementwise/elementwise_min_op.cc +++ b/paddle/fluid/operators/elementwise/elementwise_min_op.cc @@ -41,7 +41,7 @@ class ElementwiseMinOpMaker : public ElementwiseOpMaker { AddInput("Y", "The second tensor holding the elements to be compared."); } - std::string GetOpFuntionality() const override { + std::string GetOpFunctionality() const override { return "Compare two tensors and returns a new tensor containing the " "element-wise minima."; } @@ -60,7 +60,7 @@ class ElementwiseFMinOpMaker : public ElementwiseOpMaker { AddInput("Y", "The second tensor holding the elements to be compared."); } - std::string GetOpFuntionality() const override { + std::string GetOpFunctionality() const override { return "Compare two tensors and returns a new tensor containing the " "element-wise minima. If the element of one tensor is nan, " "return the element value of the other tensor, if both are nan, " diff --git a/paddle/fluid/operators/elementwise/elementwise_mod_op.cc b/paddle/fluid/operators/elementwise/elementwise_mod_op.cc index 4caeaf4180f..5a98351b446 100644 --- a/paddle/fluid/operators/elementwise/elementwise_mod_op.cc +++ b/paddle/fluid/operators/elementwise/elementwise_mod_op.cc @@ -46,7 +46,7 @@ class ElementwiseModOpMaker : public ElementwiseOpMaker { "should be int32, int64, float32 or float64."); } - std::string GetOpFuntionality() const override { + std::string GetOpFunctionality() const override { return "Mod two tensors element-wise"; } }; diff --git a/paddle/fluid/operators/elementwise/elementwise_mul_op.cc b/paddle/fluid/operators/elementwise/elementwise_mul_op.cc index 0fc1cab7391..9967d0fd95c 100644 --- a/paddle/fluid/operators/elementwise/elementwise_mul_op.cc +++ b/paddle/fluid/operators/elementwise/elementwise_mul_op.cc @@ -44,7 +44,7 @@ class ElementwiseMulOpMaker : public ElementwiseOpMaker { "should be int32, int64, float32, float64."); } - std::string GetOpFuntionality() const override { + std::string GetOpFunctionality() const override { return "Multiply two tensors element-wise"; } }; diff --git a/paddle/fluid/operators/elementwise/elementwise_op.h b/paddle/fluid/operators/elementwise/elementwise_op.h index 2f8db0e737a..67954e3fa26 100644 --- a/paddle/fluid/operators/elementwise/elementwise_op.h +++ b/paddle/fluid/operators/elementwise/elementwise_op.h @@ -225,7 +225,7 @@ class ElementwiseOpMaker : public framework::OpProtoAndCheckerMaker { } virtual void AddOpComment() { AddComment(GetCommentExamples()); } - virtual std::string GetOpFuntionality() const { return ""; } + virtual std::string GetOpFunctionality() const { return ""; } virtual std::string GetName() const = 0; virtual std::string GetEquation() const = 0; @@ -269,7 +269,7 @@ For example: )DOC", GetName(), - GetOpFuntionality(), + GetOpFunctionality(), GetEquation()); } }; diff --git a/paddle/fluid/operators/elementwise/elementwise_pow_op.cc b/paddle/fluid/operators/elementwise/elementwise_pow_op.cc index d2c047f0e4b..34f9e6f61cb 100644 --- a/paddle/fluid/operators/elementwise/elementwise_pow_op.cc +++ b/paddle/fluid/operators/elementwise/elementwise_pow_op.cc @@ -76,7 +76,7 @@ class ElementwisePowOpMaker : public ElementwiseOpMaker { void AddInputY() override { AddInput("Y", "(Variable), The exponents."); } - std::string GetOpFuntionality() const override { + std::string GetOpFunctionality() const override { return "First tensor elements raised to powers from the second tensor, " "element-wise."; } diff --git a/paddle/fluid/operators/elementwise/elementwise_sub_op.cc b/paddle/fluid/operators/elementwise/elementwise_sub_op.cc index 0c8c9bc6e80..87c4e497725 100644 --- a/paddle/fluid/operators/elementwise/elementwise_sub_op.cc +++ b/paddle/fluid/operators/elementwise/elementwise_sub_op.cc @@ -49,7 +49,7 @@ class ElementwiseSubOpMaker : public ElementwiseOpMaker { "should be int32, int64, float32, float64."); } - std::string GetOpFuntionality() const override { + std::string GetOpFunctionality() const override { return "Substract two tensors element-wise"; } }; -- GitLab