Removed using of BWDCMP macro (#14292)
* Removed using of BWDCMP macro * Fixed code style * Removed type info * Fixed ONNX tests * Fixed CPU tests * Fixed ExecutionNode
This commit is contained in:
parent
d3fa858fcc
commit
d5d67b2be8
@ -17,7 +17,6 @@ namespace op {
|
||||
class ConvolutionIE : public Op {
|
||||
public:
|
||||
OPENVINO_OP("ConvolutionIE", "util");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
/// \brief Constructs a batched convolution operation.
|
||||
ConvolutionIE() = default;
|
||||
/// \brief Constructs a batched convolution operation.
|
||||
|
@ -17,7 +17,6 @@ namespace op {
|
||||
class CropIE : public Op {
|
||||
public:
|
||||
OPENVINO_OP("CropIE", "legacy");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
CropIE(const Output<Node>& data1,
|
||||
std::vector<int64_t> axes,
|
||||
|
@ -17,7 +17,6 @@ namespace op {
|
||||
class DeconvolutionIE : public Op {
|
||||
public:
|
||||
OPENVINO_OP("DeconvolutionIE", "util");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
DeconvolutionIE() = default;
|
||||
|
||||
|
@ -4,10 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <ie_api.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "ngraph/op/op.hpp"
|
||||
|
||||
enum class ELTWISE_TYPE { Sum, Prod, Max, Sub, Min, Div };
|
||||
@ -17,7 +17,6 @@ namespace op {
|
||||
class Eltwise : public Op {
|
||||
public:
|
||||
OPENVINO_OP("Eltwise", "legacy");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
Eltwise(const Output<Node>& data1,
|
||||
const Output<Node>& data2,
|
||||
@ -33,7 +32,9 @@ public:
|
||||
ELTWISE_TYPE eltwise_type;
|
||||
|
||||
private:
|
||||
ELTWISE_TYPE type_from_string(const std::string &eltwise_type) const { return as_enum<ELTWISE_TYPE>(eltwise_type); }
|
||||
ELTWISE_TYPE type_from_string(const std::string& eltwise_type) const {
|
||||
return as_enum<ELTWISE_TYPE>(eltwise_type);
|
||||
}
|
||||
element::Type m_output_type;
|
||||
};
|
||||
|
||||
@ -45,15 +46,11 @@ std::ostream &operator<<(std::ostream &s, const ELTWISE_TYPE &type);
|
||||
namespace ov {
|
||||
|
||||
template <>
|
||||
class AttributeAdapter<ELTWISE_TYPE>
|
||||
: public EnumAttributeAdapterBase<ELTWISE_TYPE> {
|
||||
class AttributeAdapter<ELTWISE_TYPE> : public EnumAttributeAdapterBase<ELTWISE_TYPE> {
|
||||
public:
|
||||
AttributeAdapter(ELTWISE_TYPE &value)
|
||||
: EnumAttributeAdapterBase<ELTWISE_TYPE>(value) {}
|
||||
AttributeAdapter(ELTWISE_TYPE& value) : EnumAttributeAdapterBase<ELTWISE_TYPE>(value) {}
|
||||
|
||||
static constexpr DiscreteTypeInfo type_info{"AttributeAdapter<ELTWISE_TYPE>",
|
||||
1};
|
||||
const DiscreteTypeInfo &get_type_info() const override { return type_info; }
|
||||
OPENVINO_RTTI("AttributeAdapter<ELTWISE_TYPE>");
|
||||
};
|
||||
|
||||
} // namespace ov
|
||||
|
@ -18,7 +18,6 @@ namespace op {
|
||||
class FullyConnected : public Op {
|
||||
public:
|
||||
OPENVINO_OP("FullyConnected", "legacy");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
FullyConnected() = default;
|
||||
/// \brief Constructs an FullyConnected operation.
|
||||
///
|
||||
|
@ -17,7 +17,6 @@ namespace op {
|
||||
class GatherIE : public Op {
|
||||
public:
|
||||
OPENVINO_OP("GatherIE", "legacy");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
GatherIE() = default;
|
||||
|
||||
GatherIE(const Output<Node>& params, const Output<Node>& indices, int64_t axis);
|
||||
|
@ -17,7 +17,6 @@ namespace op {
|
||||
class GatherTreeIE : public Op {
|
||||
public:
|
||||
OPENVINO_OP("GatherTreeIE", "legacy");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
GatherTreeIE() = default;
|
||||
/// \param step_ids Tensor of shape [MAX_TIME, BATCH_SIZE, BEAM_WIDTH] with
|
||||
/// indices from per each step
|
||||
|
@ -18,7 +18,6 @@ namespace op {
|
||||
class GRUCellIE : public Op {
|
||||
public:
|
||||
OPENVINO_OP("GRUCellIE", "legacy");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
GRUCellIE(const Output<Node> &X,
|
||||
const Output<Node> &H_t,
|
||||
|
@ -20,7 +20,6 @@ namespace op {
|
||||
class GRUSequenceIE : public ngraph::op::util::RNNCellBase {
|
||||
public:
|
||||
OPENVINO_OP("GRUSequenceIE", "legacy");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
GRUSequenceIE(const Output <Node> &X,
|
||||
const Output <Node> &H_t,
|
||||
|
@ -17,7 +17,6 @@ namespace op {
|
||||
class HardSigmoid_IE : public Op {
|
||||
public:
|
||||
OPENVINO_OP("HardSigmoid_IE", "legacy");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
HardSigmoid_IE() = default;
|
||||
|
||||
|
@ -31,7 +31,6 @@ struct InterpolateIEAttrs {
|
||||
class Interp : public Op {
|
||||
public:
|
||||
OPENVINO_OP("Interp", "legacy");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
Interp(const Output<Node>& image, const InterpolateIEAttrs& attrs);
|
||||
|
||||
@ -56,7 +55,6 @@ struct ResampleIEAttrs {
|
||||
class ResampleV2 : public Op {
|
||||
public:
|
||||
OPENVINO_OP("ResampleV2", "legacy");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
ResampleV2(const Output<Node>& image,
|
||||
const Output<Node>& output_shape,
|
||||
|
@ -17,7 +17,6 @@ namespace op {
|
||||
class LRN_IE : public Op {
|
||||
public:
|
||||
OPENVINO_OP("LRN_IE", "legacy");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
LRN_IE() = default;
|
||||
|
||||
|
@ -18,7 +18,6 @@ namespace op {
|
||||
class LSTMCellIE : public Op {
|
||||
public:
|
||||
OPENVINO_OP("LSTMCellIE", "legacy");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
LSTMCellIE(const Output<Node> &X,
|
||||
const Output<Node> &H_t,
|
||||
|
@ -18,7 +18,6 @@ namespace op {
|
||||
class LSTMSequenceIE : public ngraph::op::util::RNNCellBase {
|
||||
public:
|
||||
OPENVINO_OP("LSTMSequenceIE", "legacy");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
LSTMSequenceIE() = delete;
|
||||
|
||||
|
@ -24,7 +24,6 @@ class NonMaxSuppressionIE3;
|
||||
class ngraph::op::NonMaxSuppressionIE : public Op {
|
||||
public:
|
||||
OPENVINO_OP("NonMaxSuppressionIE", "legacy");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
NonMaxSuppressionIE(const Output<Node>& boxes,
|
||||
const Output<Node>& scores,
|
||||
@ -49,7 +48,6 @@ public:
|
||||
class ngraph::op::NonMaxSuppressionIE2 : public NonMaxSuppressionIE {
|
||||
public:
|
||||
OPENVINO_OP("NonMaxSuppressionIE2", "legacy");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
NonMaxSuppressionIE2(const Output<Node>& boxes,
|
||||
const Output<Node>& scores,
|
||||
@ -68,7 +66,6 @@ public:
|
||||
class ngraph::op::NonMaxSuppressionIE3 : public Op {
|
||||
public:
|
||||
OPENVINO_OP("NonMaxSuppressionIE3", "legacy");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
NonMaxSuppressionIE3(const Output<Node>& boxes,
|
||||
const Output<Node>& scores,
|
||||
|
@ -17,7 +17,6 @@ namespace op {
|
||||
class NormalizeIE : public Op {
|
||||
public:
|
||||
OPENVINO_OP("NormalizeIE", "legacy");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
NormalizeIE() = default;
|
||||
|
||||
|
@ -24,7 +24,6 @@ class OneHotIE;
|
||||
class ngraph::op::OneHotIE : public Op {
|
||||
public:
|
||||
OPENVINO_OP("OneHotIE", "legacy");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
explicit OneHotIE(const Output<ngraph::Node>& input, int axis, int depth, float on_value, float off_value, element::Type type);
|
||||
|
||||
|
@ -19,7 +19,6 @@ namespace op {
|
||||
class PadIE : public Op {
|
||||
public:
|
||||
OPENVINO_OP("PadIE", "legacy");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
explicit PadIE(const std::shared_ptr<op::v1::Pad>& pad);
|
||||
|
||||
|
@ -16,7 +16,6 @@ namespace op {
|
||||
class PowerIE : public Op {
|
||||
public:
|
||||
OPENVINO_OP("PowerIE", "legacy");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
PowerIE() = default;
|
||||
PowerIE(const Output<Node>& data_batch,
|
||||
const float power, const float scale, const float shift, const element::Type output_type = element::undefined);
|
||||
|
@ -17,7 +17,6 @@ namespace op {
|
||||
class ProposalIE : public Op {
|
||||
public:
|
||||
OPENVINO_OP("ProposalIE", "legacy");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
// \brief Constructs a Proposal operation
|
||||
//
|
||||
|
@ -16,7 +16,6 @@ namespace op {
|
||||
class ReLUIE : public Op {
|
||||
public:
|
||||
OPENVINO_OP("ReLUIE", "legacy");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
ReLUIE(const Output<Node> & data, const float & negative_slope, const element::Type output_type);
|
||||
|
||||
|
@ -18,7 +18,6 @@ namespace op {
|
||||
class RNNCellIE : public Op {
|
||||
public:
|
||||
OPENVINO_OP("RNNCellIE", "legacy");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
RNNCellIE(const Output<Node> &X,
|
||||
const Output<Node> &H_t,
|
||||
|
@ -18,7 +18,6 @@ namespace op {
|
||||
class RNNSequenceIE : public ngraph::op::util::RNNCellBase {
|
||||
public:
|
||||
OPENVINO_OP("RNNSequenceIE", "legacy");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
RNNSequenceIE(const Output <Node> &X,
|
||||
const Output <Node> &H_t,
|
||||
|
@ -16,7 +16,6 @@ namespace op {
|
||||
class ScaleShiftIE : public Op {
|
||||
public:
|
||||
OPENVINO_OP("ScaleShiftIE", "legacy");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
ScaleShiftIE(const Output<Node>& data_batch,
|
||||
const Output<Node>& weights,
|
||||
|
@ -16,7 +16,6 @@ namespace op {
|
||||
class SeluIE : public Op {
|
||||
public:
|
||||
OPENVINO_OP("SeluIE", "legacy");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
SeluIE(const Output<Node> & input,
|
||||
const float alpha,
|
||||
|
@ -15,7 +15,6 @@ namespace op {
|
||||
class SwishIE : public Op {
|
||||
public:
|
||||
OPENVINO_OP("SwishIE", "legacy");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
explicit SwishIE(const Output<Node> &input, float alpha = 1.0);
|
||||
|
||||
|
@ -16,7 +16,6 @@ namespace op {
|
||||
class TileIE : public Op {
|
||||
public:
|
||||
OPENVINO_OP("TileIE", "legacy");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
TileIE(const Output<Node>& data1,
|
||||
const int64_t axis,
|
||||
|
@ -18,7 +18,6 @@ namespace op {
|
||||
class TopKIE : public Op {
|
||||
public:
|
||||
OPENVINO_OP("TopKIE", "legacy");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
TopKIE(const Output<Node>& data,
|
||||
const Output<Node>& k,
|
||||
|
@ -14,8 +14,6 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::ConvolutionIE);
|
||||
|
||||
op::ConvolutionIE::ConvolutionIE(const Output<Node>& data_batch,
|
||||
const Output<Node>& filters,
|
||||
const Strides& strides,
|
||||
|
@ -14,8 +14,6 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::CropIE);
|
||||
|
||||
op::CropIE::CropIE(const Output<Node>& data, std::vector<int64_t> axes, std::vector<int64_t> dim,
|
||||
std::vector<int64_t> offset)
|
||||
: Op({data}), axes(axes), dim(dim), offset(offset) {
|
||||
|
@ -17,8 +17,6 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::DeconvolutionIE);
|
||||
|
||||
op::DeconvolutionIE::DeconvolutionIE(const Output<Node>& data,
|
||||
const Output<Node>& filters,
|
||||
const Strides& strides,
|
||||
|
@ -13,10 +13,13 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::Eltwise);
|
||||
|
||||
op::Eltwise::Eltwise(const Output<Node>& data1, const Output<Node>& data2, const ELTWISE_TYPE eltwise_type, const element::Type output_type)
|
||||
: Op({data1, data2}), eltwise_type(eltwise_type), m_output_type(output_type) {
|
||||
op::Eltwise::Eltwise(const Output<Node>& data1,
|
||||
const Output<Node>& data2,
|
||||
const ELTWISE_TYPE eltwise_type,
|
||||
const element::Type output_type)
|
||||
: Op({data1, data2}),
|
||||
eltwise_type(eltwise_type),
|
||||
m_output_type(output_type) {
|
||||
constructor_validate_and_infer_types();
|
||||
}
|
||||
|
||||
@ -35,14 +38,17 @@ void op::Eltwise::validate_and_infer_types() {
|
||||
|
||||
element::Type et_result;
|
||||
if (m_output_type == element::undefined) {
|
||||
NODE_VALIDATION_CHECK(this, element::Type::merge(et_result, data1_et, data2_et),
|
||||
"Element types for first and second do not match :", data1_et, " and ", data2_et);
|
||||
NODE_VALIDATION_CHECK(this,
|
||||
element::Type::merge(et_result, data1_et, data2_et),
|
||||
"Element types for first and second do not match :",
|
||||
data1_et,
|
||||
" and ",
|
||||
data2_et);
|
||||
} else {
|
||||
et_result = m_output_type;
|
||||
}
|
||||
|
||||
if (get_input_partial_shape(0).rank().is_dynamic() ||
|
||||
get_input_partial_shape(1).rank().is_dynamic()) {
|
||||
if (get_input_partial_shape(0).rank().is_dynamic() || get_input_partial_shape(1).rank().is_dynamic()) {
|
||||
set_output_type(0, et_result, PartialShape::dynamic());
|
||||
return;
|
||||
}
|
||||
@ -65,8 +71,10 @@ void op::Eltwise::validate_and_infer_types() {
|
||||
*output_shape_it = *shape2_it;
|
||||
}
|
||||
|
||||
if (shape1_it != shape1.rend()) ++shape1_it;
|
||||
if (shape2_it != shape2.rend()) ++shape2_it;
|
||||
if (shape1_it != shape1.rend())
|
||||
++shape1_it;
|
||||
if (shape2_it != shape2.rend())
|
||||
++shape2_it;
|
||||
++output_shape_it;
|
||||
if (output_shape_it == output_shape.rend()) {
|
||||
break;
|
||||
@ -85,9 +93,10 @@ std::ostream &ngraph::operator<<(std::ostream &s, const ELTWISE_TYPE &type) {
|
||||
}
|
||||
|
||||
namespace ov {
|
||||
template <> EnumNames<ELTWISE_TYPE> &EnumNames<ELTWISE_TYPE>::get() {
|
||||
static auto enum_names =
|
||||
EnumNames<ELTWISE_TYPE>("ELTWISE_TYPE", {{"sum", ELTWISE_TYPE::Sum},
|
||||
template <>
|
||||
EnumNames<ELTWISE_TYPE>& EnumNames<ELTWISE_TYPE>::get() {
|
||||
static auto enum_names = EnumNames<ELTWISE_TYPE>("ELTWISE_TYPE",
|
||||
{{"sum", ELTWISE_TYPE::Sum},
|
||||
{"prod", ELTWISE_TYPE::Prod},
|
||||
{"max", ELTWISE_TYPE::Max},
|
||||
{"sub", ELTWISE_TYPE::Sub},
|
||||
@ -95,7 +104,4 @@ template <> EnumNames<ELTWISE_TYPE> &EnumNames<ELTWISE_TYPE>::get() {
|
||||
{"div", ELTWISE_TYPE::Div}});
|
||||
return enum_names;
|
||||
}
|
||||
|
||||
constexpr DiscreteTypeInfo AttributeAdapter<ELTWISE_TYPE>::type_info;
|
||||
|
||||
} // namespace ov
|
||||
|
@ -10,8 +10,6 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::FullyConnected);
|
||||
|
||||
op::FullyConnected::FullyConnected(
|
||||
const Output<Node>& A,
|
||||
const Output<Node>& B,
|
||||
|
@ -16,8 +16,6 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::GatherIE);
|
||||
|
||||
op::GatherIE::GatherIE(const Output<Node>& params, const Output<Node>& indices, int64_t axis)
|
||||
: Op({params, indices})
|
||||
, m_axis(axis) {
|
||||
|
@ -10,8 +10,6 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::GatherTreeIE);
|
||||
|
||||
op::GatherTreeIE::GatherTreeIE(const Output<Node>& step_ids,
|
||||
const Output<Node>& parent_idx,
|
||||
const Output<Node>& max_seq_len,
|
||||
|
@ -11,8 +11,6 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::GRUCellIE);
|
||||
|
||||
op::GRUCellIE::GRUCellIE(const Output<Node>& X, const Output<Node>& H_t,
|
||||
const Output<Node>& WR, const Output<Node>& B, std::size_t hidden_size,
|
||||
const std::vector<std::string>& activations, const std::vector<float>& activations_alpha,
|
||||
|
@ -12,8 +12,6 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::GRUSequenceIE);
|
||||
|
||||
op::GRUSequenceIE::GRUSequenceIE(const Output<Node>& X,
|
||||
const Output<Node>& H_t,
|
||||
const Output<Node>& seq_lengths,
|
||||
|
@ -14,8 +14,6 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::HardSigmoid_IE);
|
||||
|
||||
op::HardSigmoid_IE::HardSigmoid_IE(const ngraph::Output<ngraph::Node> &arg,
|
||||
float alpha,
|
||||
float beta)
|
||||
|
@ -12,9 +12,6 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::Interp);
|
||||
BWDCMP_RTTI_DEFINITION(op::ResampleV2);
|
||||
|
||||
op::Interp::Interp(const Output<Node>& image, const InterpolateIEAttrs& attrs)
|
||||
: Op({image}), m_attrs(attrs) {
|
||||
constructor_validate_and_infer_types();
|
||||
|
@ -14,8 +14,6 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::LRN_IE);
|
||||
|
||||
op::LRN_IE::LRN_IE(const ngraph::Output<ngraph::Node>& arg, double alpha, double beta, double bias, size_t size,
|
||||
std::string region)
|
||||
: Op({arg}), m_alpha(alpha), m_beta(beta), m_bias(bias), m_size(size), m_region(region) {
|
||||
|
@ -11,8 +11,6 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::LSTMCellIE);
|
||||
|
||||
op::LSTMCellIE::LSTMCellIE(const Output<Node>& X, const Output<Node>& H_t, const Output<Node>& C_t,
|
||||
const Output<Node>& WR, const Output<Node>& B, std::size_t hidden_size,
|
||||
const std::vector<std::string>& activations, const std::vector<float>& activations_alpha,
|
||||
|
@ -12,8 +12,6 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::LSTMSequenceIE);
|
||||
|
||||
op::LSTMSequenceIE::LSTMSequenceIE(const Output<Node> &X,
|
||||
const Output<Node> &H_t,
|
||||
const Output<Node> &C_t,
|
||||
|
@ -12,10 +12,6 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::NonMaxSuppressionIE);
|
||||
BWDCMP_RTTI_DEFINITION(op::NonMaxSuppressionIE2);
|
||||
BWDCMP_RTTI_DEFINITION(op::NonMaxSuppressionIE3);
|
||||
|
||||
op::NonMaxSuppressionIE::NonMaxSuppressionIE(const Output<Node> &boxes,
|
||||
const Output<Node> &scores,
|
||||
const Output<Node> &max_output_boxes_per_class,
|
||||
|
@ -12,8 +12,6 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::NormalizeIE);
|
||||
|
||||
op::NormalizeIE::NormalizeIE(const Output<Node>& data, const Output<Node>& weights, float eps, bool across_spatial,
|
||||
bool channel_shared, const ngraph::element::Type output_type)
|
||||
: Op({data, weights}), m_eps(eps), m_across_spatial(across_spatial), m_channel_shared(channel_shared), m_output_type(output_type) {
|
||||
|
@ -9,8 +9,6 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::OneHotIE);
|
||||
|
||||
op::OneHotIE::OneHotIE(const Output<ngraph::Node>& input, int axis, int depth, float on_value, float off_value, element::Type type)
|
||||
: Op({input}), m_type(type), m_axis(axis), m_depth(depth), m_off_value(off_value), m_on_value(on_value) {
|
||||
constructor_validate_and_infer_types();
|
||||
|
@ -16,8 +16,6 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::PadIE);
|
||||
|
||||
op::PadIE::PadIE(const std::shared_ptr<op::v1::Pad>& pad)
|
||||
: Op({pad->input(0).get_source_output()}),
|
||||
m_pad_mode(pad->get_pad_mode()),
|
||||
|
@ -12,8 +12,6 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::PowerIE);
|
||||
|
||||
op::PowerIE::PowerIE(const Output<ngraph::Node>& data_batch, const float power, const float scale, const float shift, const element::Type output_type)
|
||||
: Op({data_batch}), scale(scale), power(power), shift(shift), m_output_type(output_type) {
|
||||
constructor_validate_and_infer_types();
|
||||
|
@ -11,8 +11,6 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::ProposalIE);
|
||||
|
||||
op::ProposalIE::ProposalIE(const Output<Node>& class_probs, const Output<Node>& class_bbox_deltas,
|
||||
const Output<Node>& image_shape, const ProposalAttrs& attrs)
|
||||
: Op({class_probs, class_bbox_deltas, image_shape}), m_attrs(attrs) {
|
||||
|
@ -13,8 +13,6 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::ReLUIE);
|
||||
|
||||
op::ReLUIE::ReLUIE(const Output<Node>& data, const float& negative_slope, const element::Type output_type)
|
||||
: Op(OutputVector {data}), m_negative_slope(negative_slope), m_output_type(output_type) {
|
||||
constructor_validate_and_infer_types();
|
||||
|
@ -11,8 +11,6 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::RNNCellIE);
|
||||
|
||||
op::RNNCellIE::RNNCellIE(const Output<Node>& X, const Output<Node>& H_t,
|
||||
const Output<Node>& WR, const Output<Node>& B, std::size_t hidden_size,
|
||||
const std::vector<std::string>& activations, const std::vector<float>& activations_alpha,
|
||||
|
@ -12,8 +12,6 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::RNNSequenceIE);
|
||||
|
||||
op::RNNSequenceIE::RNNSequenceIE(const Output<Node>& X,
|
||||
const Output<Node>& H_t,
|
||||
const Output<Node>& seq_lengths, // actually not supported
|
||||
|
@ -26,8 +26,6 @@ inline element::Type getMaxBitwidth(const std::vector<element::Type>& types) {
|
||||
return maxType;
|
||||
}
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::ScaleShiftIE);
|
||||
|
||||
op::ScaleShiftIE::ScaleShiftIE(const Output<Node>& data_batch, const Output<Node>& weights, const Output<Node>& bias, const element::Type output_type)
|
||||
: Op({data_batch, weights, bias}), output_type(output_type) {
|
||||
if (this->output_type == element::undefined) {
|
||||
|
@ -13,7 +13,6 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::SeluIE);
|
||||
op::SeluIE::SeluIE(const Output<Node> & input,
|
||||
const float alpha,
|
||||
const float gamma)
|
||||
|
@ -13,8 +13,6 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::SwishIE);
|
||||
|
||||
op::SwishIE::SwishIE(const Output<Node> & input, const float alpha)
|
||||
: Op({input}), m_alpha(alpha) {
|
||||
constructor_validate_and_infer_types();
|
||||
|
@ -13,8 +13,6 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::TileIE);
|
||||
|
||||
op::TileIE::TileIE(const Output<ngraph::Node>& data1, const int64_t axis, const int64_t tiles)
|
||||
: Op({data1}), axis(axis), tiles(tiles) {
|
||||
constructor_validate_and_infer_types();
|
||||
|
@ -11,8 +11,6 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::TopKIE);
|
||||
|
||||
op::TopKIE::TopKIE(const ngraph::Output<ngraph::Node> &data, const ngraph::Output<ngraph::Node> &k, const int64_t axis, const ngraph::op::TopKMode mode,
|
||||
const ngraph::op::TopKSortType sort, const element::Type& index_element_type)
|
||||
: Op({data, k}), m_axis(axis), m_mode(mode), m_sort_type(sort), m_index_element_type(index_element_type) {
|
||||
|
@ -24,7 +24,6 @@ namespace op {
|
||||
class ConvertSaturation : public ov::op::v0::Convert {
|
||||
public:
|
||||
OPENVINO_OP("ConvertSaturation", "SnippetsOpset", ov::op::v0::Convert);
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
ConvertSaturation(const Output<Node>& x, const ov::element::Type& destination_type);
|
||||
ConvertSaturation() = default;
|
||||
|
@ -23,7 +23,6 @@ namespace op {
|
||||
class ConvertTruncation : public ov::op::v0::Convert {
|
||||
public:
|
||||
OPENVINO_OP("ConvertTruncation", "SnippetsOpset", ov::op::v0::Convert);
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
ConvertTruncation(const Output<Node>& x, const ov::element::Type& destination_type);
|
||||
ConvertTruncation() = default;
|
||||
|
@ -9,8 +9,6 @@
|
||||
#include "ngraph/runtime/host_tensor.hpp"
|
||||
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(ngraph::snippets::op::ConvertSaturation);
|
||||
|
||||
ngraph::snippets::op::ConvertSaturation::ConvertSaturation(const Output<Node>& x, const ov::element::Type& destination_type)
|
||||
: ov::op::v0::Convert({x}, destination_type) {
|
||||
}
|
||||
|
@ -8,9 +8,6 @@
|
||||
|
||||
#include "ngraph/runtime/host_tensor.hpp"
|
||||
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(ngraph::snippets::op::ConvertTruncation);
|
||||
|
||||
ngraph::snippets::op::ConvertTruncation::ConvertTruncation(const Output<Node>& x, const ov::element::Type& destination_type)
|
||||
: ov::op::v0::Convert({x}, destination_type) {
|
||||
}
|
||||
|
@ -22,7 +22,6 @@ namespace internal {
|
||||
class TRANSFORMATIONS_API AUGRUCell : public ov::op::util::RNNCellBase {
|
||||
public:
|
||||
OPENVINO_OP("AUGRUCell", "ie_internal_opset", ov::op::util::RNNCellBase);
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
AUGRUCell();
|
||||
AUGRUCell(const Output<Node>& X,
|
||||
|
@ -21,7 +21,6 @@ namespace internal {
|
||||
class TRANSFORMATIONS_API AUGRUSequence : public ov::op::util::RNNCellBase {
|
||||
public:
|
||||
OPENVINO_OP("AUGRUSequence", "ie_internal_opset", ov::op::util::RNNCellBase);
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
AUGRUSequence();
|
||||
AUGRUSequence(const Output<Node>& X,
|
||||
|
@ -20,7 +20,6 @@ class TRANSFORMATIONS_API GenerateProposalsIEInternal : public op::v9::GenerateP
|
||||
|
||||
public:
|
||||
OPENVINO_OP("GenerateProposalsIEInternal", "ie_internal_opset");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
GenerateProposalsIEInternal() = default;
|
||||
|
||||
|
@ -16,7 +16,6 @@ namespace internal {
|
||||
class TRANSFORMATIONS_API MulticlassNmsIEInternal : public opset9::MulticlassNms {
|
||||
public:
|
||||
OPENVINO_OP("MulticlassNmsIEInternal", "ie_internal_opset", opset9::MulticlassNms);
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
MulticlassNmsIEInternal() = default;
|
||||
|
||||
|
@ -18,7 +18,6 @@ namespace internal {
|
||||
class TRANSFORMATIONS_API NonMaxSuppressionIEInternal : public Op {
|
||||
public:
|
||||
OPENVINO_OP("NonMaxSuppressionIEInternal", "ie_internal_opset");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
NonMaxSuppressionIEInternal() = default;
|
||||
|
||||
|
@ -11,8 +11,6 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(ov::op::internal::AUGRUCell);
|
||||
|
||||
ov::op::internal::AUGRUCell::AUGRUCell() : m_linear_before_reset(false) {
|
||||
m_activations = {"sigmoid", "tanh"};
|
||||
m_activation_f = get_activation_function(0);
|
||||
|
@ -10,8 +10,6 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(ov::op::internal::AUGRUSequence);
|
||||
|
||||
ov::op::internal::AUGRUSequence::AUGRUSequence()
|
||||
: m_direction(op::RecurrentSequenceDirection::FORWARD),
|
||||
m_linear_before_reset(false) {}
|
||||
|
@ -12,8 +12,6 @@
|
||||
using namespace std;
|
||||
using namespace ov;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::internal::GenerateProposalsIEInternal);
|
||||
|
||||
op::internal::GenerateProposalsIEInternal::GenerateProposalsIEInternal(const Output<Node>& im_info,
|
||||
const Output<Node>& anchors,
|
||||
const Output<Node>& deltas,
|
||||
|
@ -10,8 +10,6 @@
|
||||
using namespace std;
|
||||
using namespace ov;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::internal::MulticlassNmsIEInternal);
|
||||
|
||||
op::internal::MulticlassNmsIEInternal::MulticlassNmsIEInternal(const Output<Node>& boxes,
|
||||
const Output<Node>& scores,
|
||||
const op::util::MulticlassNmsBase::Attributes& attrs)
|
||||
|
@ -12,8 +12,6 @@
|
||||
using namespace std;
|
||||
using namespace ov;
|
||||
|
||||
BWDCMP_RTTI_DEFINITION(op::internal::NonMaxSuppressionIEInternal);
|
||||
|
||||
op::internal::NonMaxSuppressionIEInternal::NonMaxSuppressionIEInternal(const Output<Node>& boxes,
|
||||
const Output<Node>& scores,
|
||||
const Output<Node>& max_output_boxes_per_class,
|
||||
|
@ -609,15 +609,8 @@ public:
|
||||
AttributeAdapter(TestDummyDataTypeTransformationTests_NO_NGRAPH_NAME_COLISION& value)
|
||||
: DirectValueAccessor<TestDummyDataTypeTransformationTests_NO_NGRAPH_NAME_COLISION>(value) {}
|
||||
|
||||
static constexpr DiscreteTypeInfo type_info{"TestDummyDataTypeTransformationTests_NO_NGRAPH_NAME_COLISION", static_cast<uint64_t>(0)};
|
||||
|
||||
const DiscreteTypeInfo& get_type_info() const override {
|
||||
return type_info;
|
||||
}
|
||||
OPENVINO_RTTI("TestDummyDataTypeTransformationTests_NO_NGRAPH_NAME_COLISION");
|
||||
};
|
||||
|
||||
constexpr DiscreteTypeInfo AttributeAdapter<TestDummyDataTypeTransformationTests_NO_NGRAPH_NAME_COLISION>::type_info;
|
||||
|
||||
} // namespace ov
|
||||
|
||||
TEST(TransformationTests, DummyOpNegativeNotSupportedType) {
|
||||
|
@ -9,14 +9,6 @@
|
||||
```cpp
|
||||
OPENVINO_OP("<Operation_name>", "opset_name", <Parent_op> /* Not needed if operation is inherited from ov::Op */);
|
||||
```
|
||||
If operation is inherited from Operation with `BWDCMP_RTTI_DECLARATION` please add next declaration to header file:
|
||||
```cpp
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
```
|
||||
* In `*.cpp` if operation is inherited from Operation with `BWDCMP_RTTI_DECLARATION` please add:
|
||||
```cpp
|
||||
BWDCMP_RTTI_DEFINITION(op::vX::<Operation>);
|
||||
```
|
||||
* To support conditional compilation add following for each Operation method in `*.cpp` file:
|
||||
```cpp
|
||||
OV_OP_SCOPE(<operation_version>_<operation_name>_<method_name>);
|
||||
|
@ -1,27 +0,0 @@
|
||||
// Copyright (C) 2018-2022 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "ngraph/deprecated.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
|
||||
// If operation has type_info, use it to add operation to opset
|
||||
template <class T>
|
||||
class HasTypeInfoMember {
|
||||
template <typename U>
|
||||
static std::false_type check(...);
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
template <typename U>
|
||||
static auto check(int) -> decltype(std::declval<U>().type_info, std::true_type{});
|
||||
using type = decltype(check<T>(0));
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
public:
|
||||
static constexpr bool value = type::value;
|
||||
};
|
||||
|
||||
} // namespace ngraph
|
@ -37,7 +37,6 @@ public:
|
||||
AttributeAdapter(ngraph::reduction::Type& value) : EnumAttributeAdapterBase<ngraph::reduction::Type>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<reduction::Type>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
} // namespace ov
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include <mutex>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "ngraph/compatibility.hpp"
|
||||
#include "ngraph/deprecated.hpp"
|
||||
#include "ngraph/ngraph_visibility.hpp"
|
||||
|
||||
@ -37,19 +36,11 @@ public:
|
||||
}
|
||||
|
||||
/// \brief Register a custom factory for DERIVED_TYPE
|
||||
template <typename DERIVED_TYPE,
|
||||
typename std::enable_if<!HasTypeInfoMember<DERIVED_TYPE>::value, bool>::type = true>
|
||||
template <typename DERIVED_TYPE>
|
||||
void register_factory(Factory factory) {
|
||||
register_factory(DERIVED_TYPE::get_type_info_static(), factory);
|
||||
}
|
||||
|
||||
template <typename DERIVED_TYPE, typename std::enable_if<HasTypeInfoMember<DERIVED_TYPE>::value, bool>::type = true>
|
||||
void register_factory(Factory factory) {
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
register_factory(DERIVED_TYPE::type_info, factory);
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
|
||||
/// \brief Register the defualt constructor factory for DERIVED_TYPE
|
||||
template <typename DERIVED_TYPE>
|
||||
void register_factory() {
|
||||
@ -63,19 +54,11 @@ public:
|
||||
}
|
||||
|
||||
/// \brief Check to see if DERIVED_TYPE has a registered factory
|
||||
template <typename DERIVED_TYPE,
|
||||
typename std::enable_if<!HasTypeInfoMember<DERIVED_TYPE>::value, bool>::type = true>
|
||||
template <typename DERIVED_TYPE>
|
||||
bool has_factory() {
|
||||
return has_factory(DERIVED_TYPE::get_type_info_static());
|
||||
}
|
||||
|
||||
template <typename DERIVED_TYPE, typename std::enable_if<HasTypeInfoMember<DERIVED_TYPE>::value, bool>::type = true>
|
||||
bool has_factory() {
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
return has_factory(DERIVED_TYPE::type_info);
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
|
||||
/// \brief Create an instance for type_info
|
||||
BASE_TYPE* create(const typename BASE_TYPE::type_info_t& type_info) const {
|
||||
std::lock_guard<std::mutex> guard(get_registry_mutex());
|
||||
@ -84,19 +67,11 @@ public:
|
||||
}
|
||||
|
||||
/// \brief Create an instance using factory for DERIVED_TYPE
|
||||
template <typename DERIVED_TYPE,
|
||||
typename std::enable_if<!HasTypeInfoMember<DERIVED_TYPE>::value, bool>::type = true>
|
||||
template <typename DERIVED_TYPE>
|
||||
BASE_TYPE* create() const {
|
||||
return create(DERIVED_TYPE::get_type_info_static());
|
||||
}
|
||||
|
||||
template <typename DERIVED_TYPE, typename std::enable_if<HasTypeInfoMember<DERIVED_TYPE>::value, bool>::type = true>
|
||||
BASE_TYPE* create() const {
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
return create(DERIVED_TYPE::type_info);
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
|
||||
protected:
|
||||
FactoryMap m_factory_map;
|
||||
};
|
||||
|
@ -150,8 +150,7 @@ using ov::check_new_args_count;
|
||||
# define _NGRAPH_RTTI_DEFINITION_COMMON(CLASS) \
|
||||
const ::ngraph::Node::type_info_t& CLASS::get_type_info() const { \
|
||||
return get_type_info_static(); \
|
||||
} \
|
||||
const ::ngraph::Node::type_info_t CLASS::type_info = CLASS::get_type_info_static()
|
||||
}
|
||||
#endif
|
||||
|
||||
#define _NGRAPH_RTTI_DEFINITION_WITH_PARENT(CLASS, TYPE_NAME, _VERSION_INDEX, PARENT_CLASS) \
|
||||
|
@ -33,14 +33,7 @@ public:
|
||||
}
|
||||
|
||||
/// \brief Insert OP_TYPE into the opset with the default name and factory
|
||||
template <typename OP_TYPE, typename std::enable_if<ngraph::HasTypeInfoMember<OP_TYPE>::value, bool>::type = true>
|
||||
void insert() {
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
ov::OpSet::insert<OP_TYPE>(OP_TYPE::type_info.name);
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
|
||||
template <typename OP_TYPE, typename std::enable_if<!ngraph::HasTypeInfoMember<OP_TYPE>::value, bool>::type = true>
|
||||
template <typename OP_TYPE>
|
||||
void insert() {
|
||||
ov::OpSet::insert<OP_TYPE>(OP_TYPE::get_type_info_static().name);
|
||||
}
|
||||
|
@ -74,7 +74,6 @@ public:
|
||||
AttributeAdapter(std::shared_ptr<ngraph::runtime::AlignedBuffer>& value);
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<std::shared_ptr<runtime::AlignedBuffer>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
} // namespace ov
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ngraph/deprecated.hpp"
|
||||
#include "ngraph/type/bfloat16.hpp"
|
||||
#include "ngraph/type/float16.hpp"
|
||||
#include "openvino/core/type/element_type.hpp"
|
||||
|
@ -234,7 +234,6 @@ public:
|
||||
AttributeAdapter(float& value) : IndirectScalarValueAccessor<float, double>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<float>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
/// \brief Access a double as a double
|
||||
@ -244,7 +243,6 @@ public:
|
||||
AttributeAdapter(double& value) : DirectValueAccessor<double>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<double>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
/// \brief Access a string as a string
|
||||
@ -254,7 +252,6 @@ public:
|
||||
AttributeAdapter(std::string& value) : DirectValueAccessor<std::string>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<std::string>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
/// \brief Access a bool as a bool
|
||||
@ -264,7 +261,6 @@ public:
|
||||
AttributeAdapter(bool& value) : DirectValueAccessor<bool>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<bool>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
/// \brief Access an int8_t and an int64_t
|
||||
@ -274,7 +270,6 @@ public:
|
||||
AttributeAdapter(int8_t& value) : IndirectScalarValueAccessor<int8_t, int64_t>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<int8_t>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
/// \brief Access an int16_t as an int64_t
|
||||
@ -284,7 +279,6 @@ public:
|
||||
AttributeAdapter(int16_t& value) : IndirectScalarValueAccessor<int16_t, int64_t>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<int16_t>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
/// \brief Access an int32_t as an int64_t
|
||||
@ -294,7 +288,6 @@ public:
|
||||
AttributeAdapter(int32_t& value) : IndirectScalarValueAccessor<int32_t, int64_t>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<int32_t>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
/// \brief Access an int64_t as an int64_t
|
||||
@ -304,7 +297,6 @@ public:
|
||||
AttributeAdapter(int64_t& value) : DirectValueAccessor<int64_t>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<int64_t>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
/// \brief Access a uint8_t as an int64_t
|
||||
@ -314,7 +306,6 @@ public:
|
||||
AttributeAdapter(uint8_t& value) : IndirectScalarValueAccessor<uint8_t, int64_t>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<uint8_t>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
/// \brief Access a uint16_t as an int64_t
|
||||
@ -324,7 +315,6 @@ public:
|
||||
AttributeAdapter(uint16_t& value) : IndirectScalarValueAccessor<uint16_t, int64_t>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<uint16_t>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
/// \brief Access a uint32_t as an int64_t
|
||||
@ -334,7 +324,6 @@ public:
|
||||
AttributeAdapter(uint32_t& value) : IndirectScalarValueAccessor<uint32_t, int64_t>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<uint32_t>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
/// \brief Access a uint64_t as an int64_t
|
||||
@ -344,7 +333,6 @@ public:
|
||||
AttributeAdapter(uint64_t& value) : IndirectScalarValueAccessor<uint64_t, int64_t>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<uint64_t>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
#ifdef __APPLE__
|
||||
@ -355,7 +343,6 @@ public:
|
||||
AttributeAdapter(size_t& value) : IndirectScalarValueAccessor<size_t, int64_t>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<size_t>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
template <>
|
||||
@ -366,7 +353,6 @@ public:
|
||||
: IndirectVectorValueAccessor<std::vector<size_t>, std::vector<int64_t>>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<std::vector<size_t>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -380,7 +366,6 @@ public:
|
||||
AttributeAdapter(std::vector<int8_t>& value) : DirectValueAccessor<std::vector<int8_t>>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<std::vector<int8_t>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
/// \brief Access a vector<int16_t>
|
||||
@ -390,7 +375,6 @@ public:
|
||||
AttributeAdapter(std::vector<int16_t>& value) : DirectValueAccessor<std::vector<int16_t>>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<std::vector<int16_t>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
/// \brief Access a vector<int32_t>
|
||||
@ -400,7 +384,6 @@ public:
|
||||
AttributeAdapter(std::vector<int32_t>& value) : DirectValueAccessor<std::vector<int32_t>>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<std::vector<int32_t>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
/// \brief Access a vector<int64_t>
|
||||
@ -410,7 +393,6 @@ public:
|
||||
AttributeAdapter(std::vector<int64_t>& value) : DirectValueAccessor<std::vector<int64_t>>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<std::vector<int64_t>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
/// \brief Access a vector<uint8_t>
|
||||
@ -420,7 +402,6 @@ public:
|
||||
AttributeAdapter(std::vector<uint8_t>& value) : DirectValueAccessor<std::vector<uint8_t>>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<std::vector<uint8_t>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
/// \brief Access a vector<uint16_t>
|
||||
@ -430,7 +411,6 @@ public:
|
||||
AttributeAdapter(std::vector<uint16_t>& value) : DirectValueAccessor<std::vector<uint16_t>>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<std::vector<uint16_t>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
/// \brief Access a vector<uint32_t>
|
||||
@ -440,7 +420,6 @@ public:
|
||||
AttributeAdapter(std::vector<uint32_t>& value) : DirectValueAccessor<std::vector<uint32_t>>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<std::vector<uint32_t>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
/// \brief Access a vector<uint64_t>
|
||||
@ -450,7 +429,6 @@ public:
|
||||
AttributeAdapter(std::vector<uint64_t>& value) : DirectValueAccessor<std::vector<uint64_t>>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<std::vector<uint64_t>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
/// \brief Access a vector<float>
|
||||
@ -460,7 +438,6 @@ public:
|
||||
AttributeAdapter(std::vector<float>& value) : DirectValueAccessor<std::vector<float>>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<std::vector<float>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
/// \brief Access a vector<double>
|
||||
@ -470,7 +447,6 @@ public:
|
||||
AttributeAdapter(std::vector<double>& value) : DirectValueAccessor<std::vector<double>>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<std::vector<double>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
/// \brief Access a vector<string>
|
||||
@ -480,7 +456,6 @@ public:
|
||||
AttributeAdapter(std::vector<std::string>& value) : DirectValueAccessor<std::vector<std::string>>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<std::vector<std::string>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
template <>
|
||||
|
@ -48,7 +48,6 @@ public:
|
||||
return m_ref;
|
||||
}
|
||||
OPENVINO_RTTI("AttributeAdapter<AxisSet>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
protected:
|
||||
ov::AxisSet& m_ref;
|
||||
|
@ -44,7 +44,6 @@ class OPENVINO_API AttributeAdapter<AxisVector> : public IndirectVectorValueAcce
|
||||
public:
|
||||
AttributeAdapter(AxisVector& value) : IndirectVectorValueAccessor<AxisVector, std::vector<int64_t>>(value) {}
|
||||
OPENVINO_RTTI("AttributeAdapter<AxisVector>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
} // namespace ov
|
||||
|
@ -45,6 +45,5 @@ public:
|
||||
AttributeAdapter(Coordinate& value) : IndirectVectorValueAccessor<Coordinate, std::vector<int64_t>>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<Coordinate>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
} // namespace ov
|
||||
|
@ -49,7 +49,6 @@ public:
|
||||
: IndirectVectorValueAccessor<CoordinateDiff, std::vector<int64_t>>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<CoordinateDiff>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
} // namespace ov
|
||||
|
@ -54,8 +54,6 @@ public:
|
||||
const ::ov::DiscreteTypeInfo& get_type_info() const {
|
||||
return get_type_info_static();
|
||||
}
|
||||
OPENVINO_DEPRECATED("This member was deprecated. Please use ::get_type_info_static() instead.")
|
||||
static const ov::DiscreteTypeInfo type_info;
|
||||
|
||||
Model(const ov::NodeVector& results, const ov::ParameterVector& parameters, const std::string& name = "");
|
||||
|
||||
@ -578,7 +576,6 @@ public:
|
||||
AttributeAdapter(std::shared_ptr<ov::Model>& value) : DirectValueAccessor<std::shared_ptr<ov::Model>>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<std::shared_ptr<Model>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
/// \brief Helper method to get associated batch size for a Model
|
||||
|
@ -603,7 +603,6 @@ public:
|
||||
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
OPENVINO_RTTI("AttributeAdapter<std::shared_ptr<Node>>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
protected:
|
||||
std::shared_ptr<ov::Node>& m_ref;
|
||||
@ -617,7 +616,6 @@ public:
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<NodeVector>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
protected:
|
||||
ov::NodeVector& m_ref;
|
||||
|
@ -430,6 +430,5 @@ public:
|
||||
AttributeAdapter(ov::PartialShape& value) : DirectValueAccessor<ov::PartialShape>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<PartialShape>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
} // namespace ov
|
||||
|
@ -100,15 +100,5 @@
|
||||
_OPENVINO_RTTI_WITH_TYPE)(__VA_ARGS__))
|
||||
|
||||
/// Note: Please don't use this macros for new operations
|
||||
#ifdef OPENVINO_STATIC_LIBRARY
|
||||
#define BWDCMP_RTTI_DECLARATION
|
||||
#define BWDCMP_RTTI_DEFINITION(CLASS)
|
||||
#else
|
||||
# define BWDCMP_RTTI_DECLARATION \
|
||||
OPENVINO_DEPRECATED("This member was deprecated. Please use ::get_type_info_static() instead.") \
|
||||
static const ov::DiscreteTypeInfo type_info
|
||||
# define BWDCMP_RTTI_DEFINITION(CLASS) \
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START \
|
||||
const ov::DiscreteTypeInfo CLASS::type_info = CLASS::get_type_info_static(); \
|
||||
OPENVINO_SUPPRESS_DEPRECATED_END
|
||||
#endif
|
||||
|
@ -113,7 +113,6 @@ class OPENVINO_API AttributeAdapter<ov::Shape> : public IndirectVectorValueAcces
|
||||
{
|
||||
public:
|
||||
OPENVINO_RTTI("AttributeAdapter<Shape>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
AttributeAdapter(ov::Shape& value) : IndirectVectorValueAccessor<ov::Shape, std::vector<int64_t>>(value) {}
|
||||
};
|
||||
|
@ -42,7 +42,6 @@ class OPENVINO_API AttributeAdapter<Strides> : public IndirectVectorValueAccesso
|
||||
public:
|
||||
AttributeAdapter(Strides& value) : IndirectVectorValueAccessor<Strides, std::vector<int64_t>>(value) {}
|
||||
OPENVINO_RTTI("AttributeAdapter<Strides>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
} // namespace ov
|
||||
|
@ -13,8 +13,8 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "ngraph/compatibility.hpp"
|
||||
#include "openvino/core/core_visibility.hpp"
|
||||
#include "openvino/core/deprecated.hpp"
|
||||
|
||||
namespace ov {
|
||||
|
||||
@ -96,26 +96,14 @@ std::ostream& operator<<(std::ostream& s, const DiscreteTypeInfo& info);
|
||||
|
||||
/// \brief Tests if value is a pointer/shared_ptr that can be statically cast to a
|
||||
/// Type*/shared_ptr<Type>
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START
|
||||
template <typename Type, typename Value>
|
||||
typename std::enable_if<
|
||||
ngraph::HasTypeInfoMember<Type>::value &&
|
||||
std::is_convertible<decltype(std::declval<Value>()->get_type_info().is_castable(Type::type_info)), bool>::value,
|
||||
bool>::type
|
||||
is_type(Value value) {
|
||||
return value->get_type_info().is_castable(Type::type_info);
|
||||
}
|
||||
|
||||
template <typename Type, typename Value>
|
||||
typename std::enable_if<
|
||||
!ngraph::HasTypeInfoMember<Type>::value &&
|
||||
std::is_convertible<decltype(std::declval<Value>()->get_type_info().is_castable(Type::get_type_info_static())),
|
||||
bool>::value,
|
||||
bool>::type
|
||||
is_type(Value value) {
|
||||
return value->get_type_info().is_castable(Type::get_type_info_static());
|
||||
}
|
||||
OPENVINO_SUPPRESS_DEPRECATED_END
|
||||
|
||||
/// Casts a Value* to a Type* if it is of type Type, nullptr otherwise
|
||||
template <typename Type, typename Value>
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
#include "openvino/core/attribute_adapter.hpp"
|
||||
#include "openvino/core/core_visibility.hpp"
|
||||
#include "openvino/core/deprecated.hpp"
|
||||
#include "openvino/core/except.hpp"
|
||||
#include "openvino/core/rtti.hpp"
|
||||
#include "openvino/core/type/bfloat16.hpp"
|
||||
@ -224,14 +223,12 @@ public:
|
||||
AttributeAdapter(ov::element::Type_t& value) : EnumAttributeAdapterBase<ov::element::Type_t>(value) {}
|
||||
|
||||
OPENVINO_RTTI("AttributeAdapter<ov::element::Type_t>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
};
|
||||
|
||||
template <>
|
||||
class OPENVINO_API AttributeAdapter<ov::element::Type> : public ValueAccessor<std::string> {
|
||||
public:
|
||||
OPENVINO_RTTI("AttributeAdapter<ov::element::Type>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
AttributeAdapter(ov::element::Type& value) : m_ref(value) {}
|
||||
|
||||
const std::string& get() override;
|
||||
@ -249,7 +246,6 @@ template <>
|
||||
class OPENVINO_API AttributeAdapter<ov::element::TypeVector> : public DirectValueAccessor<ov::element::TypeVector> {
|
||||
public:
|
||||
OPENVINO_RTTI("AttributeAdapter<ov::element::TypeVector>");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
AttributeAdapter(ov::element::TypeVector& value) : DirectValueAccessor<ov::element::TypeVector>(value) {}
|
||||
};
|
||||
|
||||
|
@ -17,7 +17,6 @@ namespace v0 {
|
||||
class OPENVINO_API Abs : public util::UnaryElementwiseArithmetic {
|
||||
public:
|
||||
OPENVINO_OP("Abs", "opset1", util::UnaryElementwiseArithmetic);
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
/// \brief Constructs an absolute value operation.
|
||||
Abs() = default;
|
||||
bool visit_attributes(AttributeVisitor&) override {
|
||||
|
@ -17,7 +17,6 @@ namespace v0 {
|
||||
class OPENVINO_API Acos : public util::UnaryElementwiseArithmetic {
|
||||
public:
|
||||
OPENVINO_OP("Acos", "opset1", util::UnaryElementwiseArithmetic);
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
/// \brief Constructs an arccos operation.
|
||||
Acos() = default;
|
||||
/// \brief Constructs an arccos operation.
|
||||
|
@ -17,7 +17,6 @@ namespace v3 {
|
||||
class OPENVINO_API Acosh : public util::UnaryElementwiseArithmetic {
|
||||
public:
|
||||
OPENVINO_OP("Acosh", "opset4", util::UnaryElementwiseArithmetic, 3);
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
/// \brief Constructs an Acosh operation.
|
||||
Acosh() = default;
|
||||
|
@ -16,7 +16,6 @@ namespace v8 {
|
||||
class OPENVINO_API AdaptiveAvgPool : public Op {
|
||||
public:
|
||||
OPENVINO_OP("AdaptiveAvgPool", "opset8");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
AdaptiveAvgPool() = default;
|
||||
|
||||
|
@ -16,7 +16,6 @@ namespace v8 {
|
||||
class OPENVINO_API AdaptiveMaxPool : public Op {
|
||||
public:
|
||||
OPENVINO_OP("AdaptiveMaxPool", "opset8");
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
AdaptiveMaxPool() = default;
|
||||
|
||||
|
@ -17,7 +17,6 @@ namespace v1 {
|
||||
class OPENVINO_API Add : public util::BinaryElementwiseArithmetic {
|
||||
public:
|
||||
OPENVINO_OP("Add", "opset1", util::BinaryElementwiseArithmetic, 1);
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
/// \brief Constructs an uninitialized addition operation
|
||||
Add() : util::BinaryElementwiseArithmetic(AutoBroadcastType::NUMPY) {}
|
||||
|
@ -17,7 +17,6 @@ namespace v0 {
|
||||
class OPENVINO_API Asin : public util::UnaryElementwiseArithmetic {
|
||||
public:
|
||||
OPENVINO_OP("Asin", "opset1", util::UnaryElementwiseArithmetic);
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
/// \brief Constructs an arcsin operation.
|
||||
Asin() = default;
|
||||
/// \brief Constructs an arcsin operation.
|
||||
|
@ -16,7 +16,6 @@ namespace v3 {
|
||||
class OPENVINO_API Asinh : public util::UnaryElementwiseArithmetic {
|
||||
public:
|
||||
OPENVINO_OP("Asinh", "opset4", util::UnaryElementwiseArithmetic, 3);
|
||||
BWDCMP_RTTI_DECLARATION;
|
||||
|
||||
/// \brief Constructs an Asinh operation.
|
||||
Asinh() = default;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user