diff --git a/mindspore/core/ops/LayerNormBetaGammaBackprop.h b/mindspore/core/ops/LayerNormBetaGammaBackprop.h index cd5f35bc00c..ee88a650b30 100644 --- a/mindspore/core/ops/LayerNormBetaGammaBackprop.h +++ b/mindspore/core/ops/LayerNormBetaGammaBackprop.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,10 +26,12 @@ namespace mindspore { namespace ops { +constexpr auto kNameLayerNormBetaGammaBackprop = "LayerNormBetaGammaBackprop"; + class MIND_API LayerNormBetaGammaBackprop : public BaseOperator { public: MIND_API_BASE_MEMBER(LayerNormBetaGammaBackprop); - LayerNormBetaGammaBackprop() : BaseOperator("LayerNormBetaGammaBackprop") {} + LayerNormBetaGammaBackprop() : BaseOperator(kNameLayerNormBetaGammaBackprop) {} void Init() const {} }; diff --git a/mindspore/core/ops/LayerNormXBackprop.h b/mindspore/core/ops/LayerNormXBackprop.h index 17a112bd12a..0eaade7a233 100644 --- a/mindspore/core/ops/LayerNormXBackprop.h +++ b/mindspore/core/ops/LayerNormXBackprop.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,10 +26,12 @@ namespace mindspore { namespace ops { +constexpr auto kNameLayerNormXBackprop = "LayerNormXBackprop"; + class MIND_API LayerNormXBackprop : public BaseOperator { public: MIND_API_BASE_MEMBER(LayerNormXBackprop); - LayerNormXBackprop() : BaseOperator("LayerNormXBackprop") {} + LayerNormXBackprop() : BaseOperator(kNameLayerNormXBackprop) {} void Init() const {} }; diff --git a/mindspore/core/ops/abs.cc b/mindspore/core/ops/abs.cc index 708654c2ec3..cc2f90de689 100644 --- a/mindspore/core/ops/abs.cc +++ b/mindspore/core/ops/abs.cc @@ -1,5 +1,5 @@ /** - * Copyright 2020-2021 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/mindspore/core/ops/abs.h b/mindspore/core/ops/abs.h index 937652acd4b..f765e18fbc9 100644 --- a/mindspore/core/ops/abs.h +++ b/mindspore/core/ops/abs.h @@ -1,5 +1,5 @@ /** - * Copyright 2020-2021 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,13 +24,15 @@ namespace mindspore { namespace ops { +constexpr auto kNameAbs = "Abs"; + /// \brief Returns absolute value of a tensor element-wise. /// Refer to Python API @ref mindspore.ops.Abs for more details. class MIND_API Abs : public BaseOperator { public: MIND_API_BASE_MEMBER(Abs); /// \brief Constructor. - Abs() : BaseOperator("Abs") { InitIOName({"input_x"}, {"output"}); } + Abs() : BaseOperator(kNameAbs) { InitIOName({"input_x"}, {"output"}); } /// \brief Init. Refer to the parameters of Python API @ref mindspore.ops.Abs for the inputs. void Init() const {} }; diff --git a/mindspore/core/ops/apply_adagrad_d_a.h b/mindspore/core/ops/apply_adagrad_d_a.h index 1ff15db7f2b..a5a5a64bda9 100644 --- a/mindspore/core/ops/apply_adagrad_d_a.h +++ b/mindspore/core/ops/apply_adagrad_d_a.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,7 +42,6 @@ class MIND_API ApplyAdagradDA : public BaseOperator { abstract::AbstractBasePtr ApplyAdagradDAInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive, const std::vector &input_args); - } // namespace ops } // namespace mindspore #endif // MINDSPORE_CORE_OPS_APPLY_ADAGRAD_D_A_H_ diff --git a/mindspore/core/ops/approximate_equal.h b/mindspore/core/ops/approximate_equal.h index d35227899f7..4780c994b2e 100644 --- a/mindspore/core/ops/approximate_equal.h +++ b/mindspore/core/ops/approximate_equal.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,10 +23,12 @@ namespace mindspore { namespace ops { +constexpr auto kNameApproximateEqual = "ApproximateEqual"; + class MIND_API ApproximateEqual : public BaseOperator { public: MIND_API_BASE_MEMBER(ApproximateEqual); - ApproximateEqual() : BaseOperator("ApproximateEqual") {} + ApproximateEqual() : BaseOperator(kNameApproximateEqual) {} void Init() {} }; abstract::AbstractBasePtr ApproximateEqualInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive, diff --git a/mindspore/core/ops/assign.h b/mindspore/core/ops/assign.h index b900c02968c..b2a81905755 100644 --- a/mindspore/core/ops/assign.h +++ b/mindspore/core/ops/assign.h @@ -1,5 +1,5 @@ /** - * Copyright 2020 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,7 +34,6 @@ class MIND_API Assign : public BaseOperator { /// \brief Init. Refer to the parameters of Python API @ref mindspore.ops.Assign for the inputs. void Init() const {} }; - } // namespace ops } // namespace mindspore diff --git a/mindspore/core/ops/avg_pool_3d.h b/mindspore/core/ops/avg_pool_3d.h index 87b7a06c42a..fb07bf3ba3f 100644 --- a/mindspore/core/ops/avg_pool_3d.h +++ b/mindspore/core/ops/avg_pool_3d.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,12 +26,14 @@ namespace mindspore { namespace ops { +constexpr auto kNameAvgPool3D = "AvgPool3D"; + /// \brief 3D Average pooling operation. Refer to Python API @ref mindspore.ops.AvgPool3D for more details. class MIND_API AvgPool3D : public BaseOperator { public: MIND_API_BASE_MEMBER(AvgPool3D); /// \brief Constructor. - AvgPool3D() : BaseOperator("AvgPool3D") { InitIOName({"input"}, {"output"}); } + AvgPool3D() : BaseOperator(kNameAvgPool3D) { InitIOName({"input"}, {"output"}); } }; abstract::AbstractBasePtr AvgPool3DInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive, diff --git a/mindspore/core/ops/batch_matmul.h b/mindspore/core/ops/batch_matmul.h index 909ef196614..696c66a93b9 100644 --- a/mindspore/core/ops/batch_matmul.h +++ b/mindspore/core/ops/batch_matmul.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,13 +23,15 @@ namespace mindspore { namespace ops { +constexpr auto kNameBatchMatMul = "BatchMatMul"; + /// \brief Computes matrix multiplication between two tensors by batch. /// Refer to Python API @ref mindspore.ops.BatchMatmul for more details. class MIND_API BatchMatmul : public BaseOperator { public: MIND_API_BASE_MEMBER(BatchMatmul); /// \brief Constructor. - BatchMatmul() : BaseOperator("BatchMatMul") { InitIOName({"x1", "x2"}, {"output"}); } + BatchMatmul() : BaseOperator(kNameBatchMatMul) { InitIOName({"x1", "x2"}, {"output"}); } /// \brief Init. Refer to the parameters of Python API @ref mindspore.ops.BatchMatmul for the inputs. void Init(bool transpose_a = false, bool transpose_b = false); /// \brief Set transpose_a. diff --git a/mindspore/core/ops/batch_norm.h b/mindspore/core/ops/batch_norm.h index 50dc18a9404..1a5a1e08aab 100644 --- a/mindspore/core/ops/batch_norm.h +++ b/mindspore/core/ops/batch_norm.h @@ -1,5 +1,5 @@ /** - * Copyright 2020 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -68,7 +68,6 @@ class MIND_API BatchNorm : public BaseOperator { abstract::AbstractBasePtr BatchNormInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive, const std::vector &input_args); using PrimBatchNormPtr = std::shared_ptr; - } // namespace ops } // namespace mindspore diff --git a/mindspore/core/ops/bias_add.h b/mindspore/core/ops/bias_add.h index d7481bf208e..2891c7e466a 100644 --- a/mindspore/core/ops/bias_add.h +++ b/mindspore/core/ops/bias_add.h @@ -1,5 +1,5 @@ /** - * Copyright 2020-2021 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,12 +27,13 @@ namespace mindspore { namespace ops { constexpr auto kNameBiasAdd = "BiasAdd"; + /// \brief Returns sum of input and bias tensor. Refer to Python API @ref mindspore.ops.BiasAdd for more details. class MIND_API BiasAdd : public BaseOperator { public: MIND_API_BASE_MEMBER(BiasAdd); /// \brief Constructor. - BiasAdd() : BaseOperator("BiasAdd") { InitIOName({"x", "b"}, {"output"}); } + BiasAdd() : BaseOperator(kNameBiasAdd) { InitIOName({"x", "b"}, {"output"}); } /// \brief Init. Refer to the parameters of Python API @ref mindspore.ops.BiasAdd for the inputs. void Init(const Format &format = NCHW); /// \brief Set format. diff --git a/mindspore/core/ops/broadcast_to.h b/mindspore/core/ops/broadcast_to.h index 0007fba8df6..fbc8a13146b 100644 --- a/mindspore/core/ops/broadcast_to.h +++ b/mindspore/core/ops/broadcast_to.h @@ -1,5 +1,5 @@ /** - * Copyright 2020 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,13 +25,15 @@ namespace mindspore { namespace ops { +constexpr auto kNameBroadcastTo = "BroadcastTo"; + /// \brief Broadcasts input tensor to a given shape. /// Refer to Python API @ref mindspore.ops.BroadcastTo for more details. class MIND_API BroadcastTo : public BaseOperator { public: MIND_API_BASE_MEMBER(BroadcastTo); /// \brief Constructor. - BroadcastTo() : BaseOperator("BroadcastTo") {} + BroadcastTo() : BaseOperator(kNameBroadcastTo) {} /// \brief Init. Refer to the parameters of Python API @ref mindspore.ops.BroadcastTo for the inputs. void Init(const std::vector &shape); /// \brief Set shape. diff --git a/mindspore/core/ops/celu.h b/mindspore/core/ops/celu.h index afb9934b92b..0ad25b08c42 100644 --- a/mindspore/core/ops/celu.h +++ b/mindspore/core/ops/celu.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,7 +29,7 @@ namespace ops { constexpr auto kNameCeLU = "CeLU"; /// \brief Computes CeLU (Continuously differentiable exponential linear units) of input tensors element-wise. /// Refer to Python API @ref mindspore.ops.CeLU for more details. -class CeLU : public BaseOperator { +class MIND_API CeLU : public BaseOperator { public: MIND_API_BASE_MEMBER(CeLU); /// \brief Constructor. diff --git a/mindspore/core/ops/complex.cc b/mindspore/core/ops/complex.cc index 7d7becc7d4f..2dace29f8f8 100644 --- a/mindspore/core/ops/complex.cc +++ b/mindspore/core/ops/complex.cc @@ -1,5 +1,5 @@ /** - * Copyright 2020-2021 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/mindspore/core/ops/complex.h b/mindspore/core/ops/complex.h index 454011938f8..216b0a6bd5d 100644 --- a/mindspore/core/ops/complex.h +++ b/mindspore/core/ops/complex.h @@ -1,5 +1,5 @@ /** - * Copyright 2020-2021 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,13 +24,15 @@ namespace mindspore { namespace ops { +constexpr auto kNameComplex = "Complex"; + /// \brief Returns a complex Tensor from the real and imaginary part. /// Refer to Python API @ref mindspore.ops.Complex for more details. class MIND_API Complex : public BaseOperator { public: MIND_API_BASE_MEMBER(Complex); /// \brief Constructor. - Complex() : BaseOperator("Square") { InitIOName({"s", "input_imag"}, {"output"}); } + Complex() : BaseOperator(kNameComplex) { InitIOName({"s", "input_imag"}, {"output"}); } /// \brief Init. Refer to the parameters of Python API @ref mindspore.ops.Complex for the inputs. void Init() {} }; diff --git a/mindspore/core/ops/conj.h b/mindspore/core/ops/conj.h index e6e24ad3f2b..7efe0c8f60b 100644 --- a/mindspore/core/ops/conj.h +++ b/mindspore/core/ops/conj.h @@ -1,5 +1,5 @@ /** - * Copyright 2020-2021 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,13 +24,15 @@ namespace mindspore { namespace ops { +constexpr auto kNameConj = "Conj"; + /// \brief Returns a Tensor that is the conjugate part of the input. /// Refer to Python API @ref mindspore.ops.Conj for more details. class MIND_API Conj : public BaseOperator { public: MIND_API_BASE_MEMBER(Conj); /// \brief Constructor. - Conj() : BaseOperator("Conj") { InitIOName({"input"}, {"output"}); } + Conj() : BaseOperator(kNameConj) { InitIOName({"input"}, {"output"}); } /// \brief Init. Refer to the parameters of Python API @ref mindspore.ops.Conj for the inputs. void Init() {} }; diff --git a/mindspore/core/ops/cos.h b/mindspore/core/ops/cos.h index 6a7bb33d08e..c807137b794 100644 --- a/mindspore/core/ops/cos.h +++ b/mindspore/core/ops/cos.h @@ -1,5 +1,5 @@ /** - * Copyright 2020-2021 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,12 +23,14 @@ namespace mindspore { namespace ops { +constexpr auto kNameCos = "Cos"; + /// \brief Computes cosine of input element-wise. Refer to Python API @ref mindspore.ops.Cos for more details. class MIND_API Cos : public BaseOperator { public: MIND_API_BASE_MEMBER(Cos); /// \brief Constructor. - Cos() : BaseOperator("Cos") {} + Cos() : BaseOperator(kNameCos) {} /// \brief Init. Refer to the parameters of Python API @ref mindspore.ops.Cos for the inputs. void Init(float alpha = 0.0); }; diff --git a/mindspore/core/ops/cosh.h b/mindspore/core/ops/cosh.h index 85cf0f830e0..e3a7ed1aaab 100644 --- a/mindspore/core/ops/cosh.h +++ b/mindspore/core/ops/cosh.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ namespace mindspore { namespace ops { constexpr auto kNameCosh = "Cosh"; -class Cosh : public BaseOperator { +class MIND_API Cosh : public BaseOperator { public: MIND_API_BASE_MEMBER(Cosh); Cosh() : BaseOperator(kNameCosh) { InitIOName({"x"}, {"output"}); } diff --git a/mindspore/core/ops/ctcloss.h b/mindspore/core/ops/ctcloss.h index 4f2003a4177..ee71848bcee 100644 --- a/mindspore/core/ops/ctcloss.h +++ b/mindspore/core/ops/ctcloss.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,13 +23,15 @@ namespace mindspore { namespace ops { +constexpr auto kNameCTCLoss = "CTCLoss"; + /// \brief Calculates the CTC (Connectionist Temporal Classification) loss and the gradient. /// Refer to Python API @ref mindspore.ops.CTCLoss for more details. class MIND_API CTCLoss : public BaseOperator { public: MIND_API_BASE_MEMBER(CTCLoss); /// \brief Constructor. - CTCLoss() : BaseOperator("CTCLoss") {} + CTCLoss() : BaseOperator(kNameCTCLoss) {} /// \brief Init. Refer to the parameters of Python API @ref mindspore.ops.CTCLoss for the inputs. void Init() const {} }; diff --git a/mindspore/core/ops/cummin.h b/mindspore/core/ops/cummin.h index 2cfd00684fb..ede0a0390c3 100644 --- a/mindspore/core/ops/cummin.h +++ b/mindspore/core/ops/cummin.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,7 @@ namespace mindspore { namespace ops { constexpr auto kNameCummin = "Cummin"; -class Cummin : public BaseOperator { +class MIND_API Cummin : public BaseOperator { public: MIND_API_BASE_MEMBER(Cummin); Cummin() : BaseOperator(kNameCummin) { InitIOName({"x"}, {"y"}); } diff --git a/mindspore/core/ops/custom.h b/mindspore/core/ops/custom.h index af3bd41f566..224b3a45f8d 100644 --- a/mindspore/core/ops/custom.h +++ b/mindspore/core/ops/custom.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -60,7 +60,6 @@ class MIND_API Custom : public BaseOperator { /// \return a map which contains all attributes of the custom op. std::map> get_attr() const; }; - } // namespace ops } // namespace mindspore diff --git a/mindspore/core/ops/diag.h b/mindspore/core/ops/diag.h index 21276ef9b80..9994c47c467 100644 --- a/mindspore/core/ops/diag.h +++ b/mindspore/core/ops/diag.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,13 +23,15 @@ namespace mindspore { namespace ops { +constexpr auto kNameDiag = "Diag"; + /// \brief Constructs a diagonal tensor with a given diagonal values. /// Refer to Python API @ref mindspore.ops.Diag for more details. class MIND_API Diag : public BaseOperator { public: MIND_API_BASE_MEMBER(Diag); /// \brief Constructor. - Diag() : BaseOperator("Diag") { InitIOName({"input_x"}, {"output"}); } + Diag() : BaseOperator(kNameDiag) { InitIOName({"input_x"}, {"output"}); } }; abstract::AbstractBasePtr DiagInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive, const std::vector &input_args); diff --git a/mindspore/core/ops/diag_part.h b/mindspore/core/ops/diag_part.h index aa1e9a41e37..572c028963f 100644 --- a/mindspore/core/ops/diag_part.h +++ b/mindspore/core/ops/diag_part.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,13 +23,15 @@ namespace mindspore { namespace ops { +constexpr auto kNameDiagPart = "DiagPart"; + /// \brief Extracts the diagonal part from given tensor. /// Refer to Python API @ref mindspore.ops.DiagPart for more details. class MIND_API DiagPart : public BaseOperator { public: MIND_API_BASE_MEMBER(DiagPart); /// \brief Constructor. - DiagPart() : BaseOperator("DiagPart") { InitIOName({"input_x"}, {"output"}); } + DiagPart() : BaseOperator(kNameDiagPart) { InitIOName({"input_x"}, {"output"}); } }; abstract::AbstractBasePtr DiagPartInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive, const std::vector &input_args); diff --git a/mindspore/core/ops/div_no_nan.h b/mindspore/core/ops/div_no_nan.h index 046ccb2bff2..1f399d38e72 100644 --- a/mindspore/core/ops/div_no_nan.h +++ b/mindspore/core/ops/div_no_nan.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ namespace mindspore { namespace ops { constexpr auto kNameDivNoNan = "DivNoNan"; -class DivNoNan : public BaseOperator { +class MIND_API DivNoNan : public BaseOperator { public: MIND_API_BASE_MEMBER(DivNoNan); DivNoNan() : BaseOperator(kNameDivNoNan) { InitIOName({"x1", "x2"}, {"y"}); } diff --git a/mindspore/core/ops/dropout_do_mask.h b/mindspore/core/ops/dropout_do_mask.h index ea812ec7a13..165c2cbcf4d 100644 --- a/mindspore/core/ops/dropout_do_mask.h +++ b/mindspore/core/ops/dropout_do_mask.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,13 +24,15 @@ namespace mindspore { namespace ops { +constexpr auto kNameDropoutDoMask = "DropoutDoMask"; + /// \brief Applies dropout mask on the input tensor. /// Refer to Python API @ref mindspore.ops.DropoutDoMask for more details. class MIND_API DropoutDoMask : public BaseOperator { public: MIND_API_BASE_MEMBER(DropoutDoMask); /// \brief Constructor. - DropoutDoMask() : BaseOperator("DropoutDoMask") {} + DropoutDoMask() : BaseOperator(kNameDropoutDoMask) {} /// \brief Init. Refer to the parameters of Python API @ref mindspore.ops.DropoutDoMask for the inputs. void Init() const {} }; diff --git a/mindspore/core/ops/dropout_gen_mask.h b/mindspore/core/ops/dropout_gen_mask.h index 4eeabe8fa0c..30105162876 100644 --- a/mindspore/core/ops/dropout_gen_mask.h +++ b/mindspore/core/ops/dropout_gen_mask.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,13 +24,15 @@ namespace mindspore { namespace ops { +constexpr auto kNameDropoutGenMask = "DropoutGenMask"; + /// \brief Generates the mask value for the input shape. /// Refer to Python API @ref mindspore.ops.DropoutGenMask for more details. class MIND_API DropoutGenMask : public BaseOperator { public: MIND_API_BASE_MEMBER(DropoutGenMask); /// \brief Constructor. - DropoutGenMask() : BaseOperator("DropoutGenMask") {} + DropoutGenMask() : BaseOperator(kNameDropoutGenMask) {} /// \brief Init. Refer to the parameters of Python API @ref mindspore.ops.DropoutGenMask for the inputs. void Init() const {} }; diff --git a/mindspore/core/ops/dtype.h b/mindspore/core/ops/dtype.h index 50e73b17843..9f6d8de4bdc 100644 --- a/mindspore/core/ops/dtype.h +++ b/mindspore/core/ops/dtype.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,13 +25,15 @@ namespace mindspore { namespace ops { +constexpr auto kNameDType = "DType"; + /// \brief Returns the data type of the input tensor as mindspore.dtype. /// Refer to Python API @ref mindspore.ops.DType for more details. class MIND_API DType : public BaseOperator { public: MIND_API_BASE_MEMBER(DType); /// \brief Constructor. - DType() : BaseOperator("DType") { InitIOName({"x"}, {"output"}); } + DType() : BaseOperator(kNameDType) { InitIOName({"x"}, {"output"}); } /// \brief Init. Refer to the parameters of Python API @ref mindspore.ops.DType for the inputs. void Init() const {} }; diff --git a/mindspore/core/ops/dynamic_broadcast_to.h b/mindspore/core/ops/dynamic_broadcast_to.h index 42462f4e0a0..d23381dbb91 100644 --- a/mindspore/core/ops/dynamic_broadcast_to.h +++ b/mindspore/core/ops/dynamic_broadcast_to.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,10 +25,12 @@ namespace mindspore { namespace ops { -class DynamicBroadcastTo : public BaseOperator { +constexpr auto kNameDynamicBroadcastTo = "DynamicBroadcastTo"; + +class MIND_API DynamicBroadcastTo : public BaseOperator { public: MIND_API_BASE_MEMBER(DynamicBroadcastTo); - DynamicBroadcastTo() : BaseOperator("DynamicBroadcastTo") { InitIOName({"x", "shape"}, {"y"}); } + DynamicBroadcastTo() : BaseOperator(kNameDynamicBroadcastTo) { InitIOName({"x", "shape"}, {"y"}); } void Init() {} }; diff --git a/mindspore/core/ops/dynamic_resize_nearest_neighbor.h b/mindspore/core/ops/dynamic_resize_nearest_neighbor.h index 932c7ceb117..acf0572874b 100644 --- a/mindspore/core/ops/dynamic_resize_nearest_neighbor.h +++ b/mindspore/core/ops/dynamic_resize_nearest_neighbor.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ namespace mindspore { namespace ops { constexpr auto kNameDynamicResizeNearestNeighbor = "DynamicResizeNearestNeighbor"; -class DynamicResizeNearestNeighbor : public BaseOperator { +class MIND_API DynamicResizeNearestNeighbor : public BaseOperator { public: MIND_API_BASE_MEMBER(DynamicResizeNearestNeighbor); DynamicResizeNearestNeighbor() : BaseOperator(kNameDynamicResizeNearestNeighbor) {} diff --git a/mindspore/core/ops/equal.h b/mindspore/core/ops/equal.h index 02222b7cc80..1690a450fc8 100644 --- a/mindspore/core/ops/equal.h +++ b/mindspore/core/ops/equal.h @@ -1,5 +1,5 @@ /** - * Copyright 2020-2021 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,7 +31,7 @@ class MIND_API Equal : public BaseOperator { public: MIND_API_BASE_MEMBER(Equal); /// \brief Constructor. - Equal() : BaseOperator("Equal") { InitIOName({"x", "y"}, {"output"}); } + Equal() : BaseOperator(kNameEqual) { InitIOName({"x", "y"}, {"output"}); } /// \brief Init. Refer to the parameters of Python API @ref mindspore.ops.Equal for the inputs. void Init() const {} }; diff --git a/mindspore/core/ops/erfc.cc b/mindspore/core/ops/erfc.cc index 5faa5114ce5..3ed8543f59a 100644 --- a/mindspore/core/ops/erfc.cc +++ b/mindspore/core/ops/erfc.cc @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/mindspore/core/ops/erfc.h b/mindspore/core/ops/erfc.h index 781146ca229..bb611581ba6 100644 --- a/mindspore/core/ops/erfc.h +++ b/mindspore/core/ops/erfc.h @@ -24,7 +24,7 @@ namespace mindspore { namespace ops { constexpr auto kNameErfc = "Erfc"; -class Erfc : public BaseOperator { +class MIND_API Erfc : public BaseOperator { public: MIND_API_BASE_MEMBER(Erfc); Erfc() : BaseOperator(kNameErfc) { InitIOName({"x"}, {"y"}); } diff --git a/mindspore/core/ops/exp.h b/mindspore/core/ops/exp.h index 80f46415e26..22920eea814 100644 --- a/mindspore/core/ops/exp.h +++ b/mindspore/core/ops/exp.h @@ -1,5 +1,5 @@ /** - * Copyright 2020-2021 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,7 +31,7 @@ class MIND_API Exp : public BaseOperator { public: MIND_API_BASE_MEMBER(Exp); /// \brief Constructor. - Exp() : BaseOperator("Exp") { InitIOName({"x"}, {"y"}); } + Exp() : BaseOperator(kNameExp) { InitIOName({"x"}, {"y"}); } explicit Exp(const std::string k_name) : BaseOperator(k_name) { InitIOName({"x"}, {"y"}); } /// \brief Init. Refer to the parameters of Python API @ref mindspore.ops.Exp for the inputs. void Init() const {} diff --git a/mindspore/core/ops/fast_gelu.h b/mindspore/core/ops/fast_gelu.h index 3719e783f26..ceb387b5039 100644 --- a/mindspore/core/ops/fast_gelu.h +++ b/mindspore/core/ops/fast_gelu.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ namespace mindspore { namespace ops { constexpr auto kNameFastGeLU = "FastGeLU"; -class FastGeLU : public BaseOperator { +class MIND_API FastGeLU : public BaseOperator { public: MIND_API_BASE_MEMBER(FastGeLU); FastGeLU() : BaseOperator(kNameFastGeLU) { InitIOName({"x"}, {"y"}); } diff --git a/mindspore/core/ops/floor.h b/mindspore/core/ops/floor.h index 52e4ef59da9..c174c747615 100644 --- a/mindspore/core/ops/floor.h +++ b/mindspore/core/ops/floor.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,7 +41,6 @@ abstract::AbstractBasePtr FloorInfer(const abstract::AnalysisEnginePtr &, const const std::vector &input_args); using PrimFloorPtr = std::shared_ptr; - } // namespace ops } // namespace mindspore diff --git a/mindspore/core/ops/gather_d.h b/mindspore/core/ops/gather_d.h index 62a8cd7c7e0..4e74be3f66c 100644 --- a/mindspore/core/ops/gather_d.h +++ b/mindspore/core/ops/gather_d.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,13 +25,15 @@ namespace mindspore { namespace ops { +constexpr auto kNameGatherD = "GatherD"; + /// \brief Gathers values along an axis specified by dimension. /// Refer to Python API @ref mindspore.ops.GatherD for more details. class MIND_API GatherD : public BaseOperator { public: MIND_API_BASE_MEMBER(GatherD); /// \brief Constructor. - GatherD() : BaseOperator("GatherD") { InitIOName({"x", "dim", "index"}, {"output"}); } + GatherD() : BaseOperator(kNameGatherD) { InitIOName({"x", "dim", "index"}, {"output"}); } /// \brief Init. Refer to the parameters of Python API @ref mindspore.ops.GatherD for the inputs. void Init() const {} }; diff --git a/mindspore/core/ops/gelu.h b/mindspore/core/ops/gelu.h index edff2eb23ce..801d537febe 100644 --- a/mindspore/core/ops/gelu.h +++ b/mindspore/core/ops/gelu.h @@ -1,5 +1,5 @@ /** - * Copyright 2020-2021 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,7 +33,6 @@ class MIND_API GeLU : public BaseOperator { /// \brief Init. Refer to the parameters of Python API @ref mindspore.ops.GeLU for the inputs. void Init() const {} }; - } // namespace ops } // namespace mindspore #endif // MINDSPORE_CORE_OPS_GELU_H_ diff --git a/mindspore/core/ops/getnext.h b/mindspore/core/ops/getnext.h index 71a5371abdb..e81344843dd 100644 --- a/mindspore/core/ops/getnext.h +++ b/mindspore/core/ops/getnext.h @@ -1,6 +1,6 @@ /** - * Copyright 2020-2021 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,7 +33,7 @@ class MIND_API GetNext : public BaseOperator { public: MIND_API_BASE_MEMBER(GetNext); /// \brief Constructor. - GetNext() : BaseOperator("GetNext") {} + GetNext() : BaseOperator(kNameGetNext) {} /// \brief Init. Refer to the parameters of Python API @ref mindspore.ops.GetNext for the inputs. void Init() const {} }; diff --git a/mindspore/core/ops/glu.h b/mindspore/core/ops/glu.h index ef780c7ccac..308cc72fe6b 100644 --- a/mindspore/core/ops/glu.h +++ b/mindspore/core/ops/glu.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,7 +32,6 @@ class MIND_API GLU : public BaseOperator { void set_axis(int64_t axis); int64_t get_axis() const; }; - } // namespace ops } // namespace mindspore #endif // MINDSPORE_CORE_OPS_GLU_H_ diff --git a/mindspore/core/ops/grad/avg_pool_3d_grad.h b/mindspore/core/ops/grad/avg_pool_3d_grad.h index 00f3b3967f8..ea58adfc241 100644 --- a/mindspore/core/ops/grad/avg_pool_3d_grad.h +++ b/mindspore/core/ops/grad/avg_pool_3d_grad.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,10 +26,12 @@ namespace mindspore { namespace ops { +constexpr auto kNameAvgPool3DGrad = "AvgPool3DGrad"; + class MIND_API AvgPool3DGrad : public BaseOperator { public: MIND_API_BASE_MEMBER(AvgPool3DGrad); - AvgPool3DGrad() : BaseOperator("AvgPool3DGrad") { InitIOName({"origin_input_size", "grad"}, {"output"}); } + AvgPool3DGrad() : BaseOperator(kNameAvgPool3DGrad) { InitIOName({"origin_input_size", "grad"}, {"output"}); } }; abstract::AbstractBasePtr AvgPool3DGradInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive, diff --git a/mindspore/core/ops/grad/dropout_grad.h b/mindspore/core/ops/grad/dropout_grad.h index 87395415ef8..b413f90123c 100644 --- a/mindspore/core/ops/grad/dropout_grad.h +++ b/mindspore/core/ops/grad/dropout_grad.h @@ -1,5 +1,5 @@ /** - * Copyright 2020-2021 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,10 +24,12 @@ namespace mindspore { namespace ops { +constexpr auto kNameDropoutGrad = "DropoutGrad"; + class MIND_API DropoutGrad : public BaseOperator { public: MIND_API_BASE_MEMBER(DropoutGrad); - DropoutGrad() : BaseOperator("DropoutGrad") {} + DropoutGrad() : BaseOperator(kNameDropoutGrad) {} void Init(const float keep_prob = 0.5); void set_keep_prob(const float keep_prob); float get_keep_prob() const; diff --git a/mindspore/core/ops/grad/fast_gelu_grad.h b/mindspore/core/ops/grad/fast_gelu_grad.h index 75590f5484b..3c35de9c012 100644 --- a/mindspore/core/ops/grad/fast_gelu_grad.h +++ b/mindspore/core/ops/grad/fast_gelu_grad.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,10 +26,11 @@ namespace mindspore { namespace ops { constexpr auto kNameFastGeLUGrad = "FastGeLUGrad"; -class FastGeLUGrad : public BaseOperator { + +class MIND_API FastGeLUGrad : public BaseOperator { public: MIND_API_BASE_MEMBER(FastGeLUGrad); - FastGeLUGrad() : BaseOperator("FastGeLUGrad") { InitIOName({"x"}, {"output"}); } + FastGeLUGrad() : BaseOperator(kNameFastGeLUGrad) { InitIOName({"x"}, {"output"}); } }; } // namespace ops } // namespace mindspore diff --git a/mindspore/core/ops/grad/gelu_grad.h b/mindspore/core/ops/grad/gelu_grad.h index c01f9a4d45b..e1ca772d378 100644 --- a/mindspore/core/ops/grad/gelu_grad.h +++ b/mindspore/core/ops/grad/gelu_grad.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ namespace mindspore { namespace ops { constexpr auto kNameGeLUGrad = "GeLUGrad"; -class GeLUGrad : public BaseOperator { +class MIND_API GeLUGrad : public BaseOperator { public: MIND_API_BASE_MEMBER(GeLUGrad); GeLUGrad() : BaseOperator(kNameGeLUGrad) { InitIOName({"dy", "x", "y"}, {"z"}); } diff --git a/mindspore/core/ops/grad/inv_grad.h b/mindspore/core/ops/grad/inv_grad.h index a9842aa986b..d1ced70b50c 100644 --- a/mindspore/core/ops/grad/inv_grad.h +++ b/mindspore/core/ops/grad/inv_grad.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ namespace mindspore { namespace ops { constexpr auto kNameInvGrad = "InvGrad"; -class InvGrad : public BaseOperator { +class MIND_API InvGrad : public BaseOperator { public: MIND_API_BASE_MEMBER(InvGrad); InvGrad() : BaseOperator(kNameInvGrad) { InitIOName({"x", "grad"}, {"y"}); } diff --git a/mindspore/core/ops/grad/mul_grad.h b/mindspore/core/ops/grad/mul_grad.h index 8b2571738c5..77c13969eb9 100644 --- a/mindspore/core/ops/grad/mul_grad.h +++ b/mindspore/core/ops/grad/mul_grad.h @@ -1,5 +1,5 @@ /** - * Copyright 2020-2021 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,7 +29,6 @@ class MIND_API MulGrad : public BaseOperator { MulGrad() : BaseOperator(kNameMulGrad) {} void Init() const {} }; - } // namespace ops } // namespace mindspore diff --git a/mindspore/core/ops/grad/resize_nearest_neighbor_grad.h b/mindspore/core/ops/grad/resize_nearest_neighbor_grad.h index 4eca0404543..0c7b8484eee 100644 --- a/mindspore/core/ops/grad/resize_nearest_neighbor_grad.h +++ b/mindspore/core/ops/grad/resize_nearest_neighbor_grad.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ namespace mindspore { namespace ops { constexpr auto kNameResizeNearestNeighborGrad = "ResizeNearestNeighborGrad"; -class ResizeNearestNeighborGrad : public BaseOperator { +class MIND_API ResizeNearestNeighborGrad : public BaseOperator { public: MIND_API_BASE_MEMBER(ResizeNearestNeighborGrad); ResizeNearestNeighborGrad() : BaseOperator(kNameResizeNearestNeighborGrad) {} diff --git a/mindspore/core/ops/grad/strided_slice_grad.h b/mindspore/core/ops/grad/strided_slice_grad.h index c65cd10d406..377b488c761 100644 --- a/mindspore/core/ops/grad/strided_slice_grad.h +++ b/mindspore/core/ops/grad/strided_slice_grad.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,10 +25,12 @@ namespace mindspore { namespace ops { +constexpr auto kNameStridedSliceGrad = "StridedSliceGrad"; + class MIND_API StridedSliceGrad : public BaseOperator { public: MIND_API_BASE_MEMBER(StridedSliceGrad); - StridedSliceGrad() : BaseOperator("StridedSliceGrad") { + StridedSliceGrad() : BaseOperator(kNameStridedSliceGrad) { InitIOName({"dy", "shapex", "begin", "end", "strides"}, {"output"}); } diff --git a/mindspore/core/ops/grad/sub_grad.h b/mindspore/core/ops/grad/sub_grad.h index bbd34067bba..ef540320cb3 100644 --- a/mindspore/core/ops/grad/sub_grad.h +++ b/mindspore/core/ops/grad/sub_grad.h @@ -1,5 +1,5 @@ /** - * Copyright 2020-2021 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,7 +29,6 @@ class MIND_API SubGrad : public BaseOperator { SubGrad() : BaseOperator(kNameSubGrad) {} void Init() const {} }; - } // namespace ops } // namespace mindspore diff --git a/mindspore/core/ops/grad/tanh_grad.h b/mindspore/core/ops/grad/tanh_grad.h index b5b889d2f22..ce7fdecc153 100644 --- a/mindspore/core/ops/grad/tanh_grad.h +++ b/mindspore/core/ops/grad/tanh_grad.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,7 @@ namespace mindspore { namespace ops { constexpr auto kNameTanhGrad = "TanhGrad"; -class TanhGrad : public BaseOperator { +class MIND_API TanhGrad : public BaseOperator { public: MIND_API_BASE_MEMBER(TanhGrad); /// \brief Constructor. diff --git a/mindspore/core/ops/gru.h b/mindspore/core/ops/gru.h index 3e106aa3e37..aa7ce21ffb6 100644 --- a/mindspore/core/ops/gru.h +++ b/mindspore/core/ops/gru.h @@ -1,5 +1,5 @@ /** - * Copyright 2020 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -52,7 +52,6 @@ class MIND_API GRU : public BaseOperator { /// \return a boolean value. bool get_bidirectional() const; }; - } // namespace ops } // namespace mindspore diff --git a/mindspore/core/ops/hsigmoid.h b/mindspore/core/ops/hsigmoid.h index 2aca3f0ce17..dedebf6157c 100644 --- a/mindspore/core/ops/hsigmoid.h +++ b/mindspore/core/ops/hsigmoid.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,7 +35,6 @@ class MIND_API HSigmoid : public BaseOperator { abstract::AbstractBasePtr HSigmoidInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive, const std::vector &input_args); - } // namespace ops } // namespace mindspore diff --git a/mindspore/core/ops/imag.h b/mindspore/core/ops/imag.h index 732d3d88511..0caac9943cc 100644 --- a/mindspore/core/ops/imag.h +++ b/mindspore/core/ops/imag.h @@ -1,5 +1,5 @@ /** - * Copyright 2020-2021 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,13 +24,15 @@ namespace mindspore { namespace ops { +constexpr auto kNameImag = "Imag"; + /// \brief Returns a Tensor that is the imag part of the input. /// Refer to Python API @ref mindspore.ops.Imag for more details. class MIND_API Imag : public BaseOperator { public: MIND_API_BASE_MEMBER(Imag); /// \brief Constructor. - Imag() : BaseOperator("Imag") { InitIOName({"input"}, {"output"}); } + Imag() : BaseOperator(kNameImag) { InitIOName({"input"}, {"output"}); } /// \brief Init. Refer to the parameters of Python API @ref mindspore.ops.Imag for the inputs. void Init() {} }; diff --git a/mindspore/core/ops/index_add.cc b/mindspore/core/ops/index_add.cc index 1a7d401f563..23f884b4aae 100644 --- a/mindspore/core/ops/index_add.cc +++ b/mindspore/core/ops/index_add.cc @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/mindspore/core/ops/index_add.h b/mindspore/core/ops/index_add.h index f9914de983b..a88ffbfb78b 100644 --- a/mindspore/core/ops/index_add.h +++ b/mindspore/core/ops/index_add.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,7 +29,7 @@ namespace ops { constexpr auto kNameIndexAdd = "IndexAdd"; /// \brief Adds tensor y to specified axis and indices of tensor x. /// Refer to Python API @ref mindspore.ops.IndexAdd for more details. -class IndexAdd : public BaseOperator { +class MIND_API IndexAdd : public BaseOperator { public: MIND_API_BASE_MEMBER(IndexAdd); /// \brief Constructor. @@ -38,7 +38,6 @@ class IndexAdd : public BaseOperator { abstract::AbstractBasePtr IndexAddInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive, const std::vector &input_args); - } // namespace ops } // namespace mindspore diff --git a/mindspore/core/ops/inv.h b/mindspore/core/ops/inv.h index a58ac2a3489..9ecf37ff6fb 100644 --- a/mindspore/core/ops/inv.h +++ b/mindspore/core/ops/inv.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ namespace mindspore { namespace ops { constexpr auto kNameInv = "Inv"; -class Inv : public BaseOperator { +class MIND_API Inv : public BaseOperator { public: MIND_API_BASE_MEMBER(Inv); Inv() : BaseOperator(kNameInv) { InitIOName({"x"}, {"y"}); } diff --git a/mindspore/core/ops/invert_permutation.h b/mindspore/core/ops/invert_permutation.h index 5908374ada7..a81ed243fce 100644 --- a/mindspore/core/ops/invert_permutation.h +++ b/mindspore/core/ops/invert_permutation.h @@ -1,5 +1,5 @@ /** - * Copyright 2020 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,7 +32,6 @@ class MIND_API InvertPermutation : public BaseOperator { /// \brief Constructor. InvertPermutation() : BaseOperator(kNameInvertPermutation) {} }; - } // namespace ops } // namespace mindspore diff --git a/mindspore/core/ops/iou.h b/mindspore/core/ops/iou.h index 431c0f6a5ce..04edcace004 100644 --- a/mindspore/core/ops/iou.h +++ b/mindspore/core/ops/iou.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,10 +24,12 @@ namespace mindspore { namespace ops { +constexpr auto kNameIOU = "IOU"; + class MIND_API IOU : public BaseOperator { public: MIND_API_BASE_MEMBER(IOU); - IOU() : BaseOperator("IOU") { InitIOName({"x,y"}, {"output"}); } + IOU() : BaseOperator(kNameIOU) { InitIOName({"x,y"}, {"output"}); } void Init() {} }; } // namespace ops diff --git a/mindspore/core/ops/is_close.h b/mindspore/core/ops/is_close.h index 2965bee200b..5c8fbb46baf 100644 --- a/mindspore/core/ops/is_close.h +++ b/mindspore/core/ops/is_close.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,7 @@ namespace mindspore { namespace ops { constexpr auto kNameIsClose = "IsClose"; -class IsClose : public BaseOperator { +class MIND_API IsClose : public BaseOperator { public: MIND_API_BASE_MEMBER(IsClose); IsClose() : BaseOperator(kNameIsClose) { InitIOName({"x1", "x2"}, {"y"}); } diff --git a/mindspore/core/ops/is_nan.h b/mindspore/core/ops/is_nan.h index 693c2d970f5..1649a0024c9 100644 --- a/mindspore/core/ops/is_nan.h +++ b/mindspore/core/ops/is_nan.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ namespace mindspore { namespace ops { constexpr auto kNameIsNan = "IsNan"; -class IsNan : public BaseOperator { +class MIND_API IsNan : public BaseOperator { public: MIND_API_BASE_MEMBER(IsNan); IsNan() : BaseOperator(kNameIsNan) { InitIOName({"x"}, {"y"}); } diff --git a/mindspore/core/ops/layer_norm.h b/mindspore/core/ops/layer_norm.h index 9356e1611fa..392669ac8ba 100644 --- a/mindspore/core/ops/layer_norm.h +++ b/mindspore/core/ops/layer_norm.h @@ -1,5 +1,5 @@ /** - * Copyright 2020 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -59,7 +59,6 @@ class MIND_API LayerNorm : public BaseOperator { abstract::AbstractBasePtr LayerNormInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive, const std::vector &input_args); using PrimLayerNormPtr = std::shared_ptr; - } // namespace ops } // namespace mindspore diff --git a/mindspore/core/ops/layer_norm_beta_gamma_backprop_v2.h b/mindspore/core/ops/layer_norm_beta_gamma_backprop_v2.h index 7a5737b21ce..c27b6ac018e 100644 --- a/mindspore/core/ops/layer_norm_beta_gamma_backprop_v2.h +++ b/mindspore/core/ops/layer_norm_beta_gamma_backprop_v2.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,10 +25,12 @@ namespace mindspore { namespace ops { -class LayerNormBetaGammaBackpropV2 : public BaseOperator { +constexpr auto kNameLayerNormBetaGammaBackpropV2 = "LayerNormBetaGammaBackpropV2"; + +class MIND_API LayerNormBetaGammaBackpropV2 : public BaseOperator { public: MIND_API_BASE_MEMBER(LayerNormBetaGammaBackpropV2); - LayerNormBetaGammaBackpropV2() : BaseOperator("LayerNormBetaGammaBackpropV2") {} + LayerNormBetaGammaBackpropV2() : BaseOperator(kNameLayerNormBetaGammaBackpropV2) {} void Init(const std::vector &shape_gamma); void set_shape_gamma(const std::vector &shape_gamma); std::vector get_shape_gamma() const; diff --git a/mindspore/core/ops/log.h b/mindspore/core/ops/log.h index b59159ebbb0..03c976be7b7 100644 --- a/mindspore/core/ops/log.h +++ b/mindspore/core/ops/log.h @@ -1,5 +1,5 @@ /** - * Copyright 2020-2021 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,7 +30,7 @@ class MIND_API Log : public BaseOperator { public: MIND_API_BASE_MEMBER(Log); /// \brief Constructor. - Log() : BaseOperator("Log") { InitIOName({"x"}, {"y"}); } + Log() : BaseOperator(kNameLog) { InitIOName({"x"}, {"y"}); } }; abstract::AbstractBasePtr LogInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive, const std::vector &input_args); diff --git a/mindspore/core/ops/log1p.h b/mindspore/core/ops/log1p.h index bf5756ee0b6..5e1f182416b 100644 --- a/mindspore/core/ops/log1p.h +++ b/mindspore/core/ops/log1p.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,13 +25,15 @@ namespace mindspore { namespace ops { +constexpr auto kNameLog1p = "Log1p"; + /// \brief Returns the natural logarithm of one plus the input tensor element-wise. /// Refer to Python API @ref mindspore.ops.Log1p for more details. class MIND_API Log1p : public BaseOperator { public: MIND_API_BASE_MEMBER(Log1p); /// \brief Constructor. - Log1p() : BaseOperator("Log1p") { InitIOName({"x"}, {"y"}); } + Log1p() : BaseOperator(kNameLog1p) { InitIOName({"x"}, {"y"}); } /// \brief Init. Refer to the parameters of Python API @ref mindspore.ops.Log1p for the inputs. void Init() const {} }; diff --git a/mindspore/core/ops/lp_norm.h b/mindspore/core/ops/lp_norm.h index 5f246ba8c83..921891b676c 100644 --- a/mindspore/core/ops/lp_norm.h +++ b/mindspore/core/ops/lp_norm.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ namespace mindspore { namespace ops { constexpr auto kNameLpNorm = "LpNorm"; -class LpNorm : public BaseOperator { +class MIND_API LpNorm : public BaseOperator { public: MIND_API_BASE_MEMBER(LpNorm); LpNorm() : BaseOperator(kNameLpNorm) { InitIOName({"input"}, {"output"}); } diff --git a/mindspore/core/ops/lp_normalization.h b/mindspore/core/ops/lp_normalization.h index ed329e1b5ac..e8abd3c8fb0 100644 --- a/mindspore/core/ops/lp_normalization.h +++ b/mindspore/core/ops/lp_normalization.h @@ -1,5 +1,5 @@ /** - * Copyright 2020 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -57,7 +57,6 @@ class MIND_API LpNormalization : public BaseOperator { /// \return the norm series. int64_t get_p() const; }; - } // namespace ops } // namespace mindspore diff --git a/mindspore/core/ops/masked_fill.h b/mindspore/core/ops/masked_fill.h index 08d56f02a21..c66de4e0e7c 100644 --- a/mindspore/core/ops/masked_fill.h +++ b/mindspore/core/ops/masked_fill.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,7 @@ namespace ops { constexpr auto kNameMaskedFill = "MaskedFill"; /// \brief Fills elements of self tensor with value where mask is True. /// Refer to Python API @ref mindspore.ops.MaskedFill for more details. -class MaskedFill : public BaseOperator { +class MIND_API MaskedFill : public BaseOperator { public: MIND_API_BASE_MEMBER(MaskedFill); /// \brief Constructor. diff --git a/mindspore/core/ops/matrix_diag_part.h b/mindspore/core/ops/matrix_diag_part.h index 4ba8f709125..33f09eb3879 100644 --- a/mindspore/core/ops/matrix_diag_part.h +++ b/mindspore/core/ops/matrix_diag_part.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,14 +24,14 @@ namespace mindspore { namespace ops { -constexpr auto kNameMatrixDiagPart = "MatrixDiagPartV3"; +constexpr auto kNameMatrixDiagPartV3 = "MatrixDiagPartV3"; /// \brief get the specified part of the inner most diag matrix of a matrix, fill with padding value . /// Refer to Python API @ref mindspore.ops.MatrixDiagPart for more details. -class MatrixDiagPartV3 : public BaseOperator { +class MIND_API MatrixDiagPartV3 : public BaseOperator { public: MIND_API_BASE_MEMBER(MatrixDiagPartV3); /// \brief Constructor. - MatrixDiagPartV3() : BaseOperator(kNameMatrixDiagPart) { InitIOName({"input", "k", "padding_value"}, {"output"}); } + MatrixDiagPartV3() : BaseOperator(kNameMatrixDiagPartV3) { InitIOName({"input", "k", "padding_value"}, {"output"}); } }; abstract::AbstractBasePtr MatrixDiagPartInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive, diff --git a/mindspore/core/ops/mulnonan.h b/mindspore/core/ops/mulnonan.h index 8b21622c772..cc89d6bc5bc 100644 --- a/mindspore/core/ops/mulnonan.h +++ b/mindspore/core/ops/mulnonan.h @@ -26,7 +26,7 @@ namespace mindspore { namespace ops { constexpr auto kNameMulNoNan = "MulNoNan"; -class MulNoNan : public BaseOperator { +class MIND_API MulNoNan : public BaseOperator { public: MIND_API_BASE_MEMBER(MulNoNan); MulNoNan() : BaseOperator(kNameMulNoNan) { InitIOName({"x", "y"}, {"output"}); } diff --git a/mindspore/core/ops/neg.h b/mindspore/core/ops/neg.h index c5fd5e14fc5..cf3a386bd45 100644 --- a/mindspore/core/ops/neg.h +++ b/mindspore/core/ops/neg.h @@ -1,5 +1,5 @@ /** - * Copyright 2020-2021 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,7 +30,7 @@ class MIND_API Neg : public BaseOperator { public: MIND_API_BASE_MEMBER(Neg); /// \brief Constructor. - Neg() : BaseOperator("Neg") { InitIOName({"x"}, {"y"}); } + Neg() : BaseOperator(kNameNeg) { InitIOName({"x"}, {"y"}); } /// \brief Init. Refer to the parameters of Python API @ref mindspore.ops.Neg for the inputs. void Init() const {} }; diff --git a/mindspore/core/ops/non_max_suppression_v3.h b/mindspore/core/ops/non_max_suppression_v3.h index 325136974c1..40639948f3c 100644 --- a/mindspore/core/ops/non_max_suppression_v3.h +++ b/mindspore/core/ops/non_max_suppression_v3.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,7 +29,7 @@ namespace mindspore { namespace ops { constexpr auto kNameNonMaxSuppressionV3 = "NonMaxSuppressionV3"; -class NonMaxSuppressionV3 : public BaseOperator { +class MIND_API NonMaxSuppressionV3 : public BaseOperator { public: MIND_API_BASE_MEMBER(NonMaxSuppressionV3); NonMaxSuppressionV3() : BaseOperator(kNameNonMaxSuppressionV3) { diff --git a/mindspore/core/ops/not_equal.h b/mindspore/core/ops/not_equal.h index 68f59cd274c..772104aae95 100644 --- a/mindspore/core/ops/not_equal.h +++ b/mindspore/core/ops/not_equal.h @@ -1,5 +1,5 @@ /** - * Copyright 2020-2021 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,7 +31,7 @@ class MIND_API NotEqual : public BaseOperator { public: MIND_API_BASE_MEMBER(NotEqual); /// \brief Constructor. - NotEqual() : BaseOperator("NotEqual") { InitIOName({"x", "y"}, {"output"}); } + NotEqual() : BaseOperator(kNameNotEqual) { InitIOName({"x", "y"}, {"output"}); } /// \brief Init. Refer to the parameters of Python API @ref mindspore.ops.NotEqual for the inputs. void Init() const {} }; diff --git a/mindspore/core/ops/one_hot.h b/mindspore/core/ops/one_hot.h index ef1df4a7ade..bd7e02e013e 100644 --- a/mindspore/core/ops/one_hot.h +++ b/mindspore/core/ops/one_hot.h @@ -1,5 +1,5 @@ /** - * Copyright 2020-2021 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,12 +24,14 @@ namespace mindspore { namespace ops { +constexpr auto kNameOneHot = "OneHot"; + /// \brief Computes a one-hot tensor. Refer to Python API @ref mindspore.ops.OneHot for more details. class MIND_API OneHot : public BaseOperator { public: MIND_API_BASE_MEMBER(OneHot); /// \brief Constructor. - OneHot() : BaseOperator("OneHot") { InitIOName({"indices", "depth", "on_value", "off_value"}, {"output"}); } + OneHot() : BaseOperator(kNameOneHot) { InitIOName({"indices", "depth", "on_value", "off_value"}, {"output"}); } /// \brief Init. Refer to the parameters of Python API @ref mindspore.ops.OneHot for the inputs. void Init(const int64_t axis); /// \brief Set axis. diff --git a/mindspore/core/ops/ones.h b/mindspore/core/ops/ones.h index 9bb7080723f..768c8651201 100644 --- a/mindspore/core/ops/ones.h +++ b/mindspore/core/ops/ones.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,12 +26,14 @@ namespace mindspore { namespace ops { +constexpr auto kNameOnes = "Ones"; + /// \brief Creates a tensor filled with value ones. Refer to Python API @ref mindspore.ops.Ones for more details. -class Ones : public BaseOperator { +class MIND_API Ones : public BaseOperator { public: MIND_API_BASE_MEMBER(Ones); /// \brief Constructor. - Ones() : BaseOperator("Ones") {} + Ones() : BaseOperator(kNameOnes) {} /// \brief Init. Refer to the parameters of Python API @ref mindspore.ops.Ones for the inputs. void Init() const {} }; diff --git a/mindspore/core/ops/ragged_range.h b/mindspore/core/ops/ragged_range.h index 87b7d8f1fa9..e35ef51a844 100644 --- a/mindspore/core/ops/ragged_range.h +++ b/mindspore/core/ops/ragged_range.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,7 +34,6 @@ class MIND_API RaggedRange : public BaseOperator { /// \brief Method to init the op. void Init() const {} }; - } // namespace ops } // namespace mindspore diff --git a/mindspore/core/ops/real.h b/mindspore/core/ops/real.h index af5ac148db6..e8e280f00d7 100644 --- a/mindspore/core/ops/real.h +++ b/mindspore/core/ops/real.h @@ -1,5 +1,5 @@ /** - * Copyright 2020-2021 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,13 +24,15 @@ namespace mindspore { namespace ops { +constexpr auto kNameReal = "Real"; + /// \brief Returns a Tensor that is the real part of the input. /// Refer to Python API @ref mindspore.ops.Real for more details. class MIND_API Real : public BaseOperator { public: MIND_API_BASE_MEMBER(Real); /// \brief Constructor. - Real() : BaseOperator("Real") { InitIOName({"input"}, {"output"}); } + Real() : BaseOperator(kNameReal) { InitIOName({"input"}, {"output"}); } /// \brief Init. Refer to the parameters of Python API @ref mindspore.ops.Real for the inputs. void Init() {} }; diff --git a/mindspore/core/ops/reciprocal.h b/mindspore/core/ops/reciprocal.h index 4ca1f5142c4..971764fa042 100644 --- a/mindspore/core/ops/reciprocal.h +++ b/mindspore/core/ops/reciprocal.h @@ -1,5 +1,5 @@ /** - * Copyright 2020-2021 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,7 +31,7 @@ class MIND_API Reciprocal : public BaseOperator { public: MIND_API_BASE_MEMBER(Reciprocal); /// \brief Constructor. - Reciprocal() : BaseOperator("Reciprocal") { InitIOName({"x"}, {"y"}); } + Reciprocal() : BaseOperator(kNameReciprocal) { InitIOName({"x"}, {"y"}); } /// \brief Init. Refer to the parameters of Python API @ref mindspore.ops.Reciprocal for the inputs. void Init() const {} }; diff --git a/mindspore/core/ops/reluv2.h b/mindspore/core/ops/reluv2.h index 8926a43b523..44f8863818e 100644 --- a/mindspore/core/ops/reluv2.h +++ b/mindspore/core/ops/reluv2.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,7 +32,7 @@ class MIND_API ReLUV2 : public BaseOperator { public: MIND_API_BASE_MEMBER(ReLUV2); /// \brief Constructor. - ReLUV2() : BaseOperator("ReluV2") { InitIOName({"x"}, {"output", "mask"}); } + ReLUV2() : BaseOperator(kNameReLUV2) { InitIOName({"x"}, {"output", "mask"}); } /// \brief Constructor. explicit ReLUV2(const std::string k_name) : BaseOperator(k_name) { InitIOName({"x"}, {"output", "mask"}); } /// \brief Init. diff --git a/mindspore/core/ops/resize_nearest_neighbor.h b/mindspore/core/ops/resize_nearest_neighbor.h index a5c9d972d26..868f91cf01d 100644 --- a/mindspore/core/ops/resize_nearest_neighbor.h +++ b/mindspore/core/ops/resize_nearest_neighbor.h @@ -1,5 +1,5 @@ /** - * Copyright 2020 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,7 +47,6 @@ class MIND_API ResizeNearestNeighbor : public BaseOperator { /// \return align_corners. bool get_align_corners() const; }; - } // namespace ops } // namespace mindspore diff --git a/mindspore/core/ops/rint.h b/mindspore/core/ops/rint.h index 27a64da94d8..2fd3fce27f8 100644 --- a/mindspore/core/ops/rint.h +++ b/mindspore/core/ops/rint.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ namespace mindspore { namespace ops { constexpr auto kNameRint = "Rint"; -class Rint : public BaseOperator { +class MIND_API Rint : public BaseOperator { public: MIND_API_BASE_MEMBER(Rint); Rint() : BaseOperator(kNameRint) { InitIOName({"x"}, {"output"}); } diff --git a/mindspore/core/ops/roll.h b/mindspore/core/ops/roll.h index d7c525cfc01..e359a3f97bb 100644 --- a/mindspore/core/ops/roll.h +++ b/mindspore/core/ops/roll.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ namespace mindspore { namespace ops { constexpr auto kNameRoll = "Roll"; /// \brief Rolls the elements of a tensor along an axis. -class Roll : public BaseOperator { +class MIND_API Roll : public BaseOperator { public: MIND_API_BASE_MEMBER(Roll); /// \brief Constructor. diff --git a/mindspore/core/ops/scalar_summary.h b/mindspore/core/ops/scalar_summary.h index 141db00f52a..5056c225923 100644 --- a/mindspore/core/ops/scalar_summary.h +++ b/mindspore/core/ops/scalar_summary.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,13 +26,15 @@ namespace mindspore { namespace ops { +constexpr auto kNameScalarSummary = "ScalarSummary"; + /// \brief Outputs a scalar to a protocol buffer through a scalar summary operator. /// Refer to Python API @ref mindspore.ops.ScalarSummary for more details. class MIND_API ScalarSummary : public BaseOperator { public: MIND_API_BASE_MEMBER(ScalarSummary); /// \brief Constructor. - ScalarSummary() : BaseOperator("ScalarSummary") {} + ScalarSummary() : BaseOperator(kNameScalarSummary) {} /// \brief Init. void Init(); /// \brief Set side_effect_io. diff --git a/mindspore/core/ops/shape.h b/mindspore/core/ops/shape.h index 763ca99dff7..4b260d64f48 100644 --- a/mindspore/core/ops/shape.h +++ b/mindspore/core/ops/shape.h @@ -1,5 +1,5 @@ /** - * Copyright 2020 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,13 +26,15 @@ namespace mindspore { namespace ops { +constexpr auto kNameShape = "Shape"; + /// \brief Returns the shape of the input tensor. /// Refer to Python API @ref mindspore.ops.Shape for more details. class MIND_API Shape : public BaseOperator { public: MIND_API_BASE_MEMBER(Shape); /// \brief Constructor. - Shape() : BaseOperator("Shape") {} + Shape() : BaseOperator(kNameShape) {} /// \brief Init. void Init() const {} }; diff --git a/mindspore/core/ops/sign.h b/mindspore/core/ops/sign.h index 880a0e86a90..9096104ed62 100644 --- a/mindspore/core/ops/sign.h +++ b/mindspore/core/ops/sign.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ namespace mindspore { namespace ops { constexpr auto kNameSign = "Sign"; -class Sign : public BaseOperator { +class MIND_API Sign : public BaseOperator { public: MIND_API_BASE_MEMBER(Sign); Sign() : BaseOperator(kNameSign) { InitIOName({"x"}, {"y"}); } diff --git a/mindspore/core/ops/sinh.h b/mindspore/core/ops/sinh.h index 9cd49c6dcfe..95a80de5bf1 100644 --- a/mindspore/core/ops/sinh.h +++ b/mindspore/core/ops/sinh.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ namespace mindspore { namespace ops { constexpr auto kNameSinh = "Sinh"; -class Sinh : public BaseOperator { +class MIND_API Sinh : public BaseOperator { public: MIND_API_BASE_MEMBER(Sinh); Sinh() : BaseOperator(kNameSinh) { InitIOName({"x"}, {"output"}); } diff --git a/mindspore/core/ops/size.h b/mindspore/core/ops/size.h index b7134e5ffc6..fa637188462 100644 --- a/mindspore/core/ops/size.h +++ b/mindspore/core/ops/size.h @@ -1,5 +1,5 @@ /** - * Copyright 2020 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,7 +32,6 @@ class MIND_API Size : public BaseOperator { /// \brief Constructor. Size() : BaseOperator(kNameSize) {} }; - } // namespace ops } // namespace mindspore diff --git a/mindspore/core/ops/soft_shrink.h b/mindspore/core/ops/soft_shrink.h index 7cba0024e38..75eb72ebf67 100644 --- a/mindspore/core/ops/soft_shrink.h +++ b/mindspore/core/ops/soft_shrink.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,7 +37,6 @@ class MIND_API SoftShrink : public BaseOperator { abstract::AbstractBasePtr SoftShrinkInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive, const std::vector &input_args); - } // namespace ops } // namespace mindspore #endif // MINDSPORE_CORE_OPS_SOFTSHRINK_H_ diff --git a/mindspore/core/ops/sparse_apply_adadelta.h b/mindspore/core/ops/sparse_apply_adadelta.h index ccd1f46b46e..c2c7ef9ec39 100644 --- a/mindspore/core/ops/sparse_apply_adadelta.h +++ b/mindspore/core/ops/sparse_apply_adadelta.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ namespace mindspore { namespace ops { constexpr auto kNameSparseApplyAdadelta = "SparseApplyAdadelta"; -class SparseApplyAdadelta : public BaseOperator { +class MIND_API SparseApplyAdadelta : public BaseOperator { public: MIND_API_BASE_MEMBER(SparseApplyAdadelta); SparseApplyAdadelta() : BaseOperator(kNameSparseApplyAdadelta) { diff --git a/mindspore/core/ops/sparse_apply_r_m_s_prop.h b/mindspore/core/ops/sparse_apply_r_m_s_prop.h index 1b3bf79aca2..c5c1d97e454 100644 --- a/mindspore/core/ops/sparse_apply_r_m_s_prop.h +++ b/mindspore/core/ops/sparse_apply_r_m_s_prop.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,7 +29,7 @@ namespace mindspore { namespace ops { constexpr auto kNameSparseApplyRMSProp = "SparseApplyRMSProp"; /// \brief Update relevant entries according to the rmsprop algorithm. -class SparseApplyRMSProp : public BaseOperator { +class MIND_API SparseApplyRMSProp : public BaseOperator { public: MIND_API_BASE_MEMBER(SparseApplyRMSProp); /// \brief Constructor. diff --git a/mindspore/core/ops/split_v.h b/mindspore/core/ops/split_v.h index c4e8f69337d..750f2a3d56b 100644 --- a/mindspore/core/ops/split_v.h +++ b/mindspore/core/ops/split_v.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,7 @@ namespace ops { constexpr auto kNameSplitV = "SplitV"; /// \brief Splits the input tensor into num_split tensors along the given dimension. /// Refer to Python API @ref mindspore.ops.SplitV for more details. -class SplitV : public BaseOperator { +class MIND_API SplitV : public BaseOperator { public: MIND_API_BASE_MEMBER(SplitV); /// \brief Constructor. diff --git a/mindspore/core/ops/square.h b/mindspore/core/ops/square.h index bc6293e108c..99ae99d1068 100644 --- a/mindspore/core/ops/square.h +++ b/mindspore/core/ops/square.h @@ -1,5 +1,5 @@ /** - * Copyright 2020-2021 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,12 +25,14 @@ namespace mindspore { namespace ops { +constexpr auto kNameSquare = "Square"; + /// \brief Returns square of a tensor element-wise. Refer to Python API @ref mindspore.ops.Square for more details. class MIND_API Square : public BaseOperator { public: MIND_API_BASE_MEMBER(Square); /// \brief Constructor. - Square() : BaseOperator("Square") { InitIOName({"input_x"}, {"output"}); } + Square() : BaseOperator(kNameSquare) { InitIOName({"input_x"}, {"output"}); } /// \brief Init. void Init() const {} }; diff --git a/mindspore/core/ops/strided_slice.h b/mindspore/core/ops/strided_slice.h index 0dfde09cc9f..d1f165be917 100644 --- a/mindspore/core/ops/strided_slice.h +++ b/mindspore/core/ops/strided_slice.h @@ -1,5 +1,5 @@ /** - * Copyright 2020-2021 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,12 +27,13 @@ namespace mindspore { namespace ops { constexpr auto kNameStridedSlice = "StridedSlice"; + /// \brief Extracts a strided slice of a tensor. Refer to Python API @ref mindspore.ops.StridedSlice for more details. class MIND_API StridedSlice : public BaseOperator { public: MIND_API_BASE_MEMBER(StridedSlice); /// \brief Constructor. - StridedSlice() : BaseOperator("StridedSlice") { InitIOName({"x", "begin", "end", "strides"}, {"output"}); } + StridedSlice() : BaseOperator(kNameStridedSlice) { InitIOName({"x", "begin", "end", "strides"}, {"output"}); } /// \brief Init. Refer to the parameters of python API @ref mindspore.ops.StridedSlice for the inputs. void Init(int64_t begin_mask = 0, int64_t end_mask = 0, int64_t ellipsis_mask = 0, int64_t new_axis_mask = 0, int64_t shrink_axis_mask = 0); diff --git a/mindspore/core/ops/tensor_summary.h b/mindspore/core/ops/tensor_summary.h index 5516b7e5006..0ea8b24e1aa 100644 --- a/mindspore/core/ops/tensor_summary.h +++ b/mindspore/core/ops/tensor_summary.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,13 +26,15 @@ namespace mindspore { namespace ops { +constexpr auto kNameTensorSummary = "TensorSummary"; + /// \brief Outputs a tensor to a protocol buffer through a tensor summary operator. /// Refer to Python API @ref mindspore.ops.TensorSummary for more details. class MIND_API TensorSummary : public BaseOperator { public: MIND_API_BASE_MEMBER(TensorSummary); /// \brief Constructor. - TensorSummary() : BaseOperator("TensorSummary") {} + TensorSummary() : BaseOperator(kNameTensorSummary) {} /// \brief Init. void Init(); /// \brief Set side_effect_io. diff --git a/mindspore/core/ops/trunc.h b/mindspore/core/ops/trunc.h index 272cee6f0cb..0962e4e632d 100644 --- a/mindspore/core/ops/trunc.h +++ b/mindspore/core/ops/trunc.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ namespace mindspore { namespace ops { constexpr auto kNameTrunc = "Trunc"; /// \brief Returns a new tensor with the truncated integer values of the elements of input. -class Trunc : public BaseOperator { +class MIND_API Trunc : public BaseOperator { public: MIND_API_BASE_MEMBER(Trunc); /// \brief Constructor. diff --git a/mindspore/core/ops/truncate_mod.h b/mindspore/core/ops/truncate_mod.h index 4d837ee3c63..4ec71439247 100644 --- a/mindspore/core/ops/truncate_mod.h +++ b/mindspore/core/ops/truncate_mod.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ namespace mindspore { namespace ops { constexpr auto kNameTruncateMod = "TruncateMod"; -class TruncateMod : public BaseOperator { +class MIND_API TruncateMod : public BaseOperator { public: MIND_API_BASE_MEMBER(TruncateMod); TruncateMod() : BaseOperator(kNameTruncateMod) { InitIOName({"x", "y"}, {"output"}); } diff --git a/mindspore/core/ops/xdivy.h b/mindspore/core/ops/xdivy.h index bff2b609d35..63c3667b310 100644 --- a/mindspore/core/ops/xdivy.h +++ b/mindspore/core/ops/xdivy.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,10 +29,11 @@ namespace mindspore { namespace ops { constexpr auto kNameXdivy = "Xdivy"; -class Xdivy : public BaseOperator { + +class MIND_API Xdivy : public BaseOperator { public: MIND_API_BASE_MEMBER(Xdivy); - Xdivy() : BaseOperator("Xdivy") { InitIOName({"x", "y"}, {"output"}); } + Xdivy() : BaseOperator(kNameXdivy) { InitIOName({"x", "y"}, {"output"}); } }; using PrimXdivyPtr = std::shared_ptr; diff --git a/mindspore/core/ops/zeros.h b/mindspore/core/ops/zeros.h index 430c0ffc675..775f5024d21 100644 --- a/mindspore/core/ops/zeros.h +++ b/mindspore/core/ops/zeros.h @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,12 +26,14 @@ namespace mindspore { namespace ops { +constexpr auto kNameZeros = "Zeros"; + /// \brief Creates a tensor filled with value zeros. Refer to Python API @ref mindspore.ops.Zeros for more details. class MIND_API Zeros : public BaseOperator { public: MIND_API_BASE_MEMBER(Zeros); /// \brief Constructor. - Zeros() : BaseOperator("Zeros") {} + Zeros() : BaseOperator(kNameZeros) {} /// \brief Init. void Init() const {} }; diff --git a/mindspore/core/ops/zeros_like.h b/mindspore/core/ops/zeros_like.h index 10eecb083f2..819699f281b 100644 --- a/mindspore/core/ops/zeros_like.h +++ b/mindspore/core/ops/zeros_like.h @@ -1,5 +1,5 @@ /** - * Copyright 2020-2021 Huawei Technologies Co., Ltd + * Copyright 2020-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,12 +24,14 @@ namespace mindspore { namespace ops { +constexpr auto kNameZerosLike = "ZerosLike"; + /// \brief Creates a new tensor. Refer to Python API @ref mindspore.ops.ZerosLike for more details. class MIND_API ZerosLike : public BaseOperator { public: MIND_API_BASE_MEMBER(ZerosLike); /// \brief Constructor. - ZerosLike() : BaseOperator("ZerosLike") { InitIOName({"x"}, {"y"}); } + ZerosLike() : BaseOperator(kNameZerosLike) { InitIOName({"x"}, {"y"}); } /// \brief Init. void Init() const {} }; diff --git a/mindspore/lite/test/config_level0/models_onnx_fp16.cfg b/mindspore/lite/test/config_level0/models_onnx_fp16.cfg index 4ea5aecc687..2c87868db37 100644 --- a/mindspore/lite/test/config_level0/models_onnx_fp16.cfg +++ b/mindspore/lite/test/config_level0/models_onnx_fp16.cfg @@ -131,9 +131,10 @@ ml_video_edit_moon_mode_sky_refine.onnx;2;1,256,256,4:1,88,88,4 2 ml_video_edit_face_edit_pix2pixHD_unet.onnx 0.5 ml_video_edit_styleCode_part1.onnx 14 ml_video_edit_styleCode_part2.onnx;9 8 -poisson_galleryc_c_image.onnx;1:input;1,224,224,3 15 # cur acc for poisson_galleryc_c_text_cast_fp_with_norm_no_flatten.onnx is 14.2% -poisson_galleryc_c_text_cast_fp_with_norm_no_flatten.onnx;1:input 15 +poisson_galleryc_c_image.onnx;1:input;1,224,224,3 15 +# cur acc for poisson_galleryc_c_text_cast_fp_with_norm_no_flatten.onnx is 4.8% +poisson_galleryc_c_text_cast_fp_with_norm_no_flatten.onnx;1:input 5 ml_video_edit_face_cutout_portraitSeg_1.onnx;2:a,b 2 ml_video_edit_face_cutout_portraitSeg_deconv.onnx;2:a,b 4 ml_video_edit_face_edit_retina_0906.onnx;1:input;1,107,80,3;;fp16_weight 2.5 diff --git a/mindspore/lite/tools/converter/adapter/dpico/parser/detection_output_param_helper.cc b/mindspore/lite/tools/converter/adapter/dpico/parser/detection_output_param_helper.cc index b6d510a5128..b1509da45bb 100644 --- a/mindspore/lite/tools/converter/adapter/dpico/parser/detection_output_param_helper.cc +++ b/mindspore/lite/tools/converter/adapter/dpico/parser/detection_output_param_helper.cc @@ -242,6 +242,5 @@ int GetDetectionOutputParamFromAttrs(std::vector * } return RET_OK; } - } // namespace dpico } // namespace mindspore diff --git a/mindspore/lite/tools/optimizer/fusion/fullconnected_fusion.cc b/mindspore/lite/tools/optimizer/fusion/fullconnected_fusion.cc index 20d5078aa43..cbd4c33b1cf 100644 --- a/mindspore/lite/tools/optimizer/fusion/fullconnected_fusion.cc +++ b/mindspore/lite/tools/optimizer/fusion/fullconnected_fusion.cc @@ -1,5 +1,5 @@ /** - * Copyright 2021 Huawei Technologies Co., Ltd + * Copyright 2021-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,6 @@ #include "ops/op_utils.h" namespace mindspore::opt { - namespace { constexpr size_t kFcWeightIndex = 2; constexpr size_t kFcParameterDims = 2;