diff --git a/include/mxnet/operator.h b/include/mxnet/operator.h index 0dd6eb935b82..a9b3c9f2b3ae 100644 --- a/include/mxnet/operator.h +++ b/include/mxnet/operator.h @@ -47,6 +47,12 @@ class Operator { /*! \brief bias argument */ kBiasArg = 2 }; + enum Property { + /*! \brief Op contains interanl state, won't influence engine schedule */ + kContainInteralState = 1, + /*! \brief Op forward require random number, will influence engine schedule */ + kForwardRequireRnd = 2, + }; /*! * \brief get types of input argument of this oeprator * \return a vector corresponding to type of each argument @@ -56,6 +62,14 @@ class Operator { // default most of layers only have one data argument return std::vector(1, kDataArg); } + /*! + * \brief describe property of op + * \return a bit map in int + */ + virtual int DescribeProperty() const { + // default most of layer only conatin internal state + return kContainInteralState; + } /*! * \brief set param for the operator from string * \param name parameter name