nGraph and CPU plugin opset rtti (#6445)

This commit is contained in:
Vladislav Volkov 2021-07-01 21:28:16 +03:00 committed by GitHub
parent 267f9a3b77
commit 94ee9ab7c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
66 changed files with 104 additions and 88 deletions

View File

@ -13,6 +13,7 @@ namespace MKLDNNPlugin {
class FullyConnectedNode : public ngraph::op::Op { class FullyConnectedNode : public ngraph::op::Op {
public: public:
static constexpr ngraph::NodeTypeInfo type_info{"FullyConnected", 0}; static constexpr ngraph::NodeTypeInfo type_info{"FullyConnected", 0};
static constexpr const ::ngraph::Node::type_info_t& get_type_info_static() { return type_info; }
const ngraph::NodeTypeInfo& get_type_info() const override { return type_info; } const ngraph::NodeTypeInfo& get_type_info() const override { return type_info; }
FullyConnectedNode() = default; FullyConnectedNode() = default;

View File

@ -11,6 +11,7 @@ namespace MKLDNNPlugin {
class LeakyReluNode : public ngraph::op::Op { class LeakyReluNode : public ngraph::op::Op {
public: public:
static constexpr ngraph::NodeTypeInfo type_info{"LeakyRelu", 0}; static constexpr ngraph::NodeTypeInfo type_info{"LeakyRelu", 0};
static constexpr const ::ngraph::Node::type_info_t& get_type_info_static() { return type_info; }
const ngraph::NodeTypeInfo& get_type_info() const override { return type_info; } const ngraph::NodeTypeInfo& get_type_info() const override { return type_info; }
LeakyReluNode(const ngraph::Output<ngraph::Node> &data, const float &negative_slope, const ngraph::element::Type output_type); LeakyReluNode(const ngraph::Output<ngraph::Node> &data, const float &negative_slope, const ngraph::element::Type output_type);

View File

@ -11,6 +11,7 @@ namespace MKLDNNPlugin {
class PowerStaticNode : public ngraph::op::Op { class PowerStaticNode : public ngraph::op::Op {
public: public:
static constexpr ngraph::NodeTypeInfo type_info{"PowerStatic", 0}; static constexpr ngraph::NodeTypeInfo type_info{"PowerStatic", 0};
static constexpr const ::ngraph::Node::type_info_t& get_type_info_static() { return type_info; }
const ngraph::NodeTypeInfo& get_type_info() const override { return type_info; } const ngraph::NodeTypeInfo& get_type_info() const override { return type_info; }
PowerStaticNode(const ngraph::Output<ngraph::Node> &data, const float &power, const float &scale, const float &shift, PowerStaticNode(const ngraph::Output<ngraph::Node> &data, const float &power, const float &scale, const float &shift,

View File

@ -11,6 +11,7 @@ namespace MKLDNNPlugin {
class SwishNode : public ngraph::op::Op { class SwishNode : public ngraph::op::Op {
public: public:
static constexpr ngraph::NodeTypeInfo type_info{"SwishCPU", 0}; static constexpr ngraph::NodeTypeInfo type_info{"SwishCPU", 0};
static constexpr const ::ngraph::Node::type_info_t& get_type_info_static() { return type_info; }
const ngraph::NodeTypeInfo &get_type_info() const override { return type_info; } const ngraph::NodeTypeInfo &get_type_info() const override { return type_info; }
explicit SwishNode(const ngraph::Output<Node> &input, float alpha = 1.0); explicit SwishNode(const ngraph::Output<Node> &input, float alpha = 1.0);

View File

@ -17,8 +17,8 @@ namespace ngraph
class NGRAPH_API BinaryConvolution : public Op class NGRAPH_API BinaryConvolution : public Op
{ {
public: public:
static constexpr NodeTypeInfo type_info{"BinaryConvolution", 1}; NGRAPH_RTTI_DECLARATION;
const NodeTypeInfo& get_type_info() const override { return type_info; }
enum class BinaryConvolutionMode enum class BinaryConvolutionMode
{ {
// Interpret input data and kernel values: 0 as -1, 1 as 1 // Interpret input data and kernel values: 0 as -1, 1 as 1

View File

@ -85,8 +85,8 @@ namespace ngraph
class NGRAPH_API Broadcast : public util::BroadcastBase class NGRAPH_API Broadcast : public util::BroadcastBase
{ {
public: public:
static constexpr NodeTypeInfo type_info{"Broadcast", 1}; NGRAPH_RTTI_DECLARATION;
const NodeTypeInfo& get_type_info() const override { return type_info; }
/// \brief Constructs a broadcast operation. /// \brief Constructs a broadcast operation.
Broadcast() = default; Broadcast() = default;
/// \brief Constructs a broadcast operation. /// \brief Constructs a broadcast operation.

View File

@ -26,8 +26,8 @@ namespace ngraph
class NGRAPH_API Constant : public Op class NGRAPH_API Constant : public Op
{ {
public: public:
static constexpr NodeTypeInfo type_info{"Constant", 0}; NGRAPH_RTTI_DECLARATION;
const NodeTypeInfo& get_type_info() const override { return type_info; }
Constant() = default; Constant() = default;
/// \brief Initialize a constant from tensor /// \brief Initialize a constant from tensor

View File

@ -16,8 +16,8 @@ namespace ngraph
class NGRAPH_API ConvertLike : public Op class NGRAPH_API ConvertLike : public Op
{ {
public: public:
static constexpr NodeTypeInfo type_info{"ConvertLike", 1}; NGRAPH_RTTI_DECLARATION;
const NodeTypeInfo& get_type_info() const override { return type_info; }
/// \brief Constructs a conversion operation. /// \brief Constructs a conversion operation.
ConvertLike() = default; ConvertLike() = default;
/// \brief Constructs a conversion operation. /// \brief Constructs a conversion operation.

View File

@ -15,8 +15,8 @@ namespace ngraph
class NGRAPH_API CTCGreedyDecoder : public Op class NGRAPH_API CTCGreedyDecoder : public Op
{ {
public: public:
static constexpr NodeTypeInfo type_info{"CTCGreedyDecoder", 0}; NGRAPH_RTTI_DECLARATION;
const NodeTypeInfo& get_type_info() const override { return type_info; }
CTCGreedyDecoder() = default; CTCGreedyDecoder() = default;
/// \brief Constructs a CTCGreedyDecoder operation /// \brief Constructs a CTCGreedyDecoder operation
/// ///

View File

@ -18,8 +18,8 @@ namespace ngraph
class NGRAPH_API DeformableConvolution : public Op class NGRAPH_API DeformableConvolution : public Op
{ {
public: public:
static constexpr NodeTypeInfo type_info{"DeformableConvolution", 1}; NGRAPH_RTTI_DECLARATION;
const NodeTypeInfo& get_type_info() const override { return type_info; }
/// \brief Constructs a conversion operation. /// \brief Constructs a conversion operation.
DeformableConvolution() = default; DeformableConvolution() = default;
/// \brief Constructs a conversion operation. /// \brief Constructs a conversion operation.

View File

@ -15,8 +15,8 @@ namespace ngraph
class NGRAPH_API DeformablePSROIPooling : public Op class NGRAPH_API DeformablePSROIPooling : public Op
{ {
public: public:
static constexpr NodeTypeInfo type_info{"DeformablePSROIPooling", 1}; NGRAPH_RTTI_DECLARATION;
const NodeTypeInfo& get_type_info() const override { return type_info; }
DeformablePSROIPooling() = default; DeformablePSROIPooling() = default;
/// \brief Constructs a DeformablePSROIPooling operation /// \brief Constructs a DeformablePSROIPooling operation
/// ///

View File

@ -37,8 +37,8 @@ namespace ngraph
class NGRAPH_API DetectionOutput : public Op class NGRAPH_API DetectionOutput : public Op
{ {
public: public:
static constexpr NodeTypeInfo type_info{"DetectionOutput", 0}; NGRAPH_RTTI_DECLARATION;
const NodeTypeInfo& get_type_info() const override { return type_info; }
DetectionOutput() = default; DetectionOutput() = default;
/// \brief Constructs a DetectionOutput operation /// \brief Constructs a DetectionOutput operation
/// ///

View File

@ -20,8 +20,8 @@ namespace ngraph
class NGRAPH_API Elu : public ngraph::op::Op class NGRAPH_API Elu : public ngraph::op::Op
{ {
public: public:
static constexpr NodeTypeInfo type_info{"Elu", 0}; NGRAPH_RTTI_DECLARATION;
const NodeTypeInfo& get_type_info() const override { return type_info; }
Elu() = default; Elu() = default;
/// \brief Constructs an Elu operation. /// \brief Constructs an Elu operation.
/// ///

View File

@ -17,8 +17,8 @@ namespace ngraph
class NGRAPH_API GatherTree : public Op class NGRAPH_API GatherTree : public Op
{ {
public: public:
static constexpr NodeTypeInfo type_info{"GatherTree", 1}; NGRAPH_RTTI_DECLARATION;
const NodeTypeInfo& get_type_info() const override { return type_info; }
GatherTree() = default; GatherTree() = default;
/// \param step_ids Tensor of shape [MAX_TIME, BATCH_SIZE, BEAM_WIDTH] with /// \param step_ids Tensor of shape [MAX_TIME, BATCH_SIZE, BEAM_WIDTH] with
/// indices from per each step /// indices from per each step

View File

@ -22,8 +22,8 @@ namespace ngraph
class NGRAPH_API GRN : public ngraph::op::util::FusedOp class NGRAPH_API GRN : public ngraph::op::util::FusedOp
{ {
public: public:
static constexpr NodeTypeInfo type_info{"GRN", 0}; NGRAPH_RTTI_DECLARATION;
const NodeTypeInfo& get_type_info() const override { return type_info; }
GRN(); GRN();
/// \brief Constructs a GRN operation. /// \brief Constructs a GRN operation.
/// ///

View File

@ -21,8 +21,8 @@ namespace ngraph
class NGRAPH_API HardSigmoid : public ngraph::op::util::FusedOp class NGRAPH_API HardSigmoid : public ngraph::op::util::FusedOp
{ {
public: public:
static constexpr NodeTypeInfo type_info{"HardSigmoid", 0}; NGRAPH_RTTI_DECLARATION;
const NodeTypeInfo& get_type_info() const override { return type_info; }
HardSigmoid(); HardSigmoid();
/// \brief Constructs a HardSigmoid operation. /// \brief Constructs a HardSigmoid operation.

View File

@ -30,8 +30,8 @@ namespace ngraph
class NGRAPH_API LRN : public Op class NGRAPH_API LRN : public Op
{ {
public: public:
static constexpr NodeTypeInfo type_info{"LRN", 0}; NGRAPH_RTTI_DECLARATION;
const NodeTypeInfo& get_type_info() const override { return type_info; }
/// \brief Constructs a LRN operation. /// \brief Constructs a LRN operation.
LRN() = default; LRN() = default;
/// \brief Constructs a LRN operation. /// \brief Constructs a LRN operation.

View File

@ -58,8 +58,8 @@ namespace ngraph
class NGRAPH_API LSTMCell : public util::RNNCellBase class NGRAPH_API LSTMCell : public util::RNNCellBase
{ {
public: public:
static constexpr NodeTypeInfo type_info{"LSTMCell", 0}; NGRAPH_RTTI_DECLARATION;
const NodeTypeInfo& get_type_info() const override { return type_info; }
LSTMCell(); LSTMCell();
/// ///
/// \brief Constructs LSTMCell node. /// \brief Constructs LSTMCell node.
@ -280,8 +280,8 @@ namespace ngraph
class NGRAPH_API LSTMCell : public util::RNNCellBase class NGRAPH_API LSTMCell : public util::RNNCellBase
{ {
public: public:
static constexpr NodeTypeInfo type_info{"LSTMCell", 4}; NGRAPH_RTTI_DECLARATION;
const NodeTypeInfo& get_type_info() const override { return type_info; }
LSTMCell(); LSTMCell();
/// ///
/// \brief Constructs LSTMCell node. /// \brief Constructs LSTMCell node.

View File

@ -23,8 +23,8 @@ namespace ngraph
CENTER CENTER
}; };
static constexpr NodeTypeInfo type_info{"NonMaxSuppression", 1}; NGRAPH_RTTI_DECLARATION;
const NodeTypeInfo& get_type_info() const override { return type_info; }
NonMaxSuppression() = default; NonMaxSuppression() = default;
/// \brief Constructs a NonMaxSuppression operation. /// \brief Constructs a NonMaxSuppression operation.

View File

@ -15,8 +15,8 @@ namespace ngraph
class NGRAPH_API OneHot : public Op class NGRAPH_API OneHot : public Op
{ {
public: public:
static constexpr NodeTypeInfo type_info{"OneHot", 1}; NGRAPH_RTTI_DECLARATION;
const NodeTypeInfo& get_type_info() const override { return type_info; }
/// \brief Constructs a one-hot operation. /// \brief Constructs a one-hot operation.
OneHot() = default; OneHot() = default;
/// \brief Constructs a one-hot operation. /// \brief Constructs a one-hot operation.

View File

@ -18,8 +18,8 @@ namespace ngraph
class NGRAPH_API Pad : public Op class NGRAPH_API Pad : public Op
{ {
public: public:
static constexpr NodeTypeInfo type_info{"Pad", 1}; NGRAPH_RTTI_DECLARATION;
const NodeTypeInfo& get_type_info() const override { return type_info; }
/// \brief Constructs a generic padding operation. /// \brief Constructs a generic padding operation.
/// ///
/// \param arg The output producing input tensor to be padded. /// \param arg The output producing input tensor to be padded.

View File

@ -42,8 +42,8 @@ namespace ngraph
class NGRAPH_API PriorBox : public Op class NGRAPH_API PriorBox : public Op
{ {
public: public:
static constexpr NodeTypeInfo type_info{"PriorBox", 0}; NGRAPH_RTTI_DECLARATION;
const NodeTypeInfo& get_type_info() const override { return type_info; }
PriorBox() = default; PriorBox() = default;
/// \brief Constructs a PriorBox operation /// \brief Constructs a PriorBox operation
/// ///

View File

@ -35,8 +35,8 @@ namespace ngraph
class NGRAPH_API PriorBoxClustered : public Op class NGRAPH_API PriorBoxClustered : public Op
{ {
public: public:
static constexpr NodeTypeInfo type_info{"PriorBoxClustered", 0}; NGRAPH_RTTI_DECLARATION;
const NodeTypeInfo& get_type_info() const override { return type_info; }
PriorBoxClustered() = default; PriorBoxClustered() = default;
/// \brief Constructs a PriorBoxClustered operation /// \brief Constructs a PriorBoxClustered operation
/// ///

View File

@ -15,8 +15,8 @@ namespace ngraph
class NGRAPH_API PSROIPooling : public Op class NGRAPH_API PSROIPooling : public Op
{ {
public: public:
static constexpr NodeTypeInfo type_info{"PSROIPooling", 0}; NGRAPH_RTTI_DECLARATION;
const NodeTypeInfo& get_type_info() const override { return type_info; }
PSROIPooling() = default; PSROIPooling() = default;
/// \brief Constructs a PSROIPooling operation /// \brief Constructs a PSROIPooling operation
/// ///

View File

@ -57,8 +57,8 @@ namespace ngraph
class NGRAPH_API Range : public Op class NGRAPH_API Range : public Op
{ {
public: public:
static constexpr NodeTypeInfo type_info{"Range", 0}; NGRAPH_RTTI_DECLARATION;
const NodeTypeInfo& get_type_info() const override { return type_info; }
/// \brief Constructs an unitialized range operation. /// \brief Constructs an unitialized range operation.
Range() = default; Range() = default;

View File

@ -15,8 +15,8 @@ namespace ngraph
class NGRAPH_API RegionYolo : public Op class NGRAPH_API RegionYolo : public Op
{ {
public: public:
static constexpr NodeTypeInfo type_info{"RegionYolo", 0}; NGRAPH_RTTI_DECLARATION;
const NodeTypeInfo& get_type_info() const override { return type_info; }
RegionYolo() = default; RegionYolo() = default;
/// ///
/// \brief Constructs a RegionYolo operation /// \brief Constructs a RegionYolo operation

View File

@ -15,8 +15,8 @@ namespace ngraph
class NGRAPH_API ReorgYolo : public Op class NGRAPH_API ReorgYolo : public Op
{ {
public: public:
static constexpr NodeTypeInfo type_info{"ReorgYolo", 0}; NGRAPH_RTTI_DECLARATION;
const NodeTypeInfo& get_type_info() const override { return type_info; }
ReorgYolo() = default; ReorgYolo() = default;
/// \brief Constructs a ReorgYolo operation /// \brief Constructs a ReorgYolo operation
/// ///

View File

@ -15,8 +15,8 @@ namespace ngraph
class NGRAPH_API ReverseSequence : public Op class NGRAPH_API ReverseSequence : public Op
{ {
public: public:
static constexpr NodeTypeInfo type_info{"ReverseSequence", 0}; NGRAPH_RTTI_DECLARATION;
const NodeTypeInfo& get_type_info() const override { return type_info; }
ReverseSequence() = default; ReverseSequence() = default;
/// \brief Constructs a ReverseSequence operation. /// \brief Constructs a ReverseSequence operation.
/// ///

View File

@ -41,8 +41,8 @@ namespace ngraph
class NGRAPH_API RNNCell : public util::RNNCellBase class NGRAPH_API RNNCell : public util::RNNCellBase
{ {
public: public:
static constexpr NodeTypeInfo type_info{"RNNCell", 0}; NGRAPH_RTTI_DECLARATION;
const NodeTypeInfo& get_type_info() const override { return type_info; }
RNNCell(); RNNCell();
/// ///
/// \brief Constructs RNNCell node. /// \brief Constructs RNNCell node.

View File

@ -24,8 +24,8 @@ namespace ngraph
class NGRAPH_API SpaceToDepth : public Op class NGRAPH_API SpaceToDepth : public Op
{ {
public: public:
static constexpr NodeTypeInfo type_info{"SpaceToDepth", 0}; NGRAPH_RTTI_DECLARATION;
const NodeTypeInfo& get_type_info() const override { return type_info; }
enum class SpaceToDepthMode enum class SpaceToDepthMode
{ {
// The output depth is gathered from [block_size, ..., block_size, C] // The output depth is gathered from [block_size, ..., block_size, C]

View File

@ -20,8 +20,8 @@ namespace ngraph
class NGRAPH_API TensorIterator : public op::util::SubGraphOp class NGRAPH_API TensorIterator : public op::util::SubGraphOp
{ {
public: public:
static constexpr NodeTypeInfo type_info{"TensorIterator", 0}; NGRAPH_RTTI_DECLARATION;
const NodeTypeInfo& get_type_info() const override { return type_info; }
bool visit_attributes(AttributeVisitor& visitor) override; bool visit_attributes(AttributeVisitor& visitor) override;
TensorIterator() = default; TensorIterator() = default;

View File

@ -18,8 +18,8 @@ namespace ngraph
class NGRAPH_API Tile : public Op class NGRAPH_API Tile : public Op
{ {
public: public:
static constexpr NodeTypeInfo type_info{"Tile", 0}; NGRAPH_RTTI_DECLARATION;
const NodeTypeInfo& get_type_info() const override { return type_info; }
Tile() = default; Tile() = default;
/// \brief Perform dynamic padding of a tensor /// \brief Perform dynamic padding of a tensor
/// ///

View File

@ -44,6 +44,8 @@ namespace ngraph
const BroadcastModeSpec& broadcast_mode = BroadcastType::NUMPY); const BroadcastModeSpec& broadcast_mode = BroadcastType::NUMPY);
public: public:
NGRAPH_RTTI_DECLARATION;
void validate_and_infer_types() override; void validate_and_infer_types() override;
/// \return true and the AxisSet if broadcast axes can be fully determined. /// \return true and the AxisSet if broadcast axes can be fully determined.
virtual std::pair<bool, AxisSet> get_broadcast_axes() const; virtual std::pair<bool, AxisSet> get_broadcast_axes() const;

View File

@ -21,6 +21,8 @@ namespace ngraph
: public Op : public Op
{ {
public: public:
NGRAPH_RTTI_DECLARATION;
// Fused op decomposition can be performed in the presence of // Fused op decomposition can be performed in the presence of
// partial shapes // partial shapes
virtual bool can_decompose_with_partial_shapes() { return false; } virtual bool can_decompose_with_partial_shapes() { return false; }

View File

@ -54,6 +54,8 @@ namespace ngraph
class NGRAPH_API RNNCellBase : public Op class NGRAPH_API RNNCellBase : public Op
{ {
public: public:
NGRAPH_RTTI_DECLARATION;
/// ///
/// \brief Constructs a RNNCellBase class. /// \brief Constructs a RNNCellBase class.
/// ///
@ -87,7 +89,7 @@ namespace ngraph
/// ///
void validate_input_rank_dimension(const std::vector<ngraph::PartialShape>& input); void validate_input_rank_dimension(const std::vector<ngraph::PartialShape>& input);
virtual bool visit_attributes(AttributeVisitor& visitor); bool visit_attributes(AttributeVisitor& visitor) override;
std::size_t get_hidden_size() const { return m_hidden_size; } std::size_t get_hidden_size() const { return m_hidden_size; }
float get_clip() const { return m_clip; } float get_clip() const { return m_clip; }
const std::vector<std::string>& get_activations() const { return m_activations; } const std::vector<std::string>& get_activations() const { return m_activations; }

View File

@ -14,7 +14,7 @@
using namespace std; using namespace std;
using namespace ngraph; using namespace ngraph;
constexpr NodeTypeInfo op::v1::BinaryConvolution::type_info; NGRAPH_RTTI_DEFINITION(op::v1::BinaryConvolution, "BinaryConvolution", 1);
op::v1::BinaryConvolution::BinaryConvolution(const Output<Node>& data, op::v1::BinaryConvolution::BinaryConvolution(const Output<Node>& data,
const Output<Node>& kernel, const Output<Node>& kernel,

View File

@ -245,7 +245,7 @@ namespace
} }
} // namespace } // namespace
constexpr NodeTypeInfo op::v1::Broadcast::type_info; NGRAPH_RTTI_DEFINITION(op::v1::Broadcast, "Broadcast", 1, op::util::BroadcastBase);
op::v1::Broadcast::Broadcast(const Output<Node>& arg, op::v1::Broadcast::Broadcast(const Output<Node>& arg,
const Output<Node>& target_shape, const Output<Node>& target_shape,

View File

@ -38,7 +38,7 @@ static inline string to_cpp_string(T value)
return rc; return rc;
} }
constexpr NodeTypeInfo op::Constant::type_info; NGRAPH_RTTI_DEFINITION(op::Constant, "Constant", 0);
op::Constant::Constant(const shared_ptr<runtime::Tensor>& tensor) op::Constant::Constant(const shared_ptr<runtime::Tensor>& tensor)
: Constant(tensor->get_element_type(), tensor->get_shape()) : Constant(tensor->get_element_type(), tensor->get_shape())

View File

@ -12,7 +12,7 @@
using namespace std; using namespace std;
using namespace ngraph; using namespace ngraph;
constexpr NodeTypeInfo op::v1::ConvertLike::type_info; NGRAPH_RTTI_DEFINITION(op::v1::ConvertLike, "ConvertLike", 1);
op::v1::ConvertLike::ConvertLike(const Output<Node>& data, const Output<Node>& like) op::v1::ConvertLike::ConvertLike(const Output<Node>& data, const Output<Node>& like)
: Op({data, like}) : Op({data, like})

View File

@ -8,7 +8,7 @@
using namespace std; using namespace std;
using namespace ngraph; using namespace ngraph;
constexpr NodeTypeInfo op::CTCGreedyDecoder::type_info; NGRAPH_RTTI_DEFINITION(op::CTCGreedyDecoder, "CTCGreedyDecoder", 0);
op::CTCGreedyDecoder::CTCGreedyDecoder(const Output<Node>& input, op::CTCGreedyDecoder::CTCGreedyDecoder(const Output<Node>& input,
const Output<Node>& seq_len, const Output<Node>& seq_len,

View File

@ -13,7 +13,7 @@
using namespace std; using namespace std;
using namespace ngraph; using namespace ngraph;
constexpr NodeTypeInfo op::v1::DeformableConvolution::type_info; NGRAPH_RTTI_DEFINITION(op::v1::DeformableConvolution, "DeformableConvolution", 1);
op::v1::DeformableConvolution::DeformableConvolution(const Output<Node>& arg, op::v1::DeformableConvolution::DeformableConvolution(const Output<Node>& arg,
const Output<Node>& offsets, const Output<Node>& offsets,

View File

@ -8,7 +8,7 @@
using namespace std; using namespace std;
using namespace ngraph; using namespace ngraph;
constexpr NodeTypeInfo op::v1::DeformablePSROIPooling::type_info; NGRAPH_RTTI_DEFINITION(op::v1::DeformablePSROIPooling, "DeformablePSROIPooling", 1);
op::v1::DeformablePSROIPooling::DeformablePSROIPooling(const Output<Node>& input, op::v1::DeformablePSROIPooling::DeformablePSROIPooling(const Output<Node>& input,
const Output<Node>& coords, const Output<Node>& coords,

View File

@ -8,7 +8,7 @@
using namespace std; using namespace std;
using namespace ngraph; using namespace ngraph;
constexpr NodeTypeInfo op::DetectionOutput::type_info; NGRAPH_RTTI_DEFINITION(op::DetectionOutput, "DetectionOutput", 0);
op::DetectionOutput::DetectionOutput(const Output<Node>& box_logits, op::DetectionOutput::DetectionOutput(const Output<Node>& box_logits,
const Output<Node>& class_preds, const Output<Node>& class_preds,

View File

@ -11,7 +11,7 @@
using namespace std; using namespace std;
using namespace ngraph; using namespace ngraph;
constexpr NodeTypeInfo op::Elu::type_info; NGRAPH_RTTI_DEFINITION(op::Elu, "Elu", 0);
op::Elu::Elu(const Output<Node>& data, const double alpha) op::Elu::Elu(const Output<Node>& data, const double alpha)
: Op({data}) : Op({data})

View File

@ -9,7 +9,7 @@
using namespace std; using namespace std;
using namespace ngraph; using namespace ngraph;
constexpr NodeTypeInfo op::v1::GatherTree::type_info; NGRAPH_RTTI_DEFINITION(op::v1::GatherTree, "GatherTree", 1);
op::v1::GatherTree::GatherTree(const Output<Node>& step_ids, op::v1::GatherTree::GatherTree(const Output<Node>& step_ids,
const Output<Node>& parent_idx, const Output<Node>& parent_idx,

View File

@ -22,7 +22,7 @@ using namespace ngraph;
NGRAPH_SUPPRESS_DEPRECATED_START NGRAPH_SUPPRESS_DEPRECATED_START
constexpr NodeTypeInfo op::GRN::type_info; NGRAPH_RTTI_DEFINITION(op::GRN, "GRN", 0, op::util::FusedOp);
op::GRN::GRN() op::GRN::GRN()
: FusedOp() : FusedOp()

View File

@ -18,7 +18,7 @@ using namespace ngraph;
NGRAPH_SUPPRESS_DEPRECATED_START NGRAPH_SUPPRESS_DEPRECATED_START
constexpr NodeTypeInfo op::HardSigmoid::type_info; NGRAPH_RTTI_DEFINITION(op::HardSigmoid, "HardSigmoid", 0, op::util::FusedOp);
op::HardSigmoid::HardSigmoid() op::HardSigmoid::HardSigmoid()
: FusedOp() : FusedOp()

View File

@ -12,7 +12,7 @@
using namespace std; using namespace std;
using namespace ngraph; using namespace ngraph;
constexpr NodeTypeInfo op::LRN::type_info; NGRAPH_RTTI_DEFINITION(op::LRN, "LRN", 0);
op::LRN::LRN(const Output<Node>& arg, double alpha, double beta, double bias, size_t size) op::LRN::LRN(const Output<Node>& arg, double alpha, double beta, double bias, size_t size)
: LRN(arg, op::Constant::create(element::i64, Shape{1}, {1}), alpha, beta, bias, size) : LRN(arg, op::Constant::create(element::i64, Shape{1}, {1}), alpha, beta, bias, size)

View File

@ -16,8 +16,8 @@
using namespace std; using namespace std;
using namespace ngraph; using namespace ngraph;
constexpr NodeTypeInfo op::v4::LSTMCell::type_info; NGRAPH_RTTI_DEFINITION(op::v0::LSTMCell, "LSTMCell", 0, op::util::RNNCellBase);
constexpr NodeTypeInfo op::v0::LSTMCell::type_info; NGRAPH_RTTI_DEFINITION(op::v4::LSTMCell, "LSTMCell", 4, op::util::RNNCellBase);
op::v0::LSTMCell::LSTMCell() op::v0::LSTMCell::LSTMCell()
: m_input_forget(false) : m_input_forget(false)

View File

@ -18,7 +18,7 @@ using namespace ngraph;
// ------------------------------ V1 ------------------------------ // ------------------------------ V1 ------------------------------
constexpr NodeTypeInfo op::v1::NonMaxSuppression::type_info; NGRAPH_RTTI_DEFINITION(op::v1::NonMaxSuppression, "NonMaxSuppression", 1);
op::v1::NonMaxSuppression::NonMaxSuppression( op::v1::NonMaxSuppression::NonMaxSuppression(
const Output<Node>& boxes, const Output<Node>& boxes,

View File

@ -12,7 +12,7 @@
using namespace std; using namespace std;
using namespace ngraph; using namespace ngraph;
constexpr NodeTypeInfo op::v1::OneHot::type_info; NGRAPH_RTTI_DEFINITION(op::v1::OneHot, "OneHot", 1);
op::v1::OneHot::OneHot(const Output<Node>& indices, op::v1::OneHot::OneHot(const Output<Node>& indices,
const Output<Node>& depth, const Output<Node>& depth,

View File

@ -15,7 +15,7 @@
using namespace std; using namespace std;
using namespace ngraph; using namespace ngraph;
constexpr NodeTypeInfo op::v1::Pad::type_info; NGRAPH_RTTI_DEFINITION(op::v1::Pad, "Pad", 1);
op::v1::Pad::Pad(const Output<Node>& arg, op::v1::Pad::Pad(const Output<Node>& arg,
const Output<Node>& pads_begin, const Output<Node>& pads_begin,

View File

@ -14,7 +14,7 @@
using namespace std; using namespace std;
using namespace ngraph; using namespace ngraph;
constexpr NodeTypeInfo op::PriorBox::type_info; NGRAPH_RTTI_DEFINITION(op::PriorBox, "PriorBox", 0);
op::PriorBox::PriorBox(const Output<Node>& layer_shape, op::PriorBox::PriorBox(const Output<Node>& layer_shape,
const Output<Node>& image_shape, const Output<Node>& image_shape,

View File

@ -14,7 +14,7 @@
using namespace std; using namespace std;
using namespace ngraph; using namespace ngraph;
constexpr NodeTypeInfo op::PriorBoxClustered::type_info; NGRAPH_RTTI_DEFINITION(op::PriorBoxClustered, "PriorBoxClustered", 0);
op::PriorBoxClustered::PriorBoxClustered(const Output<Node>& layer_shape, op::PriorBoxClustered::PriorBoxClustered(const Output<Node>& layer_shape,
const Output<Node>& image_shape, const Output<Node>& image_shape,

View File

@ -9,7 +9,7 @@
using namespace std; using namespace std;
using namespace ngraph; using namespace ngraph;
constexpr NodeTypeInfo op::PSROIPooling::type_info; NGRAPH_RTTI_DEFINITION(op::PSROIPooling, "PSROIPooling", 0);
op::PSROIPooling::PSROIPooling(const Output<Node>& input, op::PSROIPooling::PSROIPooling(const Output<Node>& input,
const Output<Node>& coords, const Output<Node>& coords,

View File

@ -322,7 +322,7 @@ bool op::v4::Range::has_evaluate() const
return false; return false;
} }
constexpr NodeTypeInfo op::v0::Range::type_info; NGRAPH_RTTI_DEFINITION(op::v0::Range, "Range", 0);
op::v0::Range::Range(const Output<Node>& start, const Output<Node>& stop, const Output<Node>& step) op::v0::Range::Range(const Output<Node>& start, const Output<Node>& stop, const Output<Node>& step)
: Op({start, stop, step}) : Op({start, stop, step})

View File

@ -9,7 +9,7 @@
using namespace std; using namespace std;
using namespace ngraph; using namespace ngraph;
constexpr NodeTypeInfo op::RegionYolo::type_info; NGRAPH_RTTI_DEFINITION(op::RegionYolo, "RegionYolo", 0);
op::RegionYolo::RegionYolo(const Output<Node>& input, op::RegionYolo::RegionYolo(const Output<Node>& input,
const size_t coords, const size_t coords,

View File

@ -9,7 +9,7 @@
using namespace std; using namespace std;
using namespace ngraph; using namespace ngraph;
constexpr NodeTypeInfo op::ReorgYolo::type_info; NGRAPH_RTTI_DEFINITION(op::ReorgYolo, "ReorgYolo", 0);
op::ReorgYolo::ReorgYolo(const Output<Node>& input, const Strides& strides) op::ReorgYolo::ReorgYolo(const Output<Node>& input, const Strides& strides)
: Op({input}) : Op({input})

View File

@ -14,7 +14,7 @@
using namespace std; using namespace std;
using namespace ngraph; using namespace ngraph;
constexpr NodeTypeInfo op::ReverseSequence::type_info; NGRAPH_RTTI_DEFINITION(op::ReverseSequence, "ReverseSequence", 0);
op::ReverseSequence::ReverseSequence(const Output<Node>& arg, op::ReverseSequence::ReverseSequence(const Output<Node>& arg,
const Output<Node>& seq_indices, const Output<Node>& seq_indices,

View File

@ -13,7 +13,7 @@
using namespace std; using namespace std;
using namespace ngraph; using namespace ngraph;
constexpr NodeTypeInfo op::v0::RNNCell::type_info; NGRAPH_RTTI_DEFINITION(op::v0::RNNCell, "RNNCell", 0, util::RNNCellBase);
op::v0::RNNCell::RNNCell() op::v0::RNNCell::RNNCell()
{ {

View File

@ -18,7 +18,7 @@
using namespace std; using namespace std;
using namespace ngraph; using namespace ngraph;
constexpr NodeTypeInfo op::SpaceToDepth::type_info; NGRAPH_RTTI_DEFINITION(op::SpaceToDepth, "SpaceToDepth", 0);
op::SpaceToDepth::SpaceToDepth(const Output<Node>& data, op::SpaceToDepth::SpaceToDepth(const Output<Node>& data,
const SpaceToDepthMode& mode, const SpaceToDepthMode& mode,

View File

@ -11,7 +11,7 @@
using namespace std; using namespace std;
using namespace ngraph; using namespace ngraph;
constexpr NodeTypeInfo op::v0::TensorIterator::type_info; NGRAPH_RTTI_DEFINITION(op::v0::TensorIterator, "TensorIterator", 0, op::util::SubGraphOp);
op::v0::TensorIterator::TensorIterator(const OutputVector& values) op::v0::TensorIterator::TensorIterator(const OutputVector& values)
: op::util::SubGraphOp(values) : op::util::SubGraphOp(values)

View File

@ -12,7 +12,7 @@
using namespace std; using namespace std;
using namespace ngraph; using namespace ngraph;
constexpr NodeTypeInfo op::v0::Tile::type_info; NGRAPH_RTTI_DEFINITION(op::v0::Tile, "Tile", 0);
op::v0::Tile::Tile(const Output<Node>& data, const Output<Node>& repeats) op::v0::Tile::Tile(const Output<Node>& data, const Output<Node>& repeats)
: Op({data, repeats}) : Op({data, repeats})

View File

@ -18,6 +18,8 @@
using namespace std; using namespace std;
using namespace ngraph; using namespace ngraph;
NGRAPH_RTTI_DEFINITION(op::util::BroadcastBase, "BroadcastBase", 0);
op::util::BroadcastBase::BroadcastBase(const Output<Node>& arg, op::util::BroadcastBase::BroadcastBase(const Output<Node>& arg,
const Output<Node>& target_shape, const Output<Node>& target_shape,
const Output<Node>& axes_mapping, const Output<Node>& axes_mapping,

View File

@ -11,6 +11,8 @@ using namespace ngraph;
NGRAPH_SUPPRESS_DEPRECATED_START NGRAPH_SUPPRESS_DEPRECATED_START
NGRAPH_RTTI_DEFINITION(op::util::FusedOp, "FusedOp", 0);
op::util::FusedOp::FusedOp() op::util::FusedOp::FusedOp()
: Op() : Op()
{ {

View File

@ -19,6 +19,8 @@
using namespace std; using namespace std;
using namespace ngraph; using namespace ngraph;
NGRAPH_RTTI_DEFINITION(op::util::RNNCellBase, "RNNCellBase", 0);
std::shared_ptr<Node> ngraph::op::util::convert_lstm_node_format(const Output<Node>& node, std::shared_ptr<Node> ngraph::op::util::convert_lstm_node_format(const Output<Node>& node,
LSTMWeightsFormat from_format, LSTMWeightsFormat from_format,
LSTMWeightsFormat to_format, LSTMWeightsFormat to_format,