Transformation component transition to OV namespace (phase 1) (#13469)
* Move GeluFusion into ov namespace It required to move utils as well. * Move AddFakeQuantizeFusion into ov namespace * Move AlignEltwiseInputRanks into ov namespace * Move BatchToSpaceFusion into ov namespace * Move BinarizeWeights into ov namespace * Move BroadcastElementwiseFusion into ov namespace * Move ClampFusion into ov namespace * Move Concats and Eliminations into ov namespace * Move many passes and such into ov namespace * Move many passes and such into ov namespace ngraph_ops op_conversions * Move control_flow into ov namespace * Apply style * Move smart_reshape into ov namespace * Move opset_conversions into ov namespace * Move low_precision into ov namespace * Apply style * Move fused_names into ov namespace * Add missing aliases * Move few passes into ov namespace ConvertPrecision FixRtInfo InitNodeInfo * Move CommonOptimizations into ov namespace * Fix convert_precision conflicting namespaces * Apply code style * ov-nize Type Relaxed definitions * Remove useless aliases bulkly added by script * Revert opsets * Address review comments * Remove NGRAPH_RTTI * Clean up remains of yet another implicit inclusion Co-authored-by: Andrei Kochin <andrei.kochin@intel.com> Co-authored-by: Ivan Tikhonov <ivan.tikhonov@intel.com>
This commit is contained in:
parent
4dd75a1b8b
commit
5eef0298d9
@ -7,6 +7,7 @@
|
||||
|
||||
#include <ngraph/pattern/op/wrap_type.hpp>
|
||||
#include "low_precision/network_helper.hpp"
|
||||
#include <ngraph/opsets/opset3.hpp>
|
||||
#include <ngraph/opsets/opset6.hpp>
|
||||
#include <ngraph/pattern/op/or.hpp>
|
||||
#include <openvino/op/util/assign_base.hpp>
|
||||
|
@ -9,6 +9,8 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <ngraph/opsets/opset1.hpp>
|
||||
#include <ngraph/opsets/opset4.hpp>
|
||||
#include <ngraph/pattern/op/wrap_type.hpp>
|
||||
#include <ngraph/pattern/op/or.hpp>
|
||||
#include "low_precision/network_helper.hpp"
|
||||
|
@ -10,8 +10,8 @@
|
||||
#include <vector>
|
||||
|
||||
#include <ngraph/opsets/opset1.hpp>
|
||||
#include <ngraph/opsets/opset4.hpp>
|
||||
#include <ngraph/opsets/opset6.hpp>
|
||||
#include <ngraph/opsets/opset5.hpp>
|
||||
#include <ngraph/pattern/op/wrap_type.hpp>
|
||||
#include <ngraph/pattern/op/or.hpp>
|
||||
#include "low_precision/network_helper.hpp"
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "low_precision/rt_info/precision_preserved_attribute.hpp"
|
||||
#include "low_precision/rt_info/intervals_alignment_attribute.hpp"
|
||||
#include "low_precision/rt_info/quantization_alignment_attribute.hpp"
|
||||
#include "ngraph/opsets/opset3.hpp"
|
||||
#include "ngraph/opsets/opset6.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
|
@ -8,10 +8,10 @@
|
||||
#include <string>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include "ngraph/op/generate_proposals.hpp"
|
||||
#include "ngraph/op/op.hpp"
|
||||
#include "openvino/op/generate_proposals.hpp"
|
||||
#include "openvino/op/op.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace op {
|
||||
namespace internal {
|
||||
|
||||
@ -33,9 +33,17 @@ public:
|
||||
|
||||
void validate_and_infer_types() override;
|
||||
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const ngraph::OutputVector& new_args) const override;
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const ov::OutputVector& new_args) const override;
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
} // namespace op
|
||||
} // namespace ov
|
||||
|
||||
namespace ngraph {
|
||||
namespace op {
|
||||
namespace internal {
|
||||
using ov::op::internal::GenerateProposalsIEInternal;
|
||||
} // namespace internal
|
||||
} // namespace op
|
||||
} // namespace ngraph
|
||||
|
@ -6,10 +6,10 @@
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include "ngraph/op/util/multiclass_nms_base.hpp"
|
||||
#include "ngraph/opsets/opset9.hpp"
|
||||
#include "openvino/op/util/multiclass_nms_base.hpp"
|
||||
#include "openvino/opsets/opset9.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace op {
|
||||
namespace internal {
|
||||
|
||||
@ -22,12 +22,12 @@ public:
|
||||
|
||||
MulticlassNmsIEInternal(const Output<Node>& boxes,
|
||||
const Output<Node>& scores,
|
||||
const ngraph::op::util::MulticlassNmsBase::Attributes& attrs);
|
||||
const op::util::MulticlassNmsBase::Attributes& attrs);
|
||||
|
||||
MulticlassNmsIEInternal(const Output<Node>& boxes,
|
||||
const Output<Node>& scores,
|
||||
const Output<Node>& roisnum,
|
||||
const ngraph::op::util::MulticlassNmsBase::Attributes& attrs);
|
||||
const op::util::MulticlassNmsBase::Attributes& attrs);
|
||||
|
||||
void validate_and_infer_types() override;
|
||||
|
||||
@ -35,4 +35,12 @@ public:
|
||||
};
|
||||
} // namespace internal
|
||||
} // namespace op
|
||||
} // namespace ov
|
||||
|
||||
namespace ngraph {
|
||||
namespace op {
|
||||
namespace internal {
|
||||
using ov::op::internal::MulticlassNmsIEInternal;
|
||||
} // namespace internal
|
||||
} // namespace op
|
||||
} // namespace ngraph
|
||||
|
@ -8,10 +8,10 @@
|
||||
#include <string>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include "ngraph/coordinate_diff.hpp"
|
||||
#include "ngraph/op/op.hpp"
|
||||
#include "openvino/core/coordinate_diff.hpp"
|
||||
#include "openvino/op/op.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace op {
|
||||
namespace internal {
|
||||
|
||||
@ -29,8 +29,8 @@ public:
|
||||
const Output<Node>& score_threshold,
|
||||
int center_point_box,
|
||||
bool sort_result_descending,
|
||||
const ngraph::element::Type& output_type = ngraph::element::i64,
|
||||
const ngraph::element::Type& score_output_type = ngraph::element::f32);
|
||||
const element::Type& output_type = element::i64,
|
||||
const element::Type& score_output_type = element::f32);
|
||||
|
||||
NonMaxSuppressionIEInternal(const Output<Node>& boxes,
|
||||
const Output<Node>& scores,
|
||||
@ -40,8 +40,8 @@ public:
|
||||
const Output<Node>& soft_nms_sigma,
|
||||
int center_point_box,
|
||||
bool sort_result_descending,
|
||||
const ngraph::element::Type& output_type = ngraph::element::i64,
|
||||
const ngraph::element::Type& score_output_type = ngraph::element::f32);
|
||||
const element::Type& output_type = element::i64,
|
||||
const element::Type& score_output_type = element::f32);
|
||||
|
||||
void validate_and_infer_types() override;
|
||||
|
||||
@ -58,6 +58,14 @@ private:
|
||||
int64_t max_boxes_output_from_input() const;
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
} // namespace op
|
||||
} // namespace ov
|
||||
|
||||
namespace ngraph {
|
||||
namespace op {
|
||||
namespace internal {
|
||||
using ov::op::internal::NonMaxSuppressionIEInternal;
|
||||
} // namespace internal
|
||||
} // namespace op
|
||||
} // namespace ngraph
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
#include "ngraph/op/op.hpp"
|
||||
#include "openvino/op/op.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace op {
|
||||
@ -22,14 +22,21 @@ class MatrixNms;
|
||||
} // namespace op
|
||||
} // namespace ov
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace op {
|
||||
namespace internal {
|
||||
|
||||
template <typename BaseNmsOp>
|
||||
class NmsStaticShapeIE : public BaseNmsOp {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START
|
||||
// TODO: it should be std::string("NmsStaticShapeIE_") + BaseNmsOp::get_type_info_static().name,
|
||||
// but currently it does not pass conversion to Legacy Opset correctly
|
||||
OPENVINO_RTTI(BaseNmsOp::get_type_info_static().name,
|
||||
"ie_internal_opset",
|
||||
BaseNmsOp,
|
||||
BaseNmsOp::get_type_info_static().version);
|
||||
OPENVINO_SUPPRESS_DEPRECATED_END
|
||||
|
||||
NmsStaticShapeIE() = default;
|
||||
|
||||
@ -106,38 +113,14 @@ void NmsStaticShapeIE<BaseNmsOp>::validate_and_infer_types() {
|
||||
}
|
||||
}
|
||||
|
||||
template <typename BaseNmsOp>
|
||||
const ::ngraph::Node::type_info_t& NmsStaticShapeIE<BaseNmsOp>::get_type_info() const {
|
||||
return get_type_info_static();
|
||||
}
|
||||
|
||||
template <typename BaseNmsOp>
|
||||
const ::ngraph::Node::type_info_t& NmsStaticShapeIE<BaseNmsOp>::get_type_info_static() {
|
||||
auto BaseNmsOpTypeInfoPtr = &BaseNmsOp::get_type_info_static();
|
||||
|
||||
// TODO: it should be static const std::string name = std::string("NmsStaticShapeIE_") + BaseNmsOpTypeInfoPtr->name;
|
||||
// but currently it will not pass conversion ot Legacy Opset correctly
|
||||
static const std::string name = BaseNmsOpTypeInfoPtr->name;
|
||||
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START
|
||||
static const ::ngraph::Node::type_info_t type_info_static{name.c_str(),
|
||||
BaseNmsOpTypeInfoPtr->version,
|
||||
"ie_internal_opset",
|
||||
BaseNmsOpTypeInfoPtr};
|
||||
OPENVINO_SUPPRESS_DEPRECATED_END
|
||||
return type_info_static;
|
||||
}
|
||||
|
||||
#ifndef OPENVINO_STATIC_LIBRARY
|
||||
template <typename BaseNmsOp>
|
||||
const ::ngraph::Node::type_info_t NmsStaticShapeIE<BaseNmsOp>::type_info =
|
||||
NmsStaticShapeIE<BaseNmsOp>::get_type_info_static();
|
||||
#endif
|
||||
|
||||
#ifdef __clang__
|
||||
extern template class TRANSFORMATIONS_API op::internal::NmsStaticShapeIE<ov::op::v8::MatrixNms>;
|
||||
#endif // __clang__
|
||||
} // namespace internal
|
||||
} // namespace op
|
||||
} // namespace ov
|
||||
|
||||
namespace ngraph {
|
||||
namespace op {
|
||||
namespace internal {
|
||||
using ov::op::internal::NmsStaticShapeIE;
|
||||
} // namespace internal
|
||||
} // namespace op
|
||||
} // namespace ngraph
|
||||
|
@ -7,19 +7,16 @@
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <ngraph/op/convert.hpp>
|
||||
#include <openvino/op/convert.hpp>
|
||||
#include <string>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
#include "ngraph/op/op.hpp"
|
||||
#include "ngraph/variant.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace op {
|
||||
|
||||
/// A base class for templated TypeRelaxed that maintains overridden input types and output types for an operation.
|
||||
class NGRAPH_API TypeRelaxedBase {
|
||||
class OPENVINO_API TypeRelaxedBase {
|
||||
public:
|
||||
virtual ~TypeRelaxedBase();
|
||||
|
||||
@ -180,7 +177,7 @@ public:
|
||||
};
|
||||
|
||||
// TODO: remove once FusedOp is removed
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START
|
||||
|
||||
/// Relaxes tensor element type requirements for BaseOp inputs and outputs
|
||||
/// This class template should be used with Node descendant class. Defines a new operation by extending the
|
||||
@ -192,7 +189,10 @@ NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
template <typename BaseOp>
|
||||
class TypeRelaxed : public BaseOp, public TypeRelaxedBase {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
OPENVINO_OP(BaseOp::get_type_info_static().name,
|
||||
BaseOp::get_type_info_static().version_id,
|
||||
BaseOp,
|
||||
BaseOp::get_type_info_static().version);
|
||||
|
||||
using BaseOp::BaseOp;
|
||||
|
||||
@ -242,7 +242,7 @@ private:
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START
|
||||
template <typename BaseOp>
|
||||
bool TypeRelaxed<BaseOp>::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const {
|
||||
std::shared_ptr<ngraph::op::v0::Convert> convert;
|
||||
std::shared_ptr<ov::op::v0::Convert> convert;
|
||||
HostTensorVector casted_inputs(BaseOp::get_input_size());
|
||||
for (size_t i = 0; i < BaseOp::get_input_size(); ++i) {
|
||||
const auto expected_input_type = get_origin_input_type(i);
|
||||
@ -251,7 +251,7 @@ bool TypeRelaxed<BaseOp>::evaluate(const HostTensorVector& outputs, const HostTe
|
||||
casted_inputs[i] = inputs[i];
|
||||
} else {
|
||||
if (convert == nullptr) {
|
||||
convert = std::make_shared<ngraph::op::v0::Convert>();
|
||||
convert = std::make_shared<ov::op::v0::Convert>();
|
||||
}
|
||||
|
||||
convert->set_destination_type(expected_input_type);
|
||||
@ -283,7 +283,7 @@ bool TypeRelaxed<BaseOp>::evaluate(const HostTensorVector& outputs, const HostTe
|
||||
if (expected_output_type != element::undefined &&
|
||||
original_outputs[i]->get_element_type() != expected_output_type) {
|
||||
if (convert == nullptr) {
|
||||
convert = std::make_shared<ngraph::op::v0::Convert>();
|
||||
convert = std::make_shared<ov::op::v0::Convert>();
|
||||
}
|
||||
|
||||
convert->set_destination_type(expected_output_type);
|
||||
@ -305,9 +305,9 @@ void TypeRelaxed<BaseOp>::validate_and_infer_types() {
|
||||
|
||||
remember_input_data_types(*this, old_input_types);
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START
|
||||
BaseOp::validate_and_infer_types();
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
OPENVINO_SUPPRESS_DEPRECATED_END
|
||||
|
||||
restore_input_data_types(*this, old_input_types);
|
||||
}
|
||||
@ -333,27 +333,15 @@ bool TypeRelaxed<BaseOp>::visit_attributes(AttributeVisitor& visitor) {
|
||||
return true;
|
||||
}
|
||||
|
||||
template <typename BaseOp>
|
||||
const ::ngraph::Node::type_info_t& TypeRelaxed<BaseOp>::get_type_info() const {
|
||||
return get_type_info_static();
|
||||
}
|
||||
|
||||
template <typename BaseOp>
|
||||
const ::ngraph::Node::type_info_t& TypeRelaxed<BaseOp>::get_type_info_static() {
|
||||
auto baseOpTypeInfoPtr = &BaseOp::get_type_info_static();
|
||||
static const ::ngraph::Node::type_info_t type_info_static{baseOpTypeInfoPtr->name,
|
||||
baseOpTypeInfoPtr->version,
|
||||
baseOpTypeInfoPtr->version_id,
|
||||
baseOpTypeInfoPtr};
|
||||
return type_info_static;
|
||||
}
|
||||
|
||||
#ifndef OPENVINO_STATIC_LIBRARY
|
||||
template <typename BaseOp>
|
||||
const ::ngraph::Node::type_info_t TypeRelaxed<BaseOp>::type_info = TypeRelaxed<BaseOp>::get_type_info_static();
|
||||
#endif
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
OPENVINO_SUPPRESS_DEPRECATED_END
|
||||
|
||||
} // namespace op
|
||||
} // namespace ov
|
||||
|
||||
namespace ngraph {
|
||||
namespace op {
|
||||
using ov::op::TemporaryReplaceOutputType;
|
||||
using ov::op::TypeRelaxed;
|
||||
using ov::op::TypeRelaxedBase;
|
||||
} // namespace op
|
||||
} // namespace ngraph
|
||||
|
@ -5,17 +5,17 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API AddFakeQuantizeFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -24,8 +24,14 @@ class TRANSFORMATIONS_API AddFakeQuantizeFusion;
|
||||
* Restrictions:
|
||||
* - second input to Add is a Constant
|
||||
*/
|
||||
class ngraph::pass::AddFakeQuantizeFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::AddFakeQuantizeFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("AddFakeQuantizeFusion", "0");
|
||||
AddFakeQuantizeFusion();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::AddFakeQuantizeFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
/**
|
||||
@ -12,7 +12,7 @@
|
||||
* @brief transformation aligns elementwise constant inputs ranks with its output rank
|
||||
*/
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API AlignEltwiseInputRanks : public MatcherPass {
|
||||
@ -21,5 +21,11 @@ public:
|
||||
AlignEltwiseInputRanks();
|
||||
};
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ov
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::AlignEltwiseInputRanks;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,17 +5,17 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API BatchToSpaceFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -28,8 +28,14 @@ class TRANSFORMATIONS_API BatchToSpaceFusion;
|
||||
* - DepthToSpaceMode must be BLOCKS_FIRST
|
||||
*/
|
||||
|
||||
class ngraph::pass::BatchToSpaceFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::BatchToSpaceFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("BatchToSpaceFusion", "0");
|
||||
BatchToSpaceFusion();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::BatchToSpaceFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -4,16 +4,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API BinarizeWeights;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
// clang-format off
|
||||
/**
|
||||
@ -74,8 +74,14 @@ class TRANSFORMATIONS_API BinarizeWeights;
|
||||
*/
|
||||
// clang-format on
|
||||
|
||||
class ngraph::pass::BinarizeWeights : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::BinarizeWeights : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("BinarizeWeights", "0");
|
||||
BinarizeWeights();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::BinarizeWeights;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -4,19 +4,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ngraph/ngraph.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include "ngraph/pattern/matcher.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API BroadcastElementwiseFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -24,8 +21,14 @@ class TRANSFORMATIONS_API BroadcastElementwiseFusion;
|
||||
* are equal neighboring input shape of ElementWise.
|
||||
*/
|
||||
|
||||
class ngraph::pass::BroadcastElementwiseFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::BroadcastElementwiseFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("BroadcastElementwiseFusion", "0");
|
||||
BroadcastElementwiseFusion();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::BroadcastElementwiseFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,17 +5,17 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ClampFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -26,8 +26,14 @@ class TRANSFORMATIONS_API ClampFusion;
|
||||
* - one of the parameters to Minimum is a scalar constant
|
||||
*/
|
||||
|
||||
class ngraph::pass::ClampFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ClampFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ClampFusion", "0");
|
||||
ClampFusion();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ClampFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -9,16 +9,22 @@
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API CommonOptimizations;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
class ngraph::pass::CommonOptimizations : public ngraph::pass::FunctionPass {
|
||||
class ov::pass::CommonOptimizations : public ngraph::pass::FunctionPass {
|
||||
public:
|
||||
OPENVINO_RTTI("CommonOptimizations", "0");
|
||||
bool run_on_model(const std::shared_ptr<ngraph::Function>& f) override;
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::CommonOptimizations;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -4,10 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ReplaceConcatReduceByMinOrMax;
|
||||
@ -15,14 +15,14 @@ class TRANSFORMATIONS_API PullSqueezeThroughEltwise;
|
||||
class TRANSFORMATIONS_API ConcatReduceFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief ReplaceConcatReduceByMinOrMax transformation replaces Concat with 2 inputs and ReduceMin/Max
|
||||
* by a single Minimum/Maximum with 2 inputs and inserts squeeze in case when Reduce has keep_dims = false.
|
||||
*/
|
||||
class ngraph::pass::ReplaceConcatReduceByMinOrMax : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ReplaceConcatReduceByMinOrMax : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ReplaceConcatReduceByMinOrMax", "0");
|
||||
ReplaceConcatReduceByMinOrMax();
|
||||
@ -32,7 +32,7 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief PullSqueezeThroughEltwise transformation propagates Squeeze up through binary elementwise operations:
|
||||
*/
|
||||
class ngraph::pass::PullSqueezeThroughEltwise : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::PullSqueezeThroughEltwise : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("PullSqueezeThroughEltwise", "0");
|
||||
PullSqueezeThroughEltwise();
|
||||
@ -74,8 +74,16 @@ public:
|
||||
* by a single Minimum/Maximum with 2 inputs and tries to eliminate Squeeze/Unsqueeze layers before and after Min/Max.
|
||||
*/
|
||||
|
||||
class ngraph::pass::ConcatReduceFusion : public ngraph::pass::GraphRewrite {
|
||||
class ov::pass::ConcatReduceFusion : public ov::pass::GraphRewrite {
|
||||
public:
|
||||
OPENVINO_RTTI("ConcatReduceFusion", "0");
|
||||
ConcatReduceFusion();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ConcatReduceFusion;
|
||||
using ov::pass::PullSqueezeThroughEltwise;
|
||||
using ov::pass::ReplaceConcatReduceByMinOrMax;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -6,10 +6,10 @@
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ConvolutionMultiplyFusion;
|
||||
@ -18,28 +18,37 @@ class TRANSFORMATIONS_API ConvolutionBackpropDataMultiplyFusion;
|
||||
class TRANSFORMATIONS_API GroupConvolutionBackpropDataMultiplyFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
class ngraph::pass::ConvolutionMultiplyFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ConvolutionMultiplyFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ConvolutionMultiplyFusion", "0");
|
||||
ConvolutionMultiplyFusion();
|
||||
};
|
||||
|
||||
class ngraph::pass::GroupConvolutionMultiplyFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::GroupConvolutionMultiplyFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("GroupConvolutionMultiplyFusion", "0");
|
||||
GroupConvolutionMultiplyFusion();
|
||||
};
|
||||
|
||||
class ngraph::pass::ConvolutionBackpropDataMultiplyFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ConvolutionBackpropDataMultiplyFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ConvolutionBackpropDataMultiplyFusion", "0");
|
||||
ConvolutionBackpropDataMultiplyFusion();
|
||||
};
|
||||
|
||||
class ngraph::pass::GroupConvolutionBackpropDataMultiplyFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::GroupConvolutionBackpropDataMultiplyFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("GroupConvolutionBackpropDataMultiplyFusion", "0");
|
||||
GroupConvolutionBackpropDataMultiplyFusion();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ConvolutionBackpropDataMultiplyFusion;
|
||||
using ov::pass::ConvolutionMultiplyFusion;
|
||||
using ov::pass::GroupConvolutionBackpropDataMultiplyFusion;
|
||||
using ov::pass::GroupConvolutionMultiplyFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -4,16 +4,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ConvToBinaryConv;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -70,8 +70,14 @@ class TRANSFORMATIONS_API ConvToBinaryConv;
|
||||
* |
|
||||
* v
|
||||
*/
|
||||
class ngraph::pass::ConvToBinaryConv : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ConvToBinaryConv : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ConvToBinaryConv", "0");
|
||||
ConvToBinaryConv();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ConvToBinaryConv;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -4,16 +4,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ConvertNmsGatherPathToUnsigned;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -25,8 +25,14 @@ class TRANSFORMATIONS_API ConvertNmsGatherPathToUnsigned;
|
||||
* Gather-8 will accept UINT32_MAX which is always outside of the bounds
|
||||
* and corresponding output for such indices in gather always will be filled with zeros.
|
||||
*/
|
||||
class ngraph::pass::ConvertNmsGatherPathToUnsigned : public ngraph::pass::GraphRewrite {
|
||||
class ov::pass::ConvertNmsGatherPathToUnsigned : public ov::pass::GraphRewrite {
|
||||
public:
|
||||
OPENVINO_RTTI("ConvertNmsGatherPathToUnsigned", "0");
|
||||
ConvertNmsGatherPathToUnsigned();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ConvertNmsGatherPathToUnsigned;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,17 +5,17 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ConvertQuantizeDequantize;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -28,8 +28,14 @@ class TRANSFORMATIONS_API ConvertQuantizeDequantize;
|
||||
* - 'zero_point' and 'scale' must be broadcastable to FakeQuantize's output
|
||||
*/
|
||||
|
||||
class ngraph::pass::ConvertQuantizeDequantize : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ConvertQuantizeDequantize : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ConvertQuantizeDequantize", "0");
|
||||
ConvertQuantizeDequantize();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ConvertQuantizeDequantize;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,17 +5,17 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API DepthToSpaceFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -33,14 +33,20 @@ class TRANSFORMATIONS_API DepthToSpaceFusion;
|
||||
* return std::dynamic_pointer_cast<const ngraph::opset3::DepthToSpace>(node) != nullptr;
|
||||
* };
|
||||
*
|
||||
* auto p = ngraph::pass::DepthToSpaceFusion();
|
||||
* auto p = ov::pass::DepthToSpaceFusion();
|
||||
* p.setCallback(callback);
|
||||
* p.run_on_function(f);
|
||||
*
|
||||
*/
|
||||
|
||||
class ngraph::pass::DepthToSpaceFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::DepthToSpaceFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("DepthToSpaceFusion", "0");
|
||||
DepthToSpaceFusion();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::DepthToSpaceFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,17 +5,17 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API DilatedConvolutionConverter;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -26,8 +26,14 @@ class TRANSFORMATIONS_API DilatedConvolutionConverter;
|
||||
* - pads in SpaceToBatch must have 0 on first and second position
|
||||
*/
|
||||
|
||||
class ngraph::pass::DilatedConvolutionConverter : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::DilatedConvolutionConverter : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("DilatedConvolutionConverter", "0");
|
||||
DilatedConvolutionConverter();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::DilatedConvolutionConverter;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,24 +5,30 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API DisableRandomUniformConstantFolding;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief Disables ConstantFolding for RandomUniform operation. It is required as RandomUniform
|
||||
* should generate new sequence each run.
|
||||
*/
|
||||
class ngraph::pass::DisableRandomUniformConstantFolding : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::DisableRandomUniformConstantFolding : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("DisableRandomUniformConstantFolding", "0");
|
||||
DisableRandomUniformConstantFolding();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::DisableRandomUniformConstantFolding;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,19 +5,25 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API DisableShapeOfConstantFolding;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
class ngraph::pass::DisableShapeOfConstantFolding : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::DisableShapeOfConstantFolding : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("DisableShapeOfConstantFolding", "0");
|
||||
DisableShapeOfConstantFolding();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::DisableShapeOfConstantFolding;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,24 +5,30 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API DivideFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief DivideFusion transformation replaces a sub-graph
|
||||
* Pow(y, -1) * x or x * Pow(y, -1) with Divide(x,y)
|
||||
*/
|
||||
class ngraph::pass::DivideFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::DivideFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("DivideFusion", "0");
|
||||
DivideFusion();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::DivideFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,7 +5,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <utility>
|
||||
|
||||
@ -28,7 +28,7 @@ class TRANSFORMATIONS_API DivisionByZeroFP16Resolver;
|
||||
* be zero. We should keep in such patterns eps >= fp16 minimal normalized value so that CompressFloatConstants should
|
||||
* not cast them into zero during compression into f16.
|
||||
*/
|
||||
class ov::pass::DivisionByZeroFP16Resolver : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::DivisionByZeroFP16Resolver : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("DivisionByZeroFP16Resolver", "0");
|
||||
DivisionByZeroFP16Resolver();
|
||||
|
@ -4,16 +4,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API DropoutWithRandomUniformReplacer;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -34,8 +34,14 @@ class TRANSFORMATIONS_API DropoutWithRandomUniformReplacer;
|
||||
* Const(0.5) Const(1)
|
||||
*
|
||||
*/
|
||||
class ngraph::pass::DropoutWithRandomUniformReplacer : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::DropoutWithRandomUniformReplacer : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("DropoutWithRandomUniformReplacer", "0");
|
||||
DropoutWithRandomUniformReplacer();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::DropoutWithRandomUniformReplacer;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,19 +5,19 @@
|
||||
#pragma once
|
||||
|
||||
#include <ngraph/ngraph.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include "ngraph/pattern/matcher.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API EliminateUnsqueezeGather;
|
||||
class TRANSFORMATIONS_API EliminateGatherUnsqueeze;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -25,7 +25,7 @@ class TRANSFORMATIONS_API EliminateGatherUnsqueeze;
|
||||
* that was previously added by Unsqueeze
|
||||
*/
|
||||
|
||||
class ngraph::pass::EliminateUnsqueezeGather : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::EliminateUnsqueezeGather : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("EliminateUnsqueezeGather", "0");
|
||||
EliminateUnsqueezeGather();
|
||||
@ -37,8 +37,15 @@ public:
|
||||
* Unsqueeze makes it a 1D tensor
|
||||
*/
|
||||
|
||||
class ngraph::pass::EliminateGatherUnsqueeze : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::EliminateGatherUnsqueeze : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("EliminateGatherUnsqueeze", "0");
|
||||
EliminateGatherUnsqueeze();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::EliminateGatherUnsqueeze;
|
||||
using ov::pass::EliminateUnsqueezeGather;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,17 +5,17 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API FakeQuantizeMulFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -24,8 +24,14 @@ class TRANSFORMATIONS_API FakeQuantizeMulFusion;
|
||||
* by the value that was originally below the FQ node.
|
||||
*/
|
||||
|
||||
class ngraph::pass::FakeQuantizeMulFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::FakeQuantizeMulFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("FakeQuantizeMulFusion", "0");
|
||||
FakeQuantizeMulFusion();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::FakeQuantizeMulFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,17 +5,17 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API FakeQuantizeReshapeFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -24,8 +24,14 @@ class TRANSFORMATIONS_API FakeQuantizeReshapeFusion;
|
||||
* following FQ broadcasting semantics
|
||||
*/
|
||||
|
||||
class ngraph::pass::FakeQuantizeReshapeFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::FakeQuantizeReshapeFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("FakeQuantizeReshapeFusion", "0");
|
||||
FakeQuantizeReshapeFusion();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::FakeQuantizeReshapeFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,26 +5,19 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API GeluFusion;
|
||||
class TRANSFORMATIONS_API GeluFusionWithErfOne;
|
||||
class TRANSFORMATIONS_API GeluFusionWithErfTwo;
|
||||
class TRANSFORMATIONS_API GeluFusionWithErfThree;
|
||||
class TRANSFORMATIONS_API GeluFusionWithTanh;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API GeluFusionWithErfFour;
|
||||
class TRANSFORMATIONS_API GeluFusionWithTanh;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ov
|
||||
@ -34,7 +27,7 @@ class TRANSFORMATIONS_API GeluFusionWithErfFour;
|
||||
* @brief GeluFusion transformation replaces a sub-graph
|
||||
* (0.5 * x) * (1 + erf(x / sqrt(2))) with a Gelu op.
|
||||
*/
|
||||
class ngraph::pass::GeluFusionWithErfOne : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::GeluFusionWithErfOne : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("GeluFusionWithErfOne", "0");
|
||||
GeluFusionWithErfOne();
|
||||
@ -45,7 +38,7 @@ public:
|
||||
* @brief GeluFusion transformation replaces a sub-graph
|
||||
* 0.5 * (x * (1 + erf(x / sqrt(2)))) with a Gelu op.
|
||||
*/
|
||||
class ngraph::pass::GeluFusionWithErfTwo : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::GeluFusionWithErfTwo : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("GeluFusionWithErfTwo", "0");
|
||||
GeluFusionWithErfTwo();
|
||||
@ -56,7 +49,7 @@ public:
|
||||
* @brief GeluFusion transformation replaces a sub-graph
|
||||
* x * (0.5 * (1 + erf(x / sqrt(2)))) with a Gelu op.
|
||||
*/
|
||||
class ngraph::pass::GeluFusionWithErfThree : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::GeluFusionWithErfThree : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("GeluFusionWithErfThree", "0");
|
||||
GeluFusionWithErfThree();
|
||||
@ -78,7 +71,7 @@ public:
|
||||
* @brief GeluFusion transformation replaces a sub-graph
|
||||
* x * (0.5 * (1 + tanh([sqrt(2 / pi)] * [x + 0.044715^3]))) with a Gelu (Tanh) op.
|
||||
*/
|
||||
class ngraph::pass::GeluFusionWithTanh : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::GeluFusionWithTanh : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("GeluFusionWithTanh", "0");
|
||||
GeluFusionWithTanh();
|
||||
@ -88,14 +81,25 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief GeluFusion transformation replaces various sub-graphs with a Gelu op.
|
||||
*/
|
||||
class ngraph::pass::GeluFusion : public ngraph::pass::GraphRewrite {
|
||||
class ov::pass::GeluFusion : public ov::pass::GraphRewrite {
|
||||
public:
|
||||
OPENVINO_RTTI("GeluFusion", "0");
|
||||
GeluFusion() {
|
||||
add_matcher<ngraph::pass::GeluFusionWithErfOne>();
|
||||
add_matcher<ngraph::pass::GeluFusionWithErfTwo>();
|
||||
add_matcher<ngraph::pass::GeluFusionWithErfThree>();
|
||||
add_matcher<ov::pass::GeluFusionWithErfOne>();
|
||||
add_matcher<ov::pass::GeluFusionWithErfTwo>();
|
||||
add_matcher<ov::pass::GeluFusionWithErfThree>();
|
||||
add_matcher<ov::pass::GeluFusionWithErfFour>();
|
||||
add_matcher<ngraph::pass::GeluFusionWithTanh>();
|
||||
add_matcher<ov::pass::GeluFusionWithTanh>();
|
||||
}
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::GeluFusion;
|
||||
using ov::pass::GeluFusionWithErfFour;
|
||||
using ov::pass::GeluFusionWithErfOne;
|
||||
using ov::pass::GeluFusionWithErfThree;
|
||||
using ov::pass::GeluFusionWithErfTwo;
|
||||
using ov::pass::GeluFusionWithTanh;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,11 +5,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API HSigmoidFusion;
|
||||
@ -20,13 +20,13 @@ class TRANSFORMATIONS_API HSigmoidFusionWithClampMul;
|
||||
class TRANSFORMATIONS_API HSigmoidFusionWithClampDiv;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief HSigmoidFusion transformation replaces a sub-graph ((min(Relu(x + 3), 6)) / 6) with a HSigmoid op.
|
||||
*/
|
||||
class ngraph::pass::HSigmoidFusionWithReluDiv : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::HSigmoidFusionWithReluDiv : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("HSigmoidFusionWithReluDiv", "0");
|
||||
HSigmoidFusionWithReluDiv();
|
||||
@ -36,7 +36,7 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief HSigmoidFusion transformation replaces a sub-graph ((min(Relu(x + 3), 6)) * const(1/6)) with a HSigmoid op.
|
||||
*/
|
||||
class ngraph::pass::HSigmoidFusionWithReluMul : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::HSigmoidFusionWithReluMul : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("HSigmoidFusionWithReluMul", "0");
|
||||
HSigmoidFusionWithReluMul();
|
||||
@ -46,7 +46,7 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief HSigmoidFusion transformation replaces a sub-graph (min(max(x + 3, 0), 6) / 6) with a HSigmoid op.
|
||||
*/
|
||||
class ngraph::pass::HSigmoidFusionWithoutRelu : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::HSigmoidFusionWithoutRelu : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("HSigmoidFusionWithoutRelu", "0");
|
||||
HSigmoidFusionWithoutRelu();
|
||||
@ -56,7 +56,7 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief HSigmoidFusion transformation replaces a sub-graph (Clamp(x + 3, 0, 6) * const(1/6)) with a HSigmoid op.
|
||||
*/
|
||||
class ngraph::pass::HSigmoidFusionWithClampMul : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::HSigmoidFusionWithClampMul : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("HSigmoidFusionWithClampMul", "0");
|
||||
HSigmoidFusionWithClampMul();
|
||||
@ -66,7 +66,7 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief HSigmoidFusion transformation replaces a sub-graph (Clamp(x + 3, 0, 6) * / 6) with a HSigmoid op.
|
||||
*/
|
||||
class ngraph::pass::HSigmoidFusionWithClampDiv : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::HSigmoidFusionWithClampDiv : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("HSigmoidFusionWithClampDiv", "0");
|
||||
HSigmoidFusionWithClampDiv();
|
||||
@ -76,14 +76,25 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief HSigmoidFusion transformation replaces various sub-graphs with a HSigmoid op.
|
||||
*/
|
||||
class ngraph::pass::HSigmoidFusion : public ngraph::pass::GraphRewrite {
|
||||
class ov::pass::HSigmoidFusion : public ov::pass::GraphRewrite {
|
||||
public:
|
||||
OPENVINO_RTTI("HSigmoidFusion", "0");
|
||||
HSigmoidFusion() {
|
||||
add_matcher<ngraph::pass::HSigmoidFusionWithReluDiv>();
|
||||
add_matcher<ngraph::pass::HSigmoidFusionWithReluMul>();
|
||||
add_matcher<ngraph::pass::HSigmoidFusionWithoutRelu>();
|
||||
add_matcher<ngraph::pass::HSigmoidFusionWithClampMul>();
|
||||
add_matcher<ngraph::pass::HSigmoidFusionWithClampDiv>();
|
||||
add_matcher<ov::pass::HSigmoidFusionWithReluDiv>();
|
||||
add_matcher<ov::pass::HSigmoidFusionWithReluMul>();
|
||||
add_matcher<ov::pass::HSigmoidFusionWithoutRelu>();
|
||||
add_matcher<ov::pass::HSigmoidFusionWithClampMul>();
|
||||
add_matcher<ov::pass::HSigmoidFusionWithClampDiv>();
|
||||
}
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::HSigmoidFusion;
|
||||
using ov::pass::HSigmoidFusionWithClampDiv;
|
||||
using ov::pass::HSigmoidFusionWithClampMul;
|
||||
using ov::pass::HSigmoidFusionWithoutRelu;
|
||||
using ov::pass::HSigmoidFusionWithReluDiv;
|
||||
using ov::pass::HSigmoidFusionWithReluMul;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,11 +5,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API HSwishFusion;
|
||||
@ -19,13 +19,13 @@ class TRANSFORMATIONS_API HSwishFusionWithHSigmoid;
|
||||
class TRANSFORMATIONS_API HSwishFusionWithClamp;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief HSwishFusion transformation replaces a sub-graph (x * (min(Relu(x + 3), 6))) / 6 with a HSwish op.
|
||||
*/
|
||||
class ngraph::pass::HSwishFusionWithReluDiv : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::HSwishFusionWithReluDiv : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("HSwishFusionWithReluDiv", "0");
|
||||
HSwishFusionWithReluDiv();
|
||||
@ -35,7 +35,7 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief HSwishFusion transformation replaces a sub-graph (x * (min(Relu(x + 3), 6)) * const(1/6) with a HSwish op.
|
||||
*/
|
||||
class ngraph::pass::HSwishFusionWithReluMul : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::HSwishFusionWithReluMul : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("HSwishFusionWithReluMul", "0");
|
||||
HSwishFusionWithReluMul();
|
||||
@ -45,7 +45,7 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief HSwishFusion transformation replaces a sub-graph x * HSigmoid(x) with a HSwish op.
|
||||
*/
|
||||
class ngraph::pass::HSwishFusionWithHSigmoid : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::HSwishFusionWithHSigmoid : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("HSwishFusionWithHSigmoid", "0");
|
||||
HSwishFusionWithHSigmoid();
|
||||
@ -55,7 +55,7 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief HSwishFusion transformation replaces a sub-graph (Clamp(x + 3, 0, 6) * x) with a HSwish * 6.
|
||||
*/
|
||||
class ngraph::pass::HSwishFusionWithClamp : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::HSwishFusionWithClamp : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("HSwishFusionWithClamp", "0");
|
||||
HSwishFusionWithClamp();
|
||||
@ -65,13 +65,23 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief HSwishFusion transformation replaces various sub-graphs with a HSwish op.
|
||||
*/
|
||||
class ngraph::pass::HSwishFusion : public ngraph::pass::GraphRewrite {
|
||||
class ov::pass::HSwishFusion : public ov::pass::GraphRewrite {
|
||||
public:
|
||||
OPENVINO_RTTI("HSwishFusion", "0");
|
||||
HSwishFusion() {
|
||||
add_matcher<ngraph::pass::HSwishFusionWithReluDiv>();
|
||||
add_matcher<ngraph::pass::HSwishFusionWithReluMul>();
|
||||
add_matcher<ngraph::pass::HSwishFusionWithHSigmoid>();
|
||||
add_matcher<ngraph::pass::HSwishFusionWithClamp>();
|
||||
add_matcher<ov::pass::HSwishFusionWithReluDiv>();
|
||||
add_matcher<ov::pass::HSwishFusionWithReluMul>();
|
||||
add_matcher<ov::pass::HSwishFusionWithHSigmoid>();
|
||||
add_matcher<ov::pass::HSwishFusionWithClamp>();
|
||||
}
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::HSwishFusion;
|
||||
using ov::pass::HSwishFusionWithClamp;
|
||||
using ov::pass::HSwishFusionWithHSigmoid;
|
||||
using ov::pass::HSwishFusionWithReluDiv;
|
||||
using ov::pass::HSwishFusionWithReluMul;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -6,27 +6,33 @@
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/ngraph.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
#include "ngraph/pattern/matcher.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API InterpolateSequenceFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief InterpolateSequenceFusion transformation replaces a sequence of
|
||||
* operations to Interpolate op.
|
||||
*/
|
||||
class ngraph::pass::InterpolateSequenceFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::InterpolateSequenceFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("InterpolateSequenceFusion", "0");
|
||||
InterpolateSequenceFusion();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::InterpolateSequenceFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,17 +5,17 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API LeakyReluFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -23,8 +23,14 @@ class TRANSFORMATIONS_API LeakyReluFusion;
|
||||
* Multiply->Maximum to LeakyRelu
|
||||
*/
|
||||
|
||||
class ngraph::pass::LeakyReluFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::LeakyReluFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("LeakyReluFusion", "0");
|
||||
LeakyReluFusion();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::LeakyReluFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,11 +5,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API LinOpSequenceFusion;
|
||||
@ -18,21 +18,21 @@ class TRANSFORMATIONS_API AddAddFusion;
|
||||
class TRANSFORMATIONS_API MultiplyMultiplyFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
class ngraph::pass::AddMultiplyFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::AddMultiplyFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("AddMultiplyFusion", "0");
|
||||
AddMultiplyFusion();
|
||||
};
|
||||
|
||||
class ngraph::pass::AddAddFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::AddAddFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("AddAddFusion", "0");
|
||||
AddAddFusion();
|
||||
};
|
||||
|
||||
class ngraph::pass::MultiplyMultiplyFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::MultiplyMultiplyFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("MultiplyMultiplyFusion", "0");
|
||||
MultiplyMultiplyFusion();
|
||||
@ -42,12 +42,21 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief LinOpSequenceFusion transformation fuses linear operation sequence.
|
||||
*/
|
||||
class ngraph::pass::LinOpSequenceFusion : public ngraph::pass::GraphRewrite {
|
||||
class ov::pass::LinOpSequenceFusion : public ov::pass::GraphRewrite {
|
||||
public:
|
||||
OPENVINO_RTTI("LinOpSequenceFusion", "0");
|
||||
LinOpSequenceFusion() {
|
||||
add_matcher<ngraph::pass::AddMultiplyFusion>();
|
||||
add_matcher<ngraph::pass::AddAddFusion>();
|
||||
add_matcher<ngraph::pass::MultiplyMultiplyFusion>();
|
||||
add_matcher<ov::pass::AddMultiplyFusion>();
|
||||
add_matcher<ov::pass::AddAddFusion>();
|
||||
add_matcher<ov::pass::MultiplyMultiplyFusion>();
|
||||
}
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::AddAddFusion;
|
||||
using ov::pass::AddMultiplyFusion;
|
||||
using ov::pass::LinOpSequenceFusion;
|
||||
using ov::pass::MultiplyMultiplyFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
/**
|
||||
@ -13,7 +13,7 @@
|
||||
* Transpose
|
||||
*/
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API MatMulConstTransposesExtraction : public MatcherPass {
|
||||
@ -22,5 +22,11 @@ public:
|
||||
MatMulConstTransposesExtraction();
|
||||
};
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ov
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::MatMulConstTransposesExtraction;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -4,16 +4,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API MatMulMultiplyFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -56,8 +56,14 @@ class TRANSFORMATIONS_API MatMulMultiplyFusion;
|
||||
* | MatMul |
|
||||
* +--------+
|
||||
*/
|
||||
class ngraph::pass::MatMulMultiplyFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::MatMulMultiplyFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("MatMulMultiplyFusion", "0");
|
||||
MatMulMultiplyFusion();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::MatMulMultiplyFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -6,27 +6,33 @@
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/ngraph.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
#include "ngraph/pattern/matcher.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API MishFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief MishFusion transformation replaces group of
|
||||
* operations: x * tanh(log(exp(x) + 1)) to Mish op.
|
||||
*/
|
||||
class ngraph::pass::MishFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::MishFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("MishFusion", "0");
|
||||
MishFusion();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::MishFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,16 +5,16 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API MOCTransformations;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @brief This transformation is an entry point for nGraph transformations that will be
|
||||
@ -22,7 +22,7 @@ class TRANSFORMATIONS_API MOCTransformations;
|
||||
* with transformations pipeline but now it remains empty.
|
||||
*/
|
||||
|
||||
class ngraph::pass::MOCTransformations : public ngraph::pass::FunctionPass {
|
||||
class ov::pass::MOCTransformations : public ov::pass::ModelPass {
|
||||
bool m_use_shapes;
|
||||
bool m_low_precision_enabled;
|
||||
|
||||
@ -41,3 +41,9 @@ public:
|
||||
|
||||
bool run_on_model(const std::shared_ptr<ngraph::Function>& m) override;
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::MOCTransformations;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -6,10 +6,10 @@
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API MultiplyConvolutionFusion;
|
||||
@ -18,7 +18,7 @@ class TRANSFORMATIONS_API MultiplyConvolutionBackpropDataFusion;
|
||||
class TRANSFORMATIONS_API MultiplyGroupConvolutionBackpropDataFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -77,26 +77,35 @@ class TRANSFORMATIONS_API MultiplyGroupConvolutionBackpropDataFusion;
|
||||
* C, 1, ..., 1) when 'Convolution Op' is either ConvolutionBackpropData or GroupConvolutionBackpropData
|
||||
*/
|
||||
|
||||
class ngraph::pass::MultiplyConvolutionFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::MultiplyConvolutionFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("MultiplyConvolutionFusion", "0");
|
||||
MultiplyConvolutionFusion();
|
||||
};
|
||||
|
||||
class ngraph::pass::MultiplyGroupConvolutionFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::MultiplyGroupConvolutionFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("MultiplyGroupConvolutionFusion", "0");
|
||||
MultiplyGroupConvolutionFusion();
|
||||
};
|
||||
|
||||
class ngraph::pass::MultiplyConvolutionBackpropDataFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::MultiplyConvolutionBackpropDataFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("MultiplyConvolutionBackpropDataFusion", "0");
|
||||
MultiplyConvolutionBackpropDataFusion();
|
||||
};
|
||||
|
||||
class ngraph::pass::MultiplyGroupConvolutionBackpropDataFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::MultiplyGroupConvolutionBackpropDataFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("MultiplyGroupConvolutionBackpropDataFusion", "0");
|
||||
MultiplyGroupConvolutionBackpropDataFusion();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::MultiplyConvolutionBackpropDataFusion;
|
||||
using ov::pass::MultiplyConvolutionFusion;
|
||||
using ov::pass::MultiplyGroupConvolutionBackpropDataFusion;
|
||||
using ov::pass::MultiplyGroupConvolutionFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,17 +5,17 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API MulFakeQuantizeFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -24,8 +24,14 @@ class TRANSFORMATIONS_API MulFakeQuantizeFusion;
|
||||
* Restrictions:
|
||||
* - second input to Mul is a Constant
|
||||
*/
|
||||
class ngraph::pass::MulFakeQuantizeFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::MulFakeQuantizeFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("MulFakeQuantizeFusion", "0");
|
||||
MulFakeQuantizeFusion();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::MulFakeQuantizeFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -6,13 +6,13 @@
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/ngraph.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
#include "ngraph/pattern/matcher.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API MVNFusion;
|
||||
@ -20,14 +20,14 @@ class TRANSFORMATIONS_API MVNFusionWithoutConstants;
|
||||
class TRANSFORMATIONS_API MVNFusionWithConstantsInside;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief MVNFusion transformation replaces group of
|
||||
* operations: (x - ReduceMean(x, axes)) / (Sqrt(ReduceMean((x - ReduceMean(x, axes)) ^ 2)) + eps) to MVN op.
|
||||
*/
|
||||
class ngraph::pass::MVNFusionWithoutConstants : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::MVNFusionWithoutConstants : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("MVNFusionWithoutConstants", "0");
|
||||
MVNFusionWithoutConstants();
|
||||
@ -39,7 +39,7 @@ public:
|
||||
* operations: gamma * (x - ReduceMean(x, axes)) / (Sqrt(ReduceMean((x - ReduceMean(x, axes)) ^ 2)) + eps) + beta to MVN
|
||||
* op.
|
||||
*/
|
||||
class ngraph::pass::MVNFusionWithConstantsInside : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::MVNFusionWithConstantsInside : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("MVNFusionWithConstantsInside", "0");
|
||||
MVNFusionWithConstantsInside();
|
||||
@ -49,11 +49,19 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief MVNFusion transformation replaces various sub-graphs with a MVN op.
|
||||
*/
|
||||
class ngraph::pass::MVNFusion : public ngraph::pass::GraphRewrite {
|
||||
class ov::pass::MVNFusion : public ov::pass::GraphRewrite {
|
||||
public:
|
||||
OPENVINO_RTTI("MVNFusion", "0");
|
||||
MVNFusion() {
|
||||
add_matcher<ngraph::pass::MVNFusionWithoutConstants>();
|
||||
add_matcher<ngraph::pass::MVNFusionWithConstantsInside>();
|
||||
add_matcher<ov::pass::MVNFusionWithoutConstants>();
|
||||
add_matcher<ov::pass::MVNFusionWithConstantsInside>();
|
||||
}
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::MVNFusion;
|
||||
using ov::pass::MVNFusionWithConstantsInside;
|
||||
using ov::pass::MVNFusionWithoutConstants;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -6,25 +6,31 @@
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/ngraph.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API NearestNeighborUpsamplingFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief NearestNeighborUpsamplingFusion transformation fuses subgraph that uses the simpler operations, as ShapeOf,
|
||||
* StridedSlice, Concat, Reshape, Mul to calculate Interpolate with mode='nearest'.
|
||||
*/
|
||||
class ngraph::pass::NearestNeighborUpsamplingFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::NearestNeighborUpsamplingFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("NearestNeighborUpsamplingFusion", "0");
|
||||
NearestNeighborUpsamplingFusion();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::NearestNeighborUpsamplingFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -4,41 +4,31 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/ngraph.hpp>
|
||||
#include <ngraph/pass/pass.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API EliminatePad;
|
||||
class TRANSFORMATIONS_API EliminateConvert;
|
||||
class TRANSFORMATIONS_API EliminateConvertNonZero;
|
||||
class TRANSFORMATIONS_API EliminateConcat;
|
||||
class TRANSFORMATIONS_API EliminateSplit;
|
||||
class TRANSFORMATIONS_API EliminateSqueeze;
|
||||
class TRANSFORMATIONS_API EliminateTranspose;
|
||||
class TRANSFORMATIONS_API EliminateEltwise;
|
||||
class TRANSFORMATIONS_API NopElimination;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API EliminateConcat;
|
||||
class TRANSFORMATIONS_API EliminateConvert;
|
||||
class TRANSFORMATIONS_API EliminateConvertNonZero;
|
||||
class TRANSFORMATIONS_API EliminateEltwise;
|
||||
class TRANSFORMATIONS_API EliminatePad;
|
||||
class TRANSFORMATIONS_API EliminateSplit;
|
||||
class TRANSFORMATIONS_API EliminateSplitConcat;
|
||||
class TRANSFORMATIONS_API EliminateSqueeze;
|
||||
class TRANSFORMATIONS_API EliminateTranspose;
|
||||
class TRANSFORMATIONS_API NopElimination;
|
||||
|
||||
}
|
||||
} // namespace pass
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief EliminatePad eliminates pad that does nothing
|
||||
*/
|
||||
class ngraph::pass::EliminatePad : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::EliminatePad : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("EliminatePad", "0");
|
||||
EliminatePad();
|
||||
@ -48,7 +38,7 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief EliminateConvert eliminates convert that does nothing
|
||||
*/
|
||||
class ngraph::pass::EliminateConvert : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::EliminateConvert : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("EliminateConvert", "0");
|
||||
EliminateConvert();
|
||||
@ -58,7 +48,7 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief EliminateConvertNonZero eliminates convert before NonZero
|
||||
*/
|
||||
class ngraph::pass::EliminateConvertNonZero : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::EliminateConvertNonZero : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("EliminateConvertNonZero", "0");
|
||||
EliminateConvertNonZero();
|
||||
@ -68,7 +58,7 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief EliminateConcat eliminates concat that does nothing
|
||||
*/
|
||||
class ngraph::pass::EliminateConcat : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::EliminateConcat : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("EliminateConcat", "0");
|
||||
EliminateConcat();
|
||||
@ -78,7 +68,7 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief EliminateSplit eliminates split that does nothing
|
||||
*/
|
||||
class ngraph::pass::EliminateSplit : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::EliminateSplit : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("EliminateSplit", "0");
|
||||
EliminateSplit();
|
||||
@ -88,7 +78,7 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief EliminateSqueeze eliminates squeeze that does nothing
|
||||
*/
|
||||
class ngraph::pass::EliminateSqueeze : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::EliminateSqueeze : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("EliminateSqueeze", "0");
|
||||
EliminateSqueeze();
|
||||
@ -98,7 +88,7 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief EliminateTranspose eliminates transpose that does nothing
|
||||
*/
|
||||
class ngraph::pass::EliminateTranspose : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::EliminateTranspose : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("EliminateTranspose", "0");
|
||||
EliminateTranspose();
|
||||
@ -108,13 +98,13 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief EliminateEltwise eliminates eltwise ops that do nothing
|
||||
*/
|
||||
class ngraph::pass::EliminateEltwise : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::EliminateEltwise : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("EliminateEltwise", "0");
|
||||
EliminateEltwise();
|
||||
};
|
||||
|
||||
class ngraph::pass::NopElimination : public GraphRewrite {
|
||||
class ov::pass::NopElimination : public GraphRewrite {
|
||||
public:
|
||||
OPENVINO_RTTI("NopElimination", "0");
|
||||
NopElimination(bool use_shape_for_elimination = true);
|
||||
@ -128,4 +118,19 @@ class ov::pass::EliminateSplitConcat : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("EliminateSplitConcat", "0");
|
||||
EliminateSplitConcat();
|
||||
};
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::EliminateConcat;
|
||||
using ov::pass::EliminateConvert;
|
||||
using ov::pass::EliminateConvertNonZero;
|
||||
using ov::pass::EliminateEltwise;
|
||||
using ov::pass::EliminatePad;
|
||||
using ov::pass::EliminateSplit;
|
||||
using ov::pass::EliminateSplitConcat;
|
||||
using ov::pass::EliminateSqueeze;
|
||||
using ov::pass::EliminateTranspose;
|
||||
using ov::pass::NopElimination;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,19 +5,19 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <utility>
|
||||
|
||||
#include "ngraph/pattern/matcher.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API NormalizeL2Fusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -30,8 +30,14 @@ class TRANSFORMATIONS_API NormalizeL2Fusion;
|
||||
* x*(pow(add(reduce_sum(x[j0, ..., jN]**2, axes), eps), -0.5)
|
||||
* with a NormalizeL2(x, axes, eps, eps_mode[MAX|ADD]) op
|
||||
*/
|
||||
class ngraph::pass::NormalizeL2Fusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::NormalizeL2Fusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("NormalizeL2Fusion", "0");
|
||||
NormalizeL2Fusion();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::NormalizeL2Fusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -6,13 +6,13 @@
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/opsets/opset1.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <ngraph/slice_plan.hpp>
|
||||
#include <ngraph/util.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API StridedSliceOptimization;
|
||||
@ -21,14 +21,14 @@ class TRANSFORMATIONS_API SharedStridedSliceEraser;
|
||||
class TRANSFORMATIONS_API GroupedStridedSliceOptimizer;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief UselessStridedSliceEraser transformation removes StridedSlice operations
|
||||
* with equal input and output shapes.
|
||||
*/
|
||||
class ngraph::pass::UselessStridedSliceEraser : public ngraph::pass::FunctionPass {
|
||||
class ov::pass::UselessStridedSliceEraser : public ov::pass::ModelPass {
|
||||
public:
|
||||
OPENVINO_RTTI("UselessStridedSliceEraser", "0");
|
||||
bool run_on_model(const std::shared_ptr<ngraph::Function>& m) override;
|
||||
@ -40,7 +40,7 @@ public:
|
||||
* operations with first StridedSlice in this group. All SrtideSlices in this group
|
||||
* must be equal and consume the same output port.
|
||||
*/
|
||||
class ngraph::pass::SharedStridedSliceEraser : public ngraph::pass::FunctionPass {
|
||||
class ov::pass::SharedStridedSliceEraser : public ov::pass::ModelPass {
|
||||
public:
|
||||
OPENVINO_RTTI("SharedStridedSliceEraser", "0");
|
||||
bool run_on_model(const std::shared_ptr<ngraph::Function>& m) override;
|
||||
@ -52,7 +52,7 @@ public:
|
||||
* operations with VariadicSplit. All StridedSlice operations must slice data
|
||||
* with the same axis and stride = 1.
|
||||
*/
|
||||
class ngraph::pass::GroupedStridedSliceOptimizer : public ngraph::pass::FunctionPass {
|
||||
class ov::pass::GroupedStridedSliceOptimizer : public ov::pass::ModelPass {
|
||||
public:
|
||||
OPENVINO_RTTI("GroupedStridedSliceOptimizer", "0");
|
||||
bool run_on_model(const std::shared_ptr<ngraph::Function>& m) override;
|
||||
@ -63,7 +63,7 @@ public:
|
||||
* @brief StridedSliceOptimization transformation executes all transformations
|
||||
* related to StridedSlice optimizations.
|
||||
*/
|
||||
class ngraph::pass::StridedSliceOptimization : public ngraph::pass::FunctionPass {
|
||||
class ov::pass::StridedSliceOptimization : public ov::pass::ModelPass {
|
||||
public:
|
||||
StridedSliceOptimization(bool use_shapes = true);
|
||||
|
||||
@ -73,3 +73,12 @@ public:
|
||||
private:
|
||||
bool m_use_shapes = true;
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::GroupedStridedSliceOptimizer;
|
||||
using ov::pass::SharedStridedSliceEraser;
|
||||
using ov::pass::StridedSliceOptimization;
|
||||
using ov::pass::UselessStridedSliceEraser;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -4,10 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API PadFusion;
|
||||
@ -18,7 +18,7 @@ class TRANSFORMATIONS_API PadFusionGroupConvolution;
|
||||
class TRANSFORMATIONS_API PadFusionGroupConvolutionBackpropData;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -28,7 +28,7 @@ class TRANSFORMATIONS_API PadFusionGroupConvolutionBackpropData;
|
||||
* - pad value is 0
|
||||
* - exclude_pad in AvgPool is set to false or pads_begin, pads_end are set to zero
|
||||
*/
|
||||
class ngraph::pass::PadFusionAvgPool : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::PadFusionAvgPool : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("PadFusionAvgPool", "0");
|
||||
PadFusionAvgPool();
|
||||
@ -41,7 +41,7 @@ public:
|
||||
* - pad mode is op::PadMode::CONSTANT
|
||||
* - pad value is 0
|
||||
*/
|
||||
class ngraph::pass::PadFusionConvolution : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::PadFusionConvolution : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("PadFusionConvolution", "0");
|
||||
PadFusionConvolution();
|
||||
@ -55,7 +55,7 @@ public:
|
||||
* - pad value is 0
|
||||
* - pads in ConvolutionBackpropData are greater than pads in Pad node
|
||||
*/
|
||||
class ngraph::pass::PadFusionConvolutionBackpropData : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::PadFusionConvolutionBackpropData : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("PadFusionConvolutionBackpropData", "0");
|
||||
PadFusionConvolutionBackpropData();
|
||||
@ -68,7 +68,7 @@ public:
|
||||
* - pad mode is op::PadMode::CONSTANT
|
||||
* - pad value is 0
|
||||
*/
|
||||
class ngraph::pass::PadFusionGroupConvolution : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::PadFusionGroupConvolution : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("PadFusionGroupConvolution", "0");
|
||||
PadFusionGroupConvolution();
|
||||
@ -82,20 +82,31 @@ public:
|
||||
* - pad value is 0
|
||||
* - pads in GroupConvolutionBackpropData are greater than pads in Pad node
|
||||
*/
|
||||
class ngraph::pass::PadFusionGroupConvolutionBackpropData : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::PadFusionGroupConvolutionBackpropData : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("PadFusionGroupConvolutionBackpropData", "0");
|
||||
PadFusionGroupConvolutionBackpropData();
|
||||
};
|
||||
|
||||
class ngraph::pass::PadFusion : public ngraph::pass::GraphRewrite {
|
||||
class ov::pass::PadFusion : public ov::pass::GraphRewrite {
|
||||
public:
|
||||
OPENVINO_RTTI("PadFusion", "0");
|
||||
PadFusion() {
|
||||
add_matcher<ngraph::pass::PadFusionAvgPool>();
|
||||
add_matcher<ngraph::pass::PadFusionConvolution>();
|
||||
add_matcher<ngraph::pass::PadFusionConvolutionBackpropData>();
|
||||
add_matcher<ngraph::pass::PadFusionGroupConvolution>();
|
||||
add_matcher<ngraph::pass::PadFusionGroupConvolutionBackpropData>();
|
||||
add_matcher<ov::pass::PadFusionAvgPool>();
|
||||
add_matcher<ov::pass::PadFusionConvolution>();
|
||||
add_matcher<ov::pass::PadFusionConvolutionBackpropData>();
|
||||
add_matcher<ov::pass::PadFusionGroupConvolution>();
|
||||
add_matcher<ov::pass::PadFusionGroupConvolutionBackpropData>();
|
||||
}
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::PadFusion;
|
||||
using ov::pass::PadFusionAvgPool;
|
||||
using ov::pass::PadFusionConvolution;
|
||||
using ov::pass::PadFusionConvolutionBackpropData;
|
||||
using ov::pass::PadFusionGroupConvolution;
|
||||
using ov::pass::PadFusionGroupConvolutionBackpropData;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,11 +5,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API PReluFusion;
|
||||
@ -19,7 +19,7 @@ class TRANSFORMATIONS_API PReluFusionMultiplyAdd;
|
||||
class TRANSFORMATIONS_API PReluFusionMultiplySub;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -36,9 +36,9 @@ class TRANSFORMATIONS_API PReluFusionMultiplySub;
|
||||
* \ /
|
||||
* Add
|
||||
*/
|
||||
class ngraph::pass::PReluFusionNegativeAdd : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::PReluFusionNegativeAdd : public ov::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
OPENVINO_RTTI("PReluFusionNegativeAdd", "0");
|
||||
PReluFusionNegativeAdd();
|
||||
};
|
||||
|
||||
@ -55,9 +55,9 @@ public:
|
||||
* \ /
|
||||
* Sub
|
||||
*/
|
||||
class ngraph::pass::PReluFusionNegativeSub : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::PReluFusionNegativeSub : public ov::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
OPENVINO_RTTI("PReluFusionNegativeSub", "0");
|
||||
PReluFusionNegativeSub();
|
||||
};
|
||||
|
||||
@ -74,9 +74,9 @@ public:
|
||||
* \ /
|
||||
* Add
|
||||
*/
|
||||
class ngraph::pass::PReluFusionMultiplyAdd : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::PReluFusionMultiplyAdd : public ov::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
OPENVINO_RTTI("PReluFusionMultiplyAdd", "0");
|
||||
PReluFusionMultiplyAdd();
|
||||
};
|
||||
|
||||
@ -93,9 +93,9 @@ public:
|
||||
* \ /
|
||||
* Sub
|
||||
*/
|
||||
class ngraph::pass::PReluFusionMultiplySub : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::PReluFusionMultiplySub : public ov::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
OPENVINO_RTTI("PReluFusionMultiplySub", "0");
|
||||
PReluFusionMultiplySub();
|
||||
};
|
||||
|
||||
@ -103,13 +103,23 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief PReluFusion transformation replaces various sub-graphs with a PRelu op.
|
||||
*/
|
||||
class ngraph::pass::PReluFusion : public ngraph::pass::GraphRewrite {
|
||||
class ov::pass::PReluFusion : public ov::pass::GraphRewrite {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
OPENVINO_RTTI("PReluFusion", "0");
|
||||
PReluFusion() {
|
||||
add_matcher<ngraph::pass::PReluFusionNegativeAdd>();
|
||||
add_matcher<ngraph::pass::PReluFusionNegativeSub>();
|
||||
add_matcher<ngraph::pass::PReluFusionMultiplyAdd>();
|
||||
add_matcher<ngraph::pass::PReluFusionMultiplySub>();
|
||||
add_matcher<ov::pass::PReluFusionNegativeAdd>();
|
||||
add_matcher<ov::pass::PReluFusionNegativeSub>();
|
||||
add_matcher<ov::pass::PReluFusionMultiplyAdd>();
|
||||
add_matcher<ov::pass::PReluFusionMultiplySub>();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::PReluFusion;
|
||||
using ov::pass::PReluFusionMultiplyAdd;
|
||||
using ov::pass::PReluFusionMultiplySub;
|
||||
using ov::pass::PReluFusionNegativeAdd;
|
||||
using ov::pass::PReluFusionNegativeSub;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,20 +5,26 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API PullTransposeThroughFQUp;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
class ngraph::pass::PullTransposeThroughFQUp : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::PullTransposeThroughFQUp : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("PullTransposeThroughFQUp", "0");
|
||||
PullTransposeThroughFQUp();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::PullTransposeThroughFQUp;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -4,16 +4,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API RandomUniformFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -21,8 +21,14 @@ class TRANSFORMATIONS_API RandomUniformFusion;
|
||||
* RandomUniform -> Mul subgraph with a RandomUniform and replaces min and max const
|
||||
* with corrected values.
|
||||
*/
|
||||
class ngraph::pass::RandomUniformFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::RandomUniformFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("RandomUniformFusion", "0");
|
||||
RandomUniformFusion();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::RandomUniformFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,17 +5,17 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ReduceMerge;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -61,8 +61,14 @@ class TRANSFORMATIONS_API ReduceMerge;
|
||||
* +----------+
|
||||
*
|
||||
*/
|
||||
class ngraph::pass::ReduceMerge : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ReduceMerge : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ReduceMerge", "0");
|
||||
ReduceMerge();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ReduceMerge;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -4,16 +4,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ReluFakeQuantizeFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -23,8 +23,14 @@ class TRANSFORMATIONS_API ReluFakeQuantizeFusion;
|
||||
* - 'input_low' has non negative values
|
||||
*/
|
||||
|
||||
class ngraph::pass::ReluFakeQuantizeFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ReluFakeQuantizeFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ReluFakeQuantizeFusion", "0");
|
||||
ReluFakeQuantizeFusion();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ReluFakeQuantizeFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,27 +5,34 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API FuseFilteringBoxesBySize;
|
||||
class TRANSFORMATIONS_API RemoveFilteringBoxesBySize;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
class ngraph::pass::FuseFilteringBoxesBySize : public ngraph::pass::GraphRewrite {
|
||||
class ov::pass::FuseFilteringBoxesBySize : public ov::pass::GraphRewrite {
|
||||
public:
|
||||
OPENVINO_RTTI("FuseFilteringBoxesBySize", "0");
|
||||
FuseFilteringBoxesBySize();
|
||||
};
|
||||
|
||||
class ngraph::pass::RemoveFilteringBoxesBySize : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::RemoveFilteringBoxesBySize : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("RemoveFilteringBoxesBySize", "0");
|
||||
RemoveFilteringBoxesBySize();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::FuseFilteringBoxesBySize;
|
||||
using ov::pass::RemoveFilteringBoxesBySize;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -4,16 +4,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ReshapeSequenceFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -21,8 +21,14 @@ class TRANSFORMATIONS_API ReshapeSequenceFusion;
|
||||
* sequence
|
||||
*/
|
||||
|
||||
class ngraph::pass::ReshapeSequenceFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ReshapeSequenceFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ReshapeSequenceFusion", "0");
|
||||
ReshapeSequenceFusion(bool use_shape_for_elimination = true);
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ReshapeSequenceFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -4,26 +4,32 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/core/model.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/pass.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ReverseInputChannelsFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief ReverseInputChannelsFusion
|
||||
*/
|
||||
|
||||
class ngraph::pass::ReverseInputChannelsFusion : public ov::pass::ModelPass {
|
||||
class ov::pass::ReverseInputChannelsFusion : public ov::pass::ModelPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ReverseInputChannelsFusion", "0");
|
||||
bool run_on_model(const std::shared_ptr<ov::Model>&) override;
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ReverseInputChannelsFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,17 +5,17 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ShuffleChannelsFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -31,8 +31,14 @@ class TRANSFORMATIONS_API ShuffleChannelsFusion;
|
||||
* and are not necessary when ShuffleChannelsFusion using inside CommonOptimizations
|
||||
*/
|
||||
|
||||
class ngraph::pass::ShuffleChannelsFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ShuffleChannelsFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ShuffleChannelsFusion", "0");
|
||||
ShuffleChannelsFusion(const bool reshape_constants_check);
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ShuffleChannelsFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -7,12 +7,12 @@
|
||||
#include <memory>
|
||||
#include <ngraph/opsets/opset1.hpp>
|
||||
#include <ngraph/opsets/opset3.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <ngraph/util.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API SimplifyShapeOfSubGraph;
|
||||
@ -23,7 +23,7 @@ class TRANSFORMATIONS_API SimplifyGatherShapeOf;
|
||||
class TRANSFORMATIONS_API SimplifySecondInputOfReshape;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -31,7 +31,7 @@ class TRANSFORMATIONS_API SimplifySecondInputOfReshape;
|
||||
* operations with the first ShapeOf in this group. All ShapeOfs in this group
|
||||
* must be equal and consume the same output port.
|
||||
*/
|
||||
class ngraph::pass::SharedShapeOf : public ngraph::pass::FunctionPass {
|
||||
class ov::pass::SharedShapeOf : public ov::pass::ModelPass {
|
||||
public:
|
||||
OPENVINO_RTTI("SharedShapeOf", "0");
|
||||
bool run_on_model(const std::shared_ptr<ngraph::Function>& m) override;
|
||||
@ -43,7 +43,7 @@ public:
|
||||
* operations with the first Gather in this group and updated indices input
|
||||
* in case all Gathers in the group are consumed by the same Concat in incremental order.
|
||||
*/
|
||||
class ngraph::pass::GroupedGatherElimination : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::GroupedGatherElimination : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("GroupedGatherElimination", "0");
|
||||
GroupedGatherElimination();
|
||||
@ -53,7 +53,7 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief SimplifyShapeOfSubGraph transformation runs specific optimizations of shape sub-graphs
|
||||
*/
|
||||
class ngraph::pass::SimplifyShapeOfSubGraph : public ngraph::pass::FunctionPass {
|
||||
class ov::pass::SimplifyShapeOfSubGraph : public ov::pass::ModelPass {
|
||||
public:
|
||||
OPENVINO_RTTI("SimplifyShapeOfSubGraph", "0");
|
||||
bool run_on_model(const std::shared_ptr<ngraph::Function>& m) override;
|
||||
@ -63,7 +63,7 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief GatherNopElimination transformation optimizes out useless Gather operations
|
||||
*/
|
||||
class ngraph::pass::GatherNopElimination : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::GatherNopElimination : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("GatherNopElimination", "0");
|
||||
GatherNopElimination();
|
||||
@ -75,7 +75,7 @@ public:
|
||||
* Other cases into Concat of shapeof/gather(data) + shapeof(indices) transformation optimizes out
|
||||
* useless Gather operations
|
||||
*/
|
||||
class ngraph::pass::SimplifyGatherShapeOf : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::SimplifyGatherShapeOf : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("SimplifyGatherShapeOf", "0");
|
||||
SimplifyGatherShapeOf();
|
||||
@ -86,8 +86,19 @@ public:
|
||||
* @brief SimplifySecondInputOfReshape optimizes `shapeof->gather` into zero values for
|
||||
* reshape pattern values if possible.
|
||||
*/
|
||||
class ngraph::pass::SimplifySecondInputOfReshape : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::SimplifySecondInputOfReshape : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("SimplifySecondInputOfReshape", "0");
|
||||
SimplifySecondInputOfReshape();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::GatherNopElimination;
|
||||
using ov::pass::GroupedGatherElimination;
|
||||
using ov::pass::SharedShapeOf;
|
||||
using ov::pass::SimplifyGatherShapeOf;
|
||||
using ov::pass::SimplifySecondInputOfReshape;
|
||||
using ov::pass::SimplifyShapeOfSubGraph;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,17 +5,17 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API SkipGatherBeforeTransposeAndReshape;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -23,8 +23,14 @@ class TRANSFORMATIONS_API SkipGatherBeforeTransposeAndReshape;
|
||||
* in case when input has batch=1 and gather has axis=0 and indices={0}.
|
||||
* Also, this transformation corrects a transpose constant to save semantic.
|
||||
*/
|
||||
class ngraph::pass::SkipGatherBeforeTransposeAndReshape : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::SkipGatherBeforeTransposeAndReshape : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("SkipGatherBeforeTransposeAndReshape", "0");
|
||||
SkipGatherBeforeTransposeAndReshape();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::SkipGatherBeforeTransposeAndReshape;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -4,16 +4,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API SoftmaxFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -69,8 +69,14 @@ class TRANSFORMATIONS_API SoftmaxFusion;
|
||||
* - ReduceMax and ReduceSum axes must be scalar constants and they have to point to the same axis
|
||||
*/
|
||||
|
||||
class ngraph::pass::SoftmaxFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::SoftmaxFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("SoftmaxFusion", "0");
|
||||
SoftmaxFusion();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::SoftmaxFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,25 +5,31 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API SoftPlusFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief SoftPlusFusion transformation replaces group of
|
||||
* operations: log(exp(x) + 1) to SoftPlus op.
|
||||
*/
|
||||
class ngraph::pass::SoftPlusFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::SoftPlusFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("SoftPlusFusion", "0");
|
||||
SoftPlusFusion();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::SoftPlusFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -6,27 +6,33 @@
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/ngraph.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
#include "ngraph/pattern/matcher.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API SoftPlusToMishFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief SoftPlusToMishFusion transformation replaces group of
|
||||
* operations: x * tanh(softplus(x)) to Mish op.
|
||||
*/
|
||||
class ngraph::pass::SoftPlusToMishFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::SoftPlusToMishFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("SoftPlusToMishFusion", "0");
|
||||
SoftPlusToMishFusion();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::SoftPlusToMishFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,17 +5,17 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API SpaceToBatchFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -29,8 +29,14 @@ class TRANSFORMATIONS_API SpaceToBatchFusion;
|
||||
* - SpaceToDepthMode must be BLOCKS_FIRST
|
||||
*/
|
||||
|
||||
class ngraph::pass::SpaceToBatchFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::SpaceToBatchFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("SpaceToBatchFusion", "0");
|
||||
SpaceToBatchFusion();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::SpaceToBatchFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -6,27 +6,33 @@
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/ngraph.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
#include "ngraph/pattern/matcher.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API SplitConcatPairToInterpolateFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief SplitConcatPairToInterpolateFusion transformation replaces group of
|
||||
* operations: Split -> Concat to Interpolate op.
|
||||
*/
|
||||
class ngraph::pass::SplitConcatPairToInterpolateFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::SplitConcatPairToInterpolateFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("SplitConcatPairToInterpolateFusion", "0");
|
||||
SplitConcatPairToInterpolateFusion(bool use_shape_for_elimination = true);
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::SplitConcatPairToInterpolateFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -6,27 +6,33 @@
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/ngraph.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
#include "ngraph/pattern/matcher.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API SplitSqueezeConcatFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief SplitSqueezeConcatFusion transformation replaces group of
|
||||
* operations: Split -> Squeeze (multiple) -> Concat to Transpose -> Reshape ops.
|
||||
*/
|
||||
class ngraph::pass::SplitSqueezeConcatFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::SplitSqueezeConcatFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("SplitSqueezeConcatFusion", "0");
|
||||
SplitSqueezeConcatFusion();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::SplitSqueezeConcatFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,12 +5,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <ngraph/pass/pass.hpp>
|
||||
#include <ngraph/util.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ConvStridesPropagation;
|
||||
@ -19,7 +19,7 @@ class TRANSFORMATIONS_API UnsupportedNodesStridesPropagation;
|
||||
class TRANSFORMATIONS_API StridesOptimization;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -27,7 +27,7 @@ class TRANSFORMATIONS_API StridesOptimization;
|
||||
* or inserts pooling between current node and its consumers if the consumers have different StridesProp attributes.
|
||||
* Strides can be propagated if Convolution kernel is {1, 1, ...}
|
||||
*/
|
||||
class ngraph::pass::ConvStridesPropagation : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ConvStridesPropagation : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ConvStridesPropagation", "0");
|
||||
ConvStridesPropagation();
|
||||
@ -39,7 +39,7 @@ public:
|
||||
* graph or inserts pooling between current node and its consumers if the consumers have different StridesProp
|
||||
* attributes.
|
||||
*/
|
||||
class ngraph::pass::SupportedNodesStridesPropagation : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::SupportedNodesStridesPropagation : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("SupportedNodesStridesPropagation", "0");
|
||||
SupportedNodesStridesPropagation();
|
||||
@ -50,7 +50,7 @@ public:
|
||||
* @brief UnsupportedNodesStridesPropagation inserts pooling between current node and its consumers
|
||||
* if the consumers have different StridesProp attributes.
|
||||
*/
|
||||
class ngraph::pass::UnsupportedNodesStridesPropagation : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::UnsupportedNodesStridesPropagation : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("UnsupportedNodesStridesPropagation", "0");
|
||||
UnsupportedNodesStridesPropagation();
|
||||
@ -61,12 +61,21 @@ public:
|
||||
* @brief StridesOptimization transformation works backward on function and propagates strides up through the graph if
|
||||
* possible
|
||||
*/
|
||||
class ngraph::pass::StridesOptimization : public ngraph::pass::BackwardGraphRewrite {
|
||||
class ov::pass::StridesOptimization : public ov::pass::BackwardGraphRewrite {
|
||||
public:
|
||||
OPENVINO_RTTI("StridesOptimization", "0");
|
||||
StridesOptimization() {
|
||||
add_matcher<ngraph::pass::ConvStridesPropagation>();
|
||||
add_matcher<ngraph::pass::SupportedNodesStridesPropagation>();
|
||||
add_matcher<ngraph::pass::UnsupportedNodesStridesPropagation>();
|
||||
add_matcher<ov::pass::ConvStridesPropagation>();
|
||||
add_matcher<ov::pass::SupportedNodesStridesPropagation>();
|
||||
add_matcher<ov::pass::UnsupportedNodesStridesPropagation>();
|
||||
}
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ConvStridesPropagation;
|
||||
using ov::pass::StridesOptimization;
|
||||
using ov::pass::SupportedNodesStridesPropagation;
|
||||
using ov::pass::UnsupportedNodesStridesPropagation;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,24 +5,30 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API SubtractFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief SubtractFusion transformation replaces a sub-graph
|
||||
* Mul(y, -1) + x or x + Mul(y, -1) with Subtract(x,y)
|
||||
*/
|
||||
class ngraph::pass::SubtractFusion : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::SubtractFusion : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("SubtractFusion", "0");
|
||||
SubtractFusion();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::SubtractFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,11 +5,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API SwishFusion;
|
||||
@ -19,13 +19,13 @@ class TRANSFORMATIONS_API SwishFusionWithBeta;
|
||||
class TRANSFORMATIONS_API SwishFusionWithoutBeta;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief SwishFusionWithSigmoid replaces a sub-graphs x * Sigmoid(x) with a Swish op.
|
||||
*/
|
||||
class ngraph::pass::SwishFusionWithSigmoid : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::SwishFusionWithSigmoid : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("SwishFusionWithSigmoid", "0");
|
||||
SwishFusionWithSigmoid();
|
||||
@ -35,7 +35,7 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief SwishFusionWithSigmoid replaces a sub-graphs x * Sigmoid(x * beta) with a Swish op.
|
||||
*/
|
||||
class ngraph::pass::SwishFusionWithSigmoidWithBeta : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::SwishFusionWithSigmoidWithBeta : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("SwishFusionWithSigmoidWithBeta", "0");
|
||||
SwishFusionWithSigmoidWithBeta();
|
||||
@ -45,7 +45,7 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief SwishFusionWithSigmoid replaces a sub-graphs x / (1.0 + exp(-x * beta)) with a Swish op.
|
||||
*/
|
||||
class ngraph::pass::SwishFusionWithBeta : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::SwishFusionWithBeta : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("SwishFusionWithBeta", "0");
|
||||
SwishFusionWithBeta();
|
||||
@ -55,7 +55,7 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief SwishFusionWithSigmoid replaces a sub-graphs x / (1.0 + exp(-x)) with a Swish op.
|
||||
*/
|
||||
class ngraph::pass::SwishFusionWithoutBeta : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::SwishFusionWithoutBeta : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("SwishFusionWithoutBeta", "0");
|
||||
SwishFusionWithoutBeta();
|
||||
@ -65,13 +65,23 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief SwishFusion transformation replaces various sub-graphs with a Swish op.
|
||||
*/
|
||||
class ngraph::pass::SwishFusion : public ngraph::pass::GraphRewrite {
|
||||
class ov::pass::SwishFusion : public ov::pass::GraphRewrite {
|
||||
public:
|
||||
OPENVINO_RTTI("SwishFusion", "0");
|
||||
SwishFusion() {
|
||||
add_matcher<ngraph::pass::SwishFusionWithSigmoid>();
|
||||
add_matcher<ngraph::pass::SwishFusionWithSigmoidWithBeta>();
|
||||
add_matcher<ngraph::pass::SwishFusionWithBeta>();
|
||||
add_matcher<ngraph::pass::SwishFusionWithoutBeta>();
|
||||
add_matcher<ov::pass::SwishFusionWithSigmoid>();
|
||||
add_matcher<ov::pass::SwishFusionWithSigmoidWithBeta>();
|
||||
add_matcher<ov::pass::SwishFusionWithBeta>();
|
||||
add_matcher<ov::pass::SwishFusionWithoutBeta>();
|
||||
}
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::SwishFusion;
|
||||
using ov::pass::SwishFusionWithBeta;
|
||||
using ov::pass::SwishFusionWithoutBeta;
|
||||
using ov::pass::SwishFusionWithSigmoid;
|
||||
using ov::pass::SwishFusionWithSigmoidWithBeta;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -10,13 +10,13 @@
|
||||
#include "ngraph/pass/graph_rewrite.hpp"
|
||||
#include "transformations_visibility.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API TransposeReshapeEliminationForMatmul;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -24,8 +24,14 @@ class TRANSFORMATIONS_API TransposeReshapeEliminationForMatmul;
|
||||
* align input and output dimension ranks before second MatMul input and after MatMul output
|
||||
* (for example, after Einsum Decomposition inside TensorFlow 1 and nGraph EinsumDecomposition transformation)
|
||||
*/
|
||||
class ngraph::pass::TransposeReshapeEliminationForMatmul : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::TransposeReshapeEliminationForMatmul : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("TransposeReshapeEliminationForMatmul", "0");
|
||||
TransposeReshapeEliminationForMatmul();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::TransposeReshapeEliminationForMatmul;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -6,13 +6,13 @@
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/ngraph.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
#include "ngraph/pattern/matcher.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API TransposeSinking;
|
||||
@ -23,13 +23,13 @@ class TRANSFORMATIONS_API TransposeFQReduction;
|
||||
class TRANSFORMATIONS_API TransposeFuse;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief TransposeReduction transformation sinks Transpose through Reduce operations
|
||||
*/
|
||||
class ngraph::pass::TransposeReduction : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::TransposeReduction : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("TransposeReduction", "0");
|
||||
TransposeReduction();
|
||||
@ -40,7 +40,7 @@ public:
|
||||
* @brief TransposeFQReduction transformation sinks Transpose through FakeQuantize in case it is followed by reduction
|
||||
* or squeeze
|
||||
*/
|
||||
class ngraph::pass::TransposeFQReduction : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::TransposeFQReduction : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("TransposeFQReduction", "0");
|
||||
TransposeFQReduction();
|
||||
@ -50,7 +50,7 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief TransposeConvert transformation sinks Transpose through Convert
|
||||
*/
|
||||
class ngraph::pass::TransposeConvert : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::TransposeConvert : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("TransposeConvert", "0");
|
||||
TransposeConvert();
|
||||
@ -60,7 +60,7 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief TransposeEltwise transformation sinks Transpose through Eltwise
|
||||
*/
|
||||
class ngraph::pass::TransposeEltwise : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::TransposeEltwise : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("TransposeEltwise", "0");
|
||||
TransposeEltwise();
|
||||
@ -71,7 +71,7 @@ public:
|
||||
* @brief TransposeFuse transformation eliminates 2 consequtive Transposes if they result in no changes to input or
|
||||
* fuses them to single Transpose if input gets changed
|
||||
*/
|
||||
class ngraph::pass::TransposeFuse : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::TransposeFuse : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("TransposeFuse", "0");
|
||||
TransposeFuse();
|
||||
@ -81,14 +81,25 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief TransposeSinking transformation sinks Transposes through known operations
|
||||
*/
|
||||
class ngraph::pass::TransposeSinking : public ngraph::pass::GraphRewrite {
|
||||
class ov::pass::TransposeSinking : public ov::pass::GraphRewrite {
|
||||
public:
|
||||
OPENVINO_RTTI("TransposeSinking", "0");
|
||||
TransposeSinking() {
|
||||
add_matcher<ngraph::pass::TransposeFQReduction>();
|
||||
add_matcher<ngraph::pass::TransposeReduction>();
|
||||
add_matcher<ngraph::pass::TransposeConvert>();
|
||||
add_matcher<ngraph::pass::TransposeEltwise>();
|
||||
add_matcher<ngraph::pass::TransposeFuse>();
|
||||
add_matcher<ov::pass::TransposeFQReduction>();
|
||||
add_matcher<ov::pass::TransposeReduction>();
|
||||
add_matcher<ov::pass::TransposeConvert>();
|
||||
add_matcher<ov::pass::TransposeEltwise>();
|
||||
add_matcher<ov::pass::TransposeFuse>();
|
||||
}
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::TransposeConvert;
|
||||
using ov::pass::TransposeEltwise;
|
||||
using ov::pass::TransposeFQReduction;
|
||||
using ov::pass::TransposeFuse;
|
||||
using ov::pass::TransposeReduction;
|
||||
using ov::pass::TransposeSinking;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -6,26 +6,32 @@
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/ngraph.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
#include "ngraph/pattern/matcher.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API TransposeToReshape;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief TransposeToReshape transformation replaces suitable Transposes with Reshape operation or optimizes them out
|
||||
*/
|
||||
class ngraph::pass::TransposeToReshape : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::TransposeToReshape : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("TransposeToReshape", "0");
|
||||
TransposeToReshape();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::TransposeToReshape;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,17 +5,17 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API WeightsDequantizeToFakeQuantize;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -25,8 +25,14 @@ class TRANSFORMATIONS_API WeightsDequantizeToFakeQuantize;
|
||||
* Constant (i8) -> Convert (to fp) -> FakeQuantize ->
|
||||
* deducing levels and FakeQuantize limits according to actual values in the weights Constant
|
||||
*/
|
||||
class ngraph::pass::WeightsDequantizeToFakeQuantize : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::WeightsDequantizeToFakeQuantize : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("WeightsDequantizeToFakeQuantize", "0");
|
||||
WeightsDequantizeToFakeQuantize();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::WeightsDequantizeToFakeQuantize;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,17 +5,17 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API WrapInterpolateIntoTransposes;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -32,8 +32,14 @@ class TRANSFORMATIONS_API WrapInterpolateIntoTransposes;
|
||||
* with respect to spatial dimensions, but TensorFlow frontend gives Interpolate with
|
||||
* axes {1, 2} for 4D tensors.
|
||||
*/
|
||||
class ngraph::pass::WrapInterpolateIntoTransposes : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::WrapInterpolateIntoTransposes : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("WrapInterpolateIntoTransposes", "0");
|
||||
WrapInterpolateIntoTransposes();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::WrapInterpolateIntoTransposes;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -7,13 +7,13 @@
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API UnrollIf;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
// clang-format off
|
||||
/**
|
||||
@ -24,8 +24,14 @@ class TRANSFORMATIONS_API UnrollIf;
|
||||
*/
|
||||
// clang-format on
|
||||
|
||||
class ngraph::pass::UnrollIf : public ngraph::pass::FunctionPass {
|
||||
class ov::pass::UnrollIf : public ngraph::pass::FunctionPass {
|
||||
public:
|
||||
OPENVINO_RTTI("UnrollIf", "0");
|
||||
bool run_on_model(const std::shared_ptr<ngraph::Function>& m) override;
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::UnrollIf;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -9,13 +9,13 @@
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API UnrollTensorIterator;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -25,8 +25,14 @@ class TRANSFORMATIONS_API UnrollTensorIterator;
|
||||
* are added to the network.
|
||||
*/
|
||||
|
||||
class ngraph::pass::UnrollTensorIterator : public ngraph::pass::FunctionPass {
|
||||
class ov::pass::UnrollTensorIterator : public ngraph::pass::FunctionPass {
|
||||
public:
|
||||
OPENVINO_RTTI("UnrollTensorIterator", "0");
|
||||
bool run_on_model(const std::shared_ptr<ngraph::Function>& m) override;
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::UnrollTensorIterator;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -15,13 +15,13 @@
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class NGRAPH_API ConvertPrecision;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -73,19 +73,17 @@ using type_to_fuse_map =
|
||||
std::function<bool(const std::shared_ptr<ngraph::Node>&, ngraph::element::Type, size_t idx)>>;
|
||||
using precisions_array = std::vector<std::pair<ngraph::element::Type, ngraph::element::Type>>;
|
||||
|
||||
class ngraph::pass::ConvertPrecision : public ngraph::pass::FunctionPass {
|
||||
class ov::pass::ConvertPrecision : public ngraph::pass::FunctionPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ConvertPrecision", "0");
|
||||
ConvertPrecision(ngraph::element::Type_t from,
|
||||
ngraph::element::Type_t to,
|
||||
type_to_fuse_map additional_type_to_fuse_map = {})
|
||||
: FunctionPass(),
|
||||
m_precisions(precisions_array{{from, to}}),
|
||||
: m_precisions(precisions_array{{from, to}}),
|
||||
m_additional_type_to_fuse_map(additional_type_to_fuse_map) {}
|
||||
|
||||
ConvertPrecision(const precisions_array& precisions, const type_to_fuse_map& additional_type_to_fuse_map = {})
|
||||
: FunctionPass(),
|
||||
m_precisions(precisions),
|
||||
: m_precisions(precisions),
|
||||
m_additional_type_to_fuse_map(additional_type_to_fuse_map) {}
|
||||
|
||||
bool run_on_model(const std::shared_ptr<ngraph::Function>& m) override;
|
||||
@ -94,3 +92,9 @@ private:
|
||||
precisions_array m_precisions;
|
||||
type_to_fuse_map m_additional_type_to_fuse_map;
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ConvertPrecision;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -13,20 +13,13 @@
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <vector>
|
||||
|
||||
/**
|
||||
* @brief ngraph namespace
|
||||
*/
|
||||
namespace ngraph {
|
||||
|
||||
/**
|
||||
* @brief ngraph::pass namespace
|
||||
*/
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class NGRAPH_API FixRtInfo;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -36,8 +29,14 @@ class NGRAPH_API FixRtInfo;
|
||||
*
|
||||
* Used to extract runtime attributes from shared pointer to `ov::RuntimeAttributeWrapper` to standard or trivial types
|
||||
*/
|
||||
class ngraph::pass::FixRtInfo : public ngraph::pass::FunctionPass {
|
||||
class ov::pass::FixRtInfo : public ngraph::pass::FunctionPass {
|
||||
public:
|
||||
OPENVINO_RTTI("FixRtInfo", "0");
|
||||
bool run_on_model(const std::shared_ptr<ngraph::Function>& m) override;
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::FixRtInfo;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -13,20 +13,13 @@
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <vector>
|
||||
|
||||
/**
|
||||
* @brief ngraph namespace
|
||||
*/
|
||||
namespace ngraph {
|
||||
|
||||
/**
|
||||
* @brief ngraph::pass namespace
|
||||
*/
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class NGRAPH_API InitNodeInfo;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -38,8 +31,14 @@ class NGRAPH_API InitNodeInfo;
|
||||
* This transformations should be called first in transformation pipeline. If attribute was
|
||||
* already set initialization will be skipped for this node.
|
||||
*/
|
||||
class ngraph::pass::InitNodeInfo : public ngraph::pass::FunctionPass {
|
||||
class ov::pass::InitNodeInfo : public ngraph::pass::FunctionPass {
|
||||
public:
|
||||
OPENVINO_RTTI("InitNodeInfo", "0");
|
||||
bool run_on_model(const std::shared_ptr<ngraph::Function>& m) override;
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::InitNodeInfo;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -9,16 +9,22 @@
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API DisableConvertConstantFoldingOnConstPath;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
class ngraph::pass::DisableConvertConstantFoldingOnConstPath : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::DisableConvertConstantFoldingOnConstPath : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("DisableConvertConstantFoldingOnConstPath", "0");
|
||||
DisableConvertConstantFoldingOnConstPath(const element::TypeVector& inputPrecisions = {});
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::DisableConvertConstantFoldingOnConstPath;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -6,22 +6,27 @@
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/ngraph.hpp>
|
||||
#include <ngraph/opsets/opset5.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API BatchNormDecomposition;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
class ngraph::pass::BatchNormDecomposition : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::BatchNormDecomposition : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("BatchNormDecomposition", "0");
|
||||
BatchNormDecomposition();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::BatchNormDecomposition;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,12 +5,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <string>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API BidirectionalSequenceDecomposition;
|
||||
@ -20,7 +20,7 @@ class TRANSFORMATIONS_API BidirectionalGRUSequenceDecomposition;
|
||||
class TRANSFORMATIONS_API BidirectionalRNNSequenceDecomposition;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -28,7 +28,7 @@ class TRANSFORMATIONS_API BidirectionalRNNSequenceDecomposition;
|
||||
*
|
||||
*/
|
||||
|
||||
class ngraph::pass::BidirectionalLSTMSequenceDecomposition : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::BidirectionalLSTMSequenceDecomposition : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("BidirectionalLSTMSequenceDecomposition", "0");
|
||||
BidirectionalLSTMSequenceDecomposition();
|
||||
@ -40,7 +40,7 @@ public:
|
||||
*
|
||||
*/
|
||||
|
||||
class ngraph::pass::BidirectionalGRUSequenceDecomposition : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::BidirectionalGRUSequenceDecomposition : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("BidirectionalGRUSequenceDecomposition", "0");
|
||||
BidirectionalGRUSequenceDecomposition();
|
||||
@ -52,7 +52,7 @@ public:
|
||||
*
|
||||
*/
|
||||
|
||||
class ngraph::pass::BidirectionalRNNSequenceDecomposition : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::BidirectionalRNNSequenceDecomposition : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("BidirectionalRNNSequenceDecomposition", "0");
|
||||
BidirectionalRNNSequenceDecomposition();
|
||||
@ -64,12 +64,21 @@ public:
|
||||
*
|
||||
*/
|
||||
|
||||
class ngraph::pass::BidirectionalSequenceDecomposition : public ngraph::pass::GraphRewrite {
|
||||
class ov::pass::BidirectionalSequenceDecomposition : public ov::pass::GraphRewrite {
|
||||
public:
|
||||
OPENVINO_RTTI("BidirectionalSequenceDecomposition", "0");
|
||||
BidirectionalSequenceDecomposition() {
|
||||
add_matcher<ngraph::pass::BidirectionalLSTMSequenceDecomposition>();
|
||||
add_matcher<ngraph::pass::BidirectionalGRUSequenceDecomposition>();
|
||||
add_matcher<ngraph::pass::BidirectionalRNNSequenceDecomposition>();
|
||||
add_matcher<ov::pass::BidirectionalLSTMSequenceDecomposition>();
|
||||
add_matcher<ov::pass::BidirectionalGRUSequenceDecomposition>();
|
||||
add_matcher<ov::pass::BidirectionalRNNSequenceDecomposition>();
|
||||
}
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::BidirectionalGRUSequenceDecomposition;
|
||||
using ov::pass::BidirectionalLSTMSequenceDecomposition;
|
||||
using ov::pass::BidirectionalRNNSequenceDecomposition;
|
||||
using ov::pass::BidirectionalSequenceDecomposition;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -6,17 +6,17 @@
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/ops.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ConvertBatchToSpace;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@ -31,7 +31,7 @@ class TRANSFORMATIONS_API ConvertBatchToSpace;
|
||||
*
|
||||
*/
|
||||
|
||||
class ngraph::pass::ConvertBatchToSpace : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ConvertBatchToSpace : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ConvertBatchToSpace", "0");
|
||||
explicit ConvertBatchToSpace(bool convert_by_elements = true) : MatcherPass() {
|
||||
@ -45,3 +45,9 @@ private:
|
||||
void convert_batch_to_space();
|
||||
void convert_batch_to_space_by_elements();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ConvertBatchToSpace;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,20 +5,26 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ConvertBroadcast3;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
class ngraph::pass::ConvertBroadcast3 : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ConvertBroadcast3 : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ConvertBroadcast3", "0");
|
||||
ConvertBroadcast3();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ConvertBroadcast3;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,20 +5,26 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ConvertBroadcastToTiles;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
class ngraph::pass::ConvertBroadcastToTiles : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ConvertBroadcastToTiles : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ConvertBroadcastToTiles", "0");
|
||||
ConvertBroadcastToTiles();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ConvertBroadcastToTiles;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -4,19 +4,25 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ConvertConvertLike;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
class ngraph::pass::ConvertConvertLike : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ConvertConvertLike : public ov::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
OPENVINO_RTTI("ConvertConvertLike", "0");
|
||||
ConvertConvertLike();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ConvertConvertLike;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -4,23 +4,29 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ConvertDeformableConv8To1;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief ConvertDeformableConv8To1 converts v8::DeformableConvolution into v1::DeformableConvolution.
|
||||
*/
|
||||
class ngraph::pass::ConvertDeformableConv8To1 : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ConvertDeformableConv8To1 : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ConvertDeformableConv8To1", "0");
|
||||
ConvertDeformableConv8To1();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ConvertDeformableConv8To1;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,20 +5,26 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ConvertDepthToSpace;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
class ngraph::pass::ConvertDepthToSpace : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ConvertDepthToSpace : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ConvertDepthToSpace", "0");
|
||||
ConvertDepthToSpace();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ConvertDepthToSpace;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,27 +5,34 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ConvertDivide;
|
||||
class TRANSFORMATIONS_API ConvertDivideWithConstant;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
class ngraph::pass::ConvertDivide : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ConvertDivide : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ConvertDivide", "0");
|
||||
ConvertDivide();
|
||||
};
|
||||
|
||||
class ngraph::pass::ConvertDivideWithConstant : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ConvertDivideWithConstant : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ConvertDivideWithConstant", "0");
|
||||
ConvertDivideWithConstant();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ConvertDivide;
|
||||
using ov::pass::ConvertDivideWithConstant;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,25 +5,31 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ConvertGather0D;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief ConvertGather0D decomposes v1::Gather operation into v0::Unsqueeze + v1::Gather + v0::Squeeze pattern when
|
||||
* gather indices is scalar
|
||||
*/
|
||||
class ngraph::pass::ConvertGather0D : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ConvertGather0D : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ConvertGather0D", "0");
|
||||
ConvertGather0D();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ConvertGather0D;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -4,23 +4,23 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ConvertGather7ToGather1;
|
||||
class TRANSFORMATIONS_API ConvertGather8ToGather7;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief ConvertGather7ToGather1 converts v7::Gather into v1::Gather.
|
||||
*/
|
||||
class ngraph::pass::ConvertGather7ToGather1 : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ConvertGather7ToGather1 : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ConvertGather7ToGather1", "0");
|
||||
ConvertGather7ToGather1();
|
||||
@ -30,8 +30,15 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief ConvertGather8ToGather7 converts v8::Gather into v7::Gather.
|
||||
*/
|
||||
class ngraph::pass::ConvertGather8ToGather7 : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ConvertGather8ToGather7 : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ConvertGather8ToGather7", "0");
|
||||
ConvertGather8ToGather7();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ConvertGather7ToGather1;
|
||||
using ov::pass::ConvertGather8ToGather7;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -4,10 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ConvertGather1ToGather7;
|
||||
@ -15,13 +15,13 @@ class TRANSFORMATIONS_API ConvertGather1ToGather7;
|
||||
class TRANSFORMATIONS_API ConvertGather7ToGather8;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief ConvertGather1ToGather7 converts v1::Gather into v7::Gather.
|
||||
*/
|
||||
class ngraph::pass::ConvertGather1ToGather7 : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ConvertGather1ToGather7 : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ConvertGather1ToGather7", "0");
|
||||
ConvertGather1ToGather7();
|
||||
@ -31,8 +31,15 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief ConvertGather7ToGather8 converts v7::Gather into v8::Gather.
|
||||
*/
|
||||
class ngraph::pass::ConvertGather7ToGather8 : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ConvertGather7ToGather8 : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ConvertGather7ToGather8", "0");
|
||||
ConvertGather7ToGather8();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ConvertGather1ToGather7;
|
||||
using ov::pass::ConvertGather7ToGather8;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,22 +5,28 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
#include "ngraph/op/gelu.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ConvertGELU;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
class ngraph::pass::ConvertGELU : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ConvertGELU : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ConvertGELU", "0");
|
||||
ConvertGELU();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ConvertGELU;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -4,19 +4,25 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ConvertGP9ToGPIEInternal;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
class ngraph::pass::ConvertGP9ToGPIEInternal : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ConvertGP9ToGPIEInternal : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ConvertGP9ToGPIEInternal", "0");
|
||||
ConvertGP9ToGPIEInternal();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ConvertGP9ToGPIEInternal;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,25 +5,31 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ConvertInterpolate1ToInterpolate4;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief ConvertInterpolate1ToInterpolate4 covert v0:interpolate into v4::Interpolate.
|
||||
*/
|
||||
class ngraph::pass::ConvertInterpolate1ToInterpolate4 : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ConvertInterpolate1ToInterpolate4 : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ConvertInterpolate1ToInterpolate4", "0");
|
||||
ConvertInterpolate1ToInterpolate4();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ConvertInterpolate1ToInterpolate4;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,21 +5,27 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ConvertMatrixNmsToMatrixNmsIE;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
class ngraph::pass::ConvertMatrixNmsToMatrixNmsIE : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ConvertMatrixNmsToMatrixNmsIE : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ConvertMatrixNmsToMatrixNmsIE", "0");
|
||||
ConvertMatrixNmsToMatrixNmsIE(bool force_i32_output_type = true);
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ConvertMatrixNmsToMatrixNmsIE;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -4,23 +4,29 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ConvertMaxPool8ToMaxPool1;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief ConvertMaxPool8ToMaxPool1 converts v8::MaxPool into v1::MaxPool.
|
||||
*/
|
||||
class ngraph::pass::ConvertMaxPool8ToMaxPool1 : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ConvertMaxPool8ToMaxPool1 : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ConvertMaxPool8ToMaxPool1");
|
||||
ConvertMaxPool8ToMaxPool1();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ConvertMaxPool8ToMaxPool1;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -4,24 +4,30 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ConvertMaxPool1ToMaxPool8;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief ConvertMaxPool1ToMaxPool8 converts v1::MaxPool into v8::MaxPool.
|
||||
*/
|
||||
|
||||
class ngraph::pass::ConvertMaxPool1ToMaxPool8 : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ConvertMaxPool1ToMaxPool8 : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ConvertMaxPool1ToMaxPool8");
|
||||
ConvertMaxPool1ToMaxPool8();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ConvertMaxPool1ToMaxPool8;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,20 +5,26 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ConvertMinimum;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
class ngraph::pass::ConvertMinimum : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ConvertMinimum : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ConvertMinimum", "0");
|
||||
ConvertMinimum();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ConvertMinimum;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
@ -5,20 +5,26 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ConvertMod;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace ov
|
||||
|
||||
class ngraph::pass::ConvertMod : public ngraph::pass::MatcherPass {
|
||||
class ov::pass::ConvertMod : public ov::pass::MatcherPass {
|
||||
public:
|
||||
OPENVINO_RTTI("ConvertMod", "0");
|
||||
ConvertMod();
|
||||
};
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
using ov::pass::ConvertMod;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user