From 6923150b7a0887f24fa8dd4c3bf3ff730d54211d Mon Sep 17 00:00:00 2001 From: yefeng Date: Mon, 11 Oct 2021 16:53:00 +0800 Subject: [PATCH] add instruction --- mindspore/core/ops/all.h | 17 +++++++++++++++++ mindspore/core/ops/assert.h | 17 +++++++++++++++++ mindspore/core/ops/partial.h | 7 +++++++ mindspore/core/ops/switch.h | 7 +++++++ 4 files changed, 48 insertions(+) diff --git a/mindspore/core/ops/all.h b/mindspore/core/ops/all.h index f34bb519f28..671e544743e 100644 --- a/mindspore/core/ops/all.h +++ b/mindspore/core/ops/all.h @@ -23,13 +23,30 @@ namespace mindspore { namespace ops { constexpr auto kNameAll = "All"; +/// \brief All defined All operator prototype of lite. class MS_CORE_API All : public PrimitiveC { public: + /// \brief Constructor. All() : PrimitiveC(kNameAll) {} + + /// \brief Destructor. ~All() = default; + MS_DECLARE_PARENT(All, PrimitiveC); + + /// \brief Method to init the op's attributes. + /// + /// \param[in] keep_dims Define the dim. void Init(const int64_t keep_dims); + + /// \brief Method to set keep_dims attributes. + /// + /// \param[in] keep_dims Define the dim. void set_keep_dims(const int64_t keep_dims); + + /// \brief Method to get keep_dims attributes. + /// + /// \return keep_dims attributes. int64_t get_keep_dims() const; }; } // namespace ops diff --git a/mindspore/core/ops/assert.h b/mindspore/core/ops/assert.h index 74ecc7a114c..bb421dce4c0 100644 --- a/mindspore/core/ops/assert.h +++ b/mindspore/core/ops/assert.h @@ -25,13 +25,30 @@ namespace mindspore { namespace ops { constexpr auto kNameAssert = "Assert"; +/// \brief Assert defined Assert operator prototype of lite. class MS_CORE_API Assert : public PrimitiveC { public: + /// \brief Constructor. Assert() : PrimitiveC(kNameAssert) {} + + /// \brief Destructor. ~Assert() = default; + MS_DECLARE_PARENT(Assert, PrimitiveC); + + /// \brief Method to init the op's attributes. + /// + /// \param[in] summarize Define print the number of each tensor. void Init(const int64_t summarize = 3); + + /// \brief Method to set summarize attributes. + /// + /// \param[in] summarize Define print the number of each tensor. void set_summarize(const int64_t summarize); + + /// \brief Method to get summarize attributes. + /// + /// \return summarize attributes. int64_t get_summarize() const; }; diff --git a/mindspore/core/ops/partial.h b/mindspore/core/ops/partial.h index f0dd2856d2d..e6de70aa488 100644 --- a/mindspore/core/ops/partial.h +++ b/mindspore/core/ops/partial.h @@ -23,11 +23,18 @@ namespace mindspore { namespace ops { constexpr auto kNamePartial = "Partial"; +/// \brief Partial defined Partial operator prototype of lite. class MS_CORE_API Partial : public PrimitiveC { public: + /// \brief Constructor. Partial() : PrimitiveC(kNamePartial) {} + + /// \brief Destructor. ~Partial() = default; + MS_DECLARE_PARENT(Partial, PrimitiveC); + + /// \brief Method to init the op's attributes. void Init() {} }; } // namespace ops diff --git a/mindspore/core/ops/switch.h b/mindspore/core/ops/switch.h index ecd82b03b8b..3a3b26516f1 100644 --- a/mindspore/core/ops/switch.h +++ b/mindspore/core/ops/switch.h @@ -23,11 +23,18 @@ namespace mindspore { namespace ops { constexpr auto kNameSwitch = "Switch"; +/// \brief Switch defined Switch operator prototype of lite. class MS_CORE_API Switch : public PrimitiveC { public: + /// \brief Constructor. Switch() : PrimitiveC(kNameSwitch) {} + + /// \brief Destructor. ~Switch() = default; + MS_DECLARE_PARENT(Switch, PrimitiveC); + + /// \brief Method to init the op's attributes. void Init() {} }; } // namespace ops