Enable clang for transformations (#10778)
* Enable clang for transformations * Fixed code style * Fixed build * Fixed macOS
This commit is contained in:
@@ -30,7 +30,7 @@ target_link_libraries(${TARGET_NAME}_obj PRIVATE ngraph_reference openvino::itt
|
||||
target_include_directories(${TARGET_NAME}_obj PRIVATE $<BUILD_INTERFACE:${PUBLIC_HEADERS_DIR}>
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/src")
|
||||
|
||||
add_cpplint_target(${TARGET_NAME}_cpplint FOR_TARGETS ${TARGET_NAME}_obj)
|
||||
add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME}_obj)
|
||||
|
||||
ie_mark_target_as_cc(${TARGET_NAME}_obj)
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include "ngraph/coordinate_diff.hpp"
|
||||
@@ -48,7 +47,7 @@ public:
|
||||
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector & new_args) const override;
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
|
||||
int m_center_point_box;
|
||||
bool m_sort_result_descending = true;
|
||||
|
||||
@@ -4,15 +4,25 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
#include "ngraph/op/op.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace op {
|
||||
namespace v8 {
|
||||
|
||||
class MulticlassNms;
|
||||
class MatrixNms;
|
||||
|
||||
} // namespace v8
|
||||
} // namespace op
|
||||
} // namespace ov
|
||||
|
||||
namespace ngraph {
|
||||
namespace op {
|
||||
namespace internal {
|
||||
@@ -31,9 +41,8 @@ public:
|
||||
/// \param boxes Node producing the box coordinates
|
||||
/// \param scores Node producing the box scores
|
||||
/// \param attrs Attributes of the operation
|
||||
NmsStaticShapeIE(const Output<Node>& boxes,
|
||||
const Output<Node>& scores,
|
||||
const Attributes& attrs) : BaseNmsOp(boxes, scores, attrs) {
|
||||
NmsStaticShapeIE(const Output<Node>& boxes, const Output<Node>& scores, const Attributes& attrs)
|
||||
: BaseNmsOp(boxes, scores, attrs) {
|
||||
this->constructor_validate_and_infer_types();
|
||||
}
|
||||
void validate_and_infer_types() override;
|
||||
@@ -42,7 +51,8 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
typedef struct {} init_rt_result;
|
||||
typedef struct {
|
||||
} init_rt_result;
|
||||
|
||||
init_rt_result init_rt_info() {
|
||||
BaseNmsOp::get_rt_info()["opset"] = "ie_internal_opset";
|
||||
@@ -98,7 +108,9 @@ 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(); }
|
||||
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() {
|
||||
@@ -108,14 +120,17 @@ const ::ngraph::Node::type_info_t& NmsStaticShapeIE<BaseNmsOp>::get_type_info_st
|
||||
// but currently it will not pass conversion ot Legacy Opset correctly
|
||||
static const std::string name = BaseNmsOpTypeInfoPtr->name;
|
||||
|
||||
static const ::ngraph::Node::type_info_t type_info_static{
|
||||
name.c_str(), BaseNmsOpTypeInfoPtr->version, "ie_internal_opset", BaseNmsOpTypeInfoPtr};
|
||||
static const ::ngraph::Node::type_info_t type_info_static{name.c_str(),
|
||||
BaseNmsOpTypeInfoPtr->version,
|
||||
"ie_internal_opset",
|
||||
BaseNmsOpTypeInfoPtr};
|
||||
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();
|
||||
const ::ngraph::Node::type_info_t NmsStaticShapeIE<BaseNmsOp>::type_info =
|
||||
NmsStaticShapeIE<BaseNmsOp>::get_type_info_static();
|
||||
#endif
|
||||
|
||||
#ifdef __clang__
|
||||
|
||||
@@ -4,15 +4,14 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/op/convert.hpp>
|
||||
#include <string>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
#include "ngraph/op/op.hpp"
|
||||
#include "ngraph/variant.hpp"
|
||||
|
||||
@@ -24,12 +23,10 @@ class NGRAPH_API TypeRelaxedBase {
|
||||
public:
|
||||
virtual ~TypeRelaxedBase();
|
||||
|
||||
explicit TypeRelaxedBase(
|
||||
const element::TypeVector& _input_data_types = {},
|
||||
const element::TypeVector& _output_data_types = {}) :
|
||||
m_input_data_types(_input_data_types),
|
||||
m_output_data_types(_output_data_types) {
|
||||
}
|
||||
explicit TypeRelaxedBase(const element::TypeVector& _input_data_types = {},
|
||||
const element::TypeVector& _output_data_types = {})
|
||||
: m_input_data_types(_input_data_types),
|
||||
m_output_data_types(_output_data_types) {}
|
||||
|
||||
/// \return Data type that will be set for output with a given index outputIndex.
|
||||
/// If output with a specified index outputIndex hasn't been set before, element::undefined will returned.
|
||||
@@ -83,7 +80,7 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
void remember_input_data_types(Node &node, element::TypeVector &old_input_types) {
|
||||
void remember_input_data_types(Node& node, element::TypeVector& old_input_types) {
|
||||
// Remember all input data types
|
||||
for (size_t i = 0; i < node.get_input_size(); ++i) {
|
||||
old_input_types.push_back(node.get_input_element_type(i));
|
||||
@@ -100,7 +97,7 @@ protected:
|
||||
}
|
||||
}
|
||||
|
||||
void restore_input_data_types(Node &node, const element::TypeVector &old_input_types) {
|
||||
void restore_input_data_types(Node& node, const element::TypeVector& old_input_types) {
|
||||
// Restore original input data types
|
||||
for (size_t i = 0; i < node.get_input_size(); ++i) {
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START
|
||||
@@ -133,9 +130,10 @@ protected:
|
||||
visitor.on_attribute("output_data_types", m_output_data_types);
|
||||
}
|
||||
|
||||
typedef struct {} init_rt_result;
|
||||
typedef struct {
|
||||
} init_rt_result;
|
||||
|
||||
init_rt_result init_rt_info(Node &node) const {
|
||||
init_rt_result init_rt_info(Node& node) const {
|
||||
node.get_rt_info()["opset"] = "type_relaxed_opset";
|
||||
return {};
|
||||
}
|
||||
@@ -200,29 +198,26 @@ public:
|
||||
|
||||
TypeRelaxed() = default;
|
||||
|
||||
TypeRelaxed(
|
||||
const BaseOp& base_op,
|
||||
element::Type overridden_type) :
|
||||
TypeRelaxed(base_op,
|
||||
element::TypeVector(base_op.get_input_size(), overridden_type),
|
||||
element::TypeVector(base_op.get_output_size(), overridden_type)) {
|
||||
}
|
||||
TypeRelaxed(const BaseOp& base_op, element::Type overridden_type)
|
||||
: TypeRelaxed(base_op,
|
||||
element::TypeVector(base_op.get_input_size(), overridden_type),
|
||||
element::TypeVector(base_op.get_output_size(), overridden_type)) {}
|
||||
|
||||
explicit TypeRelaxed(
|
||||
const BaseOp& base_op,
|
||||
const element::TypeVector& _input_data_types = {},
|
||||
const element::TypeVector& _output_data_types = {}) :
|
||||
BaseOp(base_op), TypeRelaxedBase(_input_data_types, _output_data_types) {
|
||||
explicit TypeRelaxed(const BaseOp& base_op,
|
||||
const element::TypeVector& _input_data_types = {},
|
||||
const element::TypeVector& _output_data_types = {})
|
||||
: BaseOp(base_op),
|
||||
TypeRelaxedBase(_input_data_types, _output_data_types) {
|
||||
init();
|
||||
}
|
||||
|
||||
/// Creating a new TypeRelaxed operation by calling one of the original op ctors forwarding arguments directly.
|
||||
template <typename ... Args>
|
||||
TypeRelaxed(
|
||||
const element::TypeVector& _input_data_types,
|
||||
const element::TypeVector& _output_data_types,
|
||||
Args&& ... args) :
|
||||
BaseOp(std::forward<Args>(args)...), TypeRelaxedBase(_input_data_types, _output_data_types) {
|
||||
template <typename... Args>
|
||||
TypeRelaxed(const element::TypeVector& _input_data_types,
|
||||
const element::TypeVector& _output_data_types,
|
||||
Args&&... args)
|
||||
: BaseOp(std::forward<Args>(args)...),
|
||||
TypeRelaxedBase(_input_data_types, _output_data_types) {
|
||||
init();
|
||||
}
|
||||
|
||||
@@ -261,7 +256,7 @@ bool TypeRelaxed<BaseOp>::evaluate(const HostTensorVector& outputs, const HostTe
|
||||
|
||||
convert->set_destination_type(expected_input_type);
|
||||
casted_inputs[i] = std::make_shared<HostTensor>(expected_input_type, inputs[i]->get_shape());
|
||||
if (!convert->evaluate({ casted_inputs[i] }, { inputs[i] })) {
|
||||
if (!convert->evaluate({casted_inputs[i]}, {inputs[i]})) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -273,7 +268,8 @@ bool TypeRelaxed<BaseOp>::evaluate(const HostTensorVector& outputs, const HostTe
|
||||
if (expected_output_type == element::undefined || expected_output_type == m_original_output_data_types[i]) {
|
||||
original_outputs[i] = outputs[i];
|
||||
} else {
|
||||
original_outputs[i] = std::make_shared<HostTensor>(m_original_output_data_types[i], BaseOp::get_output_partial_shape(i));
|
||||
original_outputs[i] =
|
||||
std::make_shared<HostTensor>(m_original_output_data_types[i], BaseOp::get_output_partial_shape(i));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -284,14 +280,16 @@ bool TypeRelaxed<BaseOp>::evaluate(const HostTensorVector& outputs, const HostTe
|
||||
for (size_t i = 0; i < BaseOp::get_output_size(); ++i) {
|
||||
const auto expected_output_type = get_overridden_output_type(i);
|
||||
|
||||
if (expected_output_type != element::undefined && original_outputs[i]->get_element_type() != expected_output_type) {
|
||||
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->set_destination_type(expected_output_type);
|
||||
const auto casted_output = std::make_shared<HostTensor>(expected_output_type, original_outputs[i]->get_shape());
|
||||
if (!convert->evaluate({ outputs[i] }, { original_outputs[i] })) {
|
||||
const auto casted_output =
|
||||
std::make_shared<HostTensor>(expected_output_type, original_outputs[i]->get_shape());
|
||||
if (!convert->evaluate({outputs[i]}, {original_outputs[i]})) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -314,12 +312,12 @@ void TypeRelaxed<BaseOp>::validate_and_infer_types() {
|
||||
restore_input_data_types(*this, old_input_types);
|
||||
}
|
||||
|
||||
|
||||
template <typename BaseOp>
|
||||
std::shared_ptr<Node> TypeRelaxed<BaseOp>::clone_with_new_inputs(const OutputVector& new_args) const {
|
||||
std::lock_guard<std::mutex> lock(type_relax_mutex);
|
||||
// copy then modify inputs
|
||||
std::shared_ptr<Node> new_node = std::make_shared<TypeRelaxed<BaseOp>>((BaseOp&)(*this), m_input_data_types, m_output_data_types);
|
||||
std::shared_ptr<Node> new_node =
|
||||
std::make_shared<TypeRelaxed<BaseOp>>((BaseOp&)(*this), m_input_data_types, m_output_data_types);
|
||||
for (size_t i = 0; i < new_node->get_input_size(); ++i) {
|
||||
new_node->input(i).replace_source_output(new_args[i]);
|
||||
}
|
||||
@@ -336,13 +334,17 @@ bool TypeRelaxed<BaseOp>::visit_attributes(AttributeVisitor& visitor) {
|
||||
}
|
||||
|
||||
template <typename BaseOp>
|
||||
const ::ngraph::Node::type_info_t& TypeRelaxed<BaseOp>::get_type_info() const { return get_type_info_static(); }
|
||||
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};
|
||||
static const ::ngraph::Node::type_info_t type_info_static{baseOpTypeInfoPtr->name,
|
||||
baseOpTypeInfoPtr->version,
|
||||
baseOpTypeInfoPtr->version_id,
|
||||
baseOpTypeInfoPtr};
|
||||
return type_info_static;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,12 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -26,7 +24,7 @@ class TRANSFORMATIONS_API AddFakeQuantizeFusion;
|
||||
* Restrictions:
|
||||
* - second input to Add is a Constant
|
||||
*/
|
||||
class ngraph::pass::AddFakeQuantizeFusion: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::AddFakeQuantizeFusion : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
AddFakeQuantizeFusion();
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@@ -15,7 +15,7 @@
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API AlignEltwiseInputRanks: public MatcherPass {
|
||||
class TRANSFORMATIONS_API AlignEltwiseInputRanks : public MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
AlignEltwiseInputRanks();
|
||||
|
||||
@@ -4,12 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -30,7 +28,7 @@ class TRANSFORMATIONS_API BatchToSpaceFusion;
|
||||
* - DepthToSpaceMode must be BLOCKS_FIRST
|
||||
*/
|
||||
|
||||
class ngraph::pass::BatchToSpaceFusion: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::BatchToSpaceFusion : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
BatchToSpaceFusion();
|
||||
|
||||
@@ -4,17 +4,18 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API BinarizeWeights;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
||||
// clang-format off
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief This transformation converts weights to -1/+1 form
|
||||
@@ -71,6 +72,7 @@ class TRANSFORMATIONS_API BinarizeWeights;
|
||||
* Normalization factors are chosen based output_high value.
|
||||
* If it's zero - norm factor is equal to output_low and output_high otherwise
|
||||
*/
|
||||
// clang-format on
|
||||
|
||||
class ngraph::pass::BinarizeWeights : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/ngraph.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include "ngraph/pattern/matcher.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
@@ -24,7 +24,7 @@ class TRANSFORMATIONS_API BroadcastElementwiseFusion;
|
||||
* are equal neighboring input shape of ElementWise.
|
||||
*/
|
||||
|
||||
class ngraph::pass::BroadcastElementwiseFusion: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::BroadcastElementwiseFusion : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
BroadcastElementwiseFusion();
|
||||
|
||||
@@ -4,12 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -28,7 +26,7 @@ class TRANSFORMATIONS_API ClampFusion;
|
||||
* - one of the parameters to Minimum is a scalar constant
|
||||
*/
|
||||
|
||||
class ngraph::pass::ClampFusion: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::ClampFusion : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ClampFusion();
|
||||
|
||||
@@ -4,13 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -20,7 +17,7 @@ class TRANSFORMATIONS_API CommonOptimizations;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
||||
class ngraph::pass::CommonOptimizations: public ngraph::pass::FunctionPass {
|
||||
class ngraph::pass::CommonOptimizations : public ngraph::pass::FunctionPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
bool run_on_model(const std::shared_ptr<ngraph::Function>& f) override;
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "transformations_visibility.hpp"
|
||||
#include "openvino/pass/graph_rewrite.hpp"
|
||||
#include "transformations_visibility.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -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 ngraph::pass::PullSqueezeThroughEltwise : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
PullSqueezeThroughEltwise();
|
||||
@@ -74,7 +74,7 @@ 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 ngraph::pass::ConcatReduceFusion : public ngraph::pass::GraphRewrite {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConcatReduceFusion();
|
||||
|
||||
@@ -4,12 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <functional>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -22,25 +20,25 @@ class TRANSFORMATIONS_API GroupConvolutionBackpropDataMultiplyFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
||||
class ngraph::pass::ConvolutionMultiplyFusion: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::ConvolutionMultiplyFusion : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvolutionMultiplyFusion();
|
||||
};
|
||||
|
||||
class ngraph::pass::GroupConvolutionMultiplyFusion: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::GroupConvolutionMultiplyFusion : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
GroupConvolutionMultiplyFusion();
|
||||
};
|
||||
|
||||
class ngraph::pass::ConvolutionBackpropDataMultiplyFusion: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::ConvolutionBackpropDataMultiplyFusion : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvolutionBackpropDataMultiplyFusion();
|
||||
};
|
||||
|
||||
class ngraph::pass::GroupConvolutionBackpropDataMultiplyFusion: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::GroupConvolutionBackpropDataMultiplyFusion : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
GroupConvolutionBackpropDataMultiplyFusion();
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ConvToBinaryConv;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -25,7 +25,7 @@ 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 ngraph::pass::ConvertNmsGatherPathToUnsigned : public ngraph::pass::GraphRewrite {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvertNmsGatherPathToUnsigned();
|
||||
|
||||
@@ -4,12 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -30,7 +28,7 @@ class TRANSFORMATIONS_API ConvertQuantizeDequantize;
|
||||
* - 'zero_point' and 'scale' must be broadcastable to FakeQuantize's output
|
||||
*/
|
||||
|
||||
class ngraph::pass::ConvertQuantizeDequantize: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::ConvertQuantizeDequantize : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvertQuantizeDequantize();
|
||||
|
||||
@@ -4,17 +4,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API DepthToSpaceFusion;
|
||||
class TRANSFORMATIONS_API DepthToSpaceFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
@@ -41,7 +39,7 @@ namespace pass {
|
||||
*
|
||||
*/
|
||||
|
||||
class ngraph::pass::DepthToSpaceFusion: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::DepthToSpaceFusion : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
DepthToSpaceFusion();
|
||||
|
||||
@@ -4,12 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -28,7 +26,7 @@ class TRANSFORMATIONS_API DilatedConvolutionConverter;
|
||||
* - pads in SpaceToBatch must have 0 on first and second position
|
||||
*/
|
||||
|
||||
class ngraph::pass::DilatedConvolutionConverter: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::DilatedConvolutionConverter : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
DilatedConvolutionConverter();
|
||||
|
||||
@@ -5,11 +5,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <openvino/opsets/opset1.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
using P2Btype = std::unordered_map<std::shared_ptr<ov::opset1::Parameter>, std::unordered_set<size_t>>;
|
||||
|
||||
@@ -21,11 +19,14 @@ class TRANSFORMATIONS_API FindBatch;
|
||||
} // namespace pass
|
||||
} // namespace ov
|
||||
|
||||
class ov::pass::FindBatch: public ov::pass::ModelPass {
|
||||
class ov::pass::FindBatch : public ov::pass::ModelPass {
|
||||
public:
|
||||
OPENVINO_RTTI("FindBatch");
|
||||
FindBatch(bool detach_detection_output = false, bool track = true) : track(track), detach_do(detach_detection_output) {}
|
||||
FindBatch(bool detach_detection_output = false, bool track = true)
|
||||
: track(track),
|
||||
detach_do(detach_detection_output) {}
|
||||
bool run_on_model(const std::shared_ptr<ov::Model>& m) override;
|
||||
|
||||
protected:
|
||||
bool track = true, detach_do = false;
|
||||
};
|
||||
@@ -34,14 +35,19 @@ namespace ov {
|
||||
class DimensionTracker;
|
||||
|
||||
namespace batch_util {
|
||||
void mark_batch(const std::shared_ptr<ov::opset1::Parameter> ¶meter, P2Btype &map, const std::unordered_set<size_t> &batches);
|
||||
void mark_no_batch(const std::shared_ptr<ov::opset1::Parameter> ¶meter, P2Btype &map);
|
||||
void mark_layout_independent_batch(const std::shared_ptr<ov::opset1::Parameter> ¶meter, const std::shared_ptr<ov::Node> & result, P2Btype &map);
|
||||
void mark_with_unique_dimension_labels(const std::shared_ptr<Model> &m, const ov::DimensionTracker &dt);
|
||||
void restore_original_dimensions(
|
||||
const std::map<std::shared_ptr<ov::opset1::Parameter>, ov::PartialShape>& parameter_to_shape, bool leave_batch_dynamic = true);
|
||||
bool check_batch_tracks_through_all_the_nodes(const std::shared_ptr<ov::Model>& m);
|
||||
P2Btype find_batch(const std::shared_ptr<ov::Model> &m);
|
||||
bool detach_detection_output(const std::shared_ptr<ov::Model>& f);
|
||||
} // namespace batch_util
|
||||
} // namespace ov
|
||||
void mark_batch(const std::shared_ptr<ov::opset1::Parameter>& parameter,
|
||||
P2Btype& map,
|
||||
const std::unordered_set<size_t>& batches);
|
||||
void mark_no_batch(const std::shared_ptr<ov::opset1::Parameter>& parameter, P2Btype& map);
|
||||
void mark_layout_independent_batch(const std::shared_ptr<ov::opset1::Parameter>& parameter,
|
||||
const std::shared_ptr<ov::Node>& result,
|
||||
P2Btype& map);
|
||||
void mark_with_unique_dimension_labels(const std::shared_ptr<Model>& m, const ov::DimensionTracker& dt);
|
||||
void restore_original_dimensions(
|
||||
const std::map<std::shared_ptr<ov::opset1::Parameter>, ov::PartialShape>& parameter_to_shape,
|
||||
bool leave_batch_dynamic = true);
|
||||
bool check_batch_tracks_through_all_the_nodes(const std::shared_ptr<ov::Model>& m);
|
||||
P2Btype find_batch(const std::shared_ptr<ov::Model>& m);
|
||||
bool detach_detection_output(const std::shared_ptr<ov::Model>& f);
|
||||
} // namespace batch_util
|
||||
} // namespace ov
|
||||
|
||||
@@ -5,10 +5,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
|
||||
@@ -5,10 +5,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -18,8 +16,7 @@ class TRANSFORMATIONS_API DisableShapeOfConstantFolding;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
||||
|
||||
class ngraph::pass::DisableShapeOfConstantFolding: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::DisableShapeOfConstantFolding : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
DisableShapeOfConstantFolding();
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <utility>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <utility>
|
||||
|
||||
#include "ngraph/pattern/matcher.hpp"
|
||||
|
||||
namespace ov {
|
||||
@@ -24,11 +24,11 @@ class TRANSFORMATIONS_API DivisionByZeroFP16Resolver;
|
||||
* @brief: clamps eps into fp16 minimal normalized value in input_1/Maximum(input_2, eps); input_1/Add(input_2, eps);
|
||||
* and input_1*Pow(Maximum[Add](input_2, eps), -z) patterns to prevent division by zero.
|
||||
*
|
||||
* eps must be always nonzero to prevent from NaNs in such expressions if input_1 and input_2 simultaneously happened to 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.
|
||||
* eps must be always nonzero to prevent from NaNs in such expressions if input_1 and input_2 simultaneously happened to
|
||||
* 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 ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
DivisionByZeroFP16Resolver();
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/ngraph.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include "ngraph/pattern/matcher.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
|
||||
@@ -5,19 +5,17 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API FakeQuantizeMulFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
@@ -28,6 +26,6 @@ class TRANSFORMATIONS_API FakeQuantizeMulFusion;
|
||||
|
||||
class ngraph::pass::FakeQuantizeMulFusion : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
FakeQuantizeMulFusion();
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
FakeQuantizeMulFusion();
|
||||
};
|
||||
|
||||
@@ -5,19 +5,17 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API FakeQuantizeReshapeFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
|
||||
@@ -5,10 +5,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -27,7 +26,7 @@ class TRANSFORMATIONS_API HSigmoidFusionWithClampDiv;
|
||||
* @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 ngraph::pass::HSigmoidFusionWithReluDiv : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
HSigmoidFusionWithReluDiv();
|
||||
@@ -37,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 ngraph::pass::HSigmoidFusionWithReluMul : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
HSigmoidFusionWithReluMul();
|
||||
@@ -47,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 ngraph::pass::HSigmoidFusionWithoutRelu : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
HSigmoidFusionWithoutRelu();
|
||||
@@ -57,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 ngraph::pass::HSigmoidFusionWithClampMul : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
HSigmoidFusionWithClampMul();
|
||||
@@ -67,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 ngraph::pass::HSigmoidFusionWithClampDiv : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
HSigmoidFusionWithClampDiv();
|
||||
@@ -77,7 +76,7 @@ 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 ngraph::pass::HSigmoidFusion : public ngraph::pass::GraphRewrite {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
HSigmoidFusion() {
|
||||
|
||||
@@ -5,10 +5,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -22,12 +21,11 @@ class TRANSFORMATIONS_API HSwishFusionWithClamp;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
||||
|
||||
/**
|
||||
* @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 ngraph::pass::HSwishFusionWithReluDiv : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
HSwishFusionWithReluDiv();
|
||||
@@ -37,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 ngraph::pass::HSwishFusionWithReluMul : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
HSwishFusionWithReluMul();
|
||||
@@ -47,18 +45,17 @@ 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 ngraph::pass::HSwishFusionWithHSigmoid : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
HSwishFusionWithHSigmoid();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @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 ngraph::pass::HSwishFusionWithClamp : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
HSwishFusionWithClamp();
|
||||
@@ -68,7 +65,7 @@ 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 ngraph::pass::HSwishFusion : public ngraph::pass::GraphRewrite {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
HSwishFusion() {
|
||||
|
||||
@@ -4,13 +4,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/ngraph.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
#include "ngraph/pattern/matcher.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
|
||||
@@ -4,12 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -25,7 +23,7 @@ class TRANSFORMATIONS_API LeakyReluFusion;
|
||||
* Multiply->Maximum to LeakyRelu
|
||||
*/
|
||||
|
||||
class ngraph::pass::LeakyReluFusion: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::LeakyReluFusion : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
LeakyReluFusion();
|
||||
|
||||
@@ -5,10 +5,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -21,19 +20,19 @@ class TRANSFORMATIONS_API MultiplyMultiplyFusion;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
||||
class ngraph::pass::AddMultiplyFusion: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::AddMultiplyFusion : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
AddMultiplyFusion();
|
||||
};
|
||||
|
||||
class ngraph::pass::AddAddFusion: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::AddAddFusion : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
AddAddFusion();
|
||||
};
|
||||
|
||||
class ngraph::pass::MultiplyMultiplyFusion: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::MultiplyMultiplyFusion : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
MultiplyMultiplyFusion();
|
||||
@@ -43,7 +42,7 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief LinOpSequenceFusion transformation fuses linear operation sequence.
|
||||
*/
|
||||
class ngraph::pass::LinOpSequenceFusion: public ngraph::pass::GraphRewrite {
|
||||
class ngraph::pass::LinOpSequenceFusion : public ngraph::pass::GraphRewrite {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
LinOpSequenceFusion() {
|
||||
|
||||
@@ -4,18 +4,19 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief Resolves transpose_b key from MatMul operation if corresponding input is constant or FakeQuantize by inserting Transpose
|
||||
* @brief Resolves transpose_b key from MatMul operation if corresponding input is constant or FakeQuantize by inserting
|
||||
* Transpose
|
||||
*/
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API MatMulConstTransposesExtraction: public MatcherPass {
|
||||
class TRANSFORMATIONS_API MatMulConstTransposesExtraction : public MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
MatMulConstTransposesExtraction();
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -57,7 +56,7 @@ class TRANSFORMATIONS_API MatMulMultiplyFusion;
|
||||
* | MatMul |
|
||||
* +--------+
|
||||
*/
|
||||
class ngraph::pass::MatMulMultiplyFusion: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::MatMulMultiplyFusion : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
MatMulMultiplyFusion();
|
||||
|
||||
@@ -4,13 +4,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/ngraph.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
#include "ngraph/pattern/matcher.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
@@ -26,7 +25,7 @@ class TRANSFORMATIONS_API MishFusion;
|
||||
* @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 ngraph::pass::MishFusion : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
MishFusion();
|
||||
|
||||
@@ -5,10 +5,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -24,7 +22,7 @@ class TRANSFORMATIONS_API MOCTransformations;
|
||||
* with transformations pipeline but now it remains empty.
|
||||
*/
|
||||
|
||||
class ngraph::pass::MOCTransformations: public ngraph::pass::FunctionPass {
|
||||
class ngraph::pass::MOCTransformations : public ngraph::pass::FunctionPass {
|
||||
bool m_use_shapes;
|
||||
bool m_low_precision_enabled;
|
||||
|
||||
@@ -38,7 +36,8 @@ public:
|
||||
* low_precision sub-graphs as is.
|
||||
*/
|
||||
explicit MOCTransformations(bool use_shapes, bool low_precision_enabled = true)
|
||||
: m_use_shapes(use_shapes), m_low_precision_enabled(low_precision_enabled) {}
|
||||
: m_use_shapes(use_shapes),
|
||||
m_low_precision_enabled(low_precision_enabled) {}
|
||||
|
||||
bool run_on_model(const std::shared_ptr<ngraph::Function>& m) override;
|
||||
};
|
||||
|
||||
@@ -4,12 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <functional>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -73,31 +71,31 @@ class TRANSFORMATIONS_API MultiplyGroupConvolutionBackpropDataFusion;
|
||||
* Restrictions:
|
||||
* - weights' shape is static
|
||||
* - if the constant input to Multiply has the same rank as 'input', the constant first dimension has to be 1
|
||||
* - constant input to Multiply has to be broadcastable to weights when 'Convolution Op' is either Convolution or GroupConvolution
|
||||
* - shape of a constant input to Multiply has to be in one of following forms: (1), (1, 1, ..., 1), (C, 1, ..., 1), (1, C, 1, ..., 1)
|
||||
* when 'Convolution Op' is either ConvolutionBackpropData or GroupConvolutionBackpropData
|
||||
* - constant input to Multiply has to be broadcastable to weights when 'Convolution Op' is either Convolution or
|
||||
* GroupConvolution
|
||||
* - shape of a constant input to Multiply has to be in one of following forms: (1), (1, 1, ..., 1), (C, 1, ..., 1), (1,
|
||||
* C, 1, ..., 1) when 'Convolution Op' is either ConvolutionBackpropData or GroupConvolutionBackpropData
|
||||
*/
|
||||
|
||||
|
||||
class ngraph::pass::MultiplyConvolutionFusion: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::MultiplyConvolutionFusion : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
MultiplyConvolutionFusion();
|
||||
};
|
||||
|
||||
class ngraph::pass::MultiplyGroupConvolutionFusion: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::MultiplyGroupConvolutionFusion : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
MultiplyGroupConvolutionFusion();
|
||||
};
|
||||
|
||||
class ngraph::pass::MultiplyConvolutionBackpropDataFusion: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::MultiplyConvolutionBackpropDataFusion : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
MultiplyConvolutionBackpropDataFusion();
|
||||
};
|
||||
|
||||
class ngraph::pass::MultiplyGroupConvolutionBackpropDataFusion: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::MultiplyGroupConvolutionBackpropDataFusion : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
MultiplyGroupConvolutionBackpropDataFusion();
|
||||
|
||||
@@ -4,12 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -26,7 +24,7 @@ class TRANSFORMATIONS_API MulFakeQuantizeFusion;
|
||||
* Restrictions:
|
||||
* - second input to Mul is a Constant
|
||||
*/
|
||||
class ngraph::pass::MulFakeQuantizeFusion: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::MulFakeQuantizeFusion : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
MulFakeQuantizeFusion();
|
||||
|
||||
@@ -4,13 +4,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/ngraph.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
#include "ngraph/pattern/matcher.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
@@ -37,7 +36,8 @@ public:
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief MVNFusion transformation replaces group of
|
||||
* operations: gamma * (x - ReduceMean(x, axes)) / (Sqrt(ReduceMean((x - ReduceMean(x, axes)) ^ 2)) + eps) + beta to MVN op.
|
||||
* 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 {
|
||||
public:
|
||||
@@ -49,7 +49,7 @@ 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 ngraph::pass::MVNFusion : public ngraph::pass::GraphRewrite {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
MVNFusion() {
|
||||
|
||||
@@ -4,13 +4,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/ngraph.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
|
||||
@@ -4,13 +4,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/ngraph.hpp>
|
||||
#include <ngraph/pass/pass.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -32,7 +30,7 @@ class TRANSFORMATIONS_API NopElimination;
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief EliminatePad eliminates pad that does nothing
|
||||
*/
|
||||
class ngraph::pass::EliminatePad: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::EliminatePad : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
EliminatePad();
|
||||
@@ -42,7 +40,7 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief EliminateConvert eliminates convert that does nothing
|
||||
*/
|
||||
class ngraph::pass::EliminateConvert: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::EliminateConvert : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
EliminateConvert();
|
||||
@@ -52,7 +50,7 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief EliminateConvertNonZero eliminates convert before NonZero
|
||||
*/
|
||||
class ngraph::pass::EliminateConvertNonZero: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::EliminateConvertNonZero : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
EliminateConvertNonZero();
|
||||
@@ -62,7 +60,7 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief EliminateConcat eliminates concat that does nothing
|
||||
*/
|
||||
class ngraph::pass::EliminateConcat: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::EliminateConcat : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
EliminateConcat();
|
||||
@@ -72,7 +70,7 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief EliminateSplit eliminates split that does nothing
|
||||
*/
|
||||
class ngraph::pass::EliminateSplit: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::EliminateSplit : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
EliminateSplit();
|
||||
@@ -92,7 +90,7 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief EliminateTranspose eliminates transpose that does nothing
|
||||
*/
|
||||
class ngraph::pass::EliminateTranspose: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::EliminateTranspose : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
EliminateTranspose();
|
||||
@@ -102,13 +100,13 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief EliminateEltwise eliminates eltwise ops that do nothing
|
||||
*/
|
||||
class ngraph::pass::EliminateEltwise: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::EliminateEltwise : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
EliminateEltwise();
|
||||
};
|
||||
|
||||
class ngraph::pass::NopElimination: public GraphRewrite {
|
||||
class ngraph::pass::NopElimination : public GraphRewrite {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
NopElimination(bool use_shape_for_elimination = true);
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <utility>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <utility>
|
||||
|
||||
#include "ngraph/pattern/matcher.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
@@ -25,7 +25,7 @@ class TRANSFORMATIONS_API NormalizeL2Fusion;
|
||||
* x/(max(sqrt(sum(x[j0, ..., jN]**2), eps)) with a NormalizeL2 op.
|
||||
* x/(add(sqrt(sum(x[j0, ..., jN]**2), eps)) with a NormalizeL2 op.
|
||||
*/
|
||||
class ngraph::pass::NormalizeL2Fusion: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::NormalizeL2Fusion : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
NormalizeL2Fusion();
|
||||
|
||||
@@ -4,15 +4,13 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/opsets/opset1.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <ngraph/slice_plan.hpp>
|
||||
#include <ngraph/util.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -25,13 +23,12 @@ class TRANSFORMATIONS_API GroupedStridedSliceOptimizer;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
||||
|
||||
/**
|
||||
* @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 ngraph::pass::UselessStridedSliceEraser : public ngraph::pass::FunctionPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
bool run_on_model(const std::shared_ptr<ngraph::Function>& m) override;
|
||||
@@ -43,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 ngraph::pass::SharedStridedSliceEraser : public ngraph::pass::FunctionPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
bool run_on_model(const std::shared_ptr<ngraph::Function>& m) override;
|
||||
@@ -55,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 ngraph::pass::GroupedStridedSliceOptimizer : public ngraph::pass::FunctionPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
bool run_on_model(const std::shared_ptr<ngraph::Function>& m) override;
|
||||
@@ -66,7 +63,7 @@ public:
|
||||
* @brief StridedSliceOptimization transformation executes all transformations
|
||||
* related to StridedSlice optimizations.
|
||||
*/
|
||||
class ngraph::pass::StridedSliceOptimization: public ngraph::pass::FunctionPass {
|
||||
class ngraph::pass::StridedSliceOptimization : public ngraph::pass::FunctionPass {
|
||||
public:
|
||||
StridedSliceOptimization(bool use_shapes = true);
|
||||
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -29,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 ngraph::pass::PadFusionAvgPool : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
PadFusionAvgPool();
|
||||
@@ -42,7 +41,7 @@ public:
|
||||
* - pad mode is op::PadMode::CONSTANT
|
||||
* - pad value is 0
|
||||
*/
|
||||
class ngraph::pass::PadFusionConvolution: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::PadFusionConvolution : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
PadFusionConvolution();
|
||||
@@ -56,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 ngraph::pass::PadFusionConvolutionBackpropData : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
PadFusionConvolutionBackpropData();
|
||||
@@ -69,7 +68,7 @@ public:
|
||||
* - pad mode is op::PadMode::CONSTANT
|
||||
* - pad value is 0
|
||||
*/
|
||||
class ngraph::pass::PadFusionGroupConvolution: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::PadFusionGroupConvolution : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
PadFusionGroupConvolution();
|
||||
@@ -83,13 +82,13 @@ public:
|
||||
* - pad value is 0
|
||||
* - pads in GroupConvolutionBackpropData are greater than pads in Pad node
|
||||
*/
|
||||
class ngraph::pass::PadFusionGroupConvolutionBackpropData: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::PadFusionGroupConvolutionBackpropData : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
PadFusionGroupConvolutionBackpropData();
|
||||
};
|
||||
|
||||
class ngraph::pass::PadFusion: public ngraph::pass::GraphRewrite {
|
||||
class ngraph::pass::PadFusion : public ngraph::pass::GraphRewrite {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
PadFusion() {
|
||||
|
||||
@@ -4,12 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -19,7 +17,7 @@ class TRANSFORMATIONS_API PullTransposeThroughFQUp;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
||||
class ngraph::pass::PullTransposeThroughFQUp: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::PullTransposeThroughFQUp : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
PullTransposeThroughFQUp();
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -24,7 +23,7 @@ class TRANSFORMATIONS_API ReluFakeQuantizeFusion;
|
||||
* - 'input_low' has non negative values
|
||||
*/
|
||||
|
||||
class ngraph::pass::ReluFakeQuantizeFusion: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::ReluFakeQuantizeFusion : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ReluFakeQuantizeFusion();
|
||||
|
||||
@@ -4,11 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
@@ -24,7 +23,7 @@ class TRANSFORMATIONS_API RemoveConcatZeroDimInput;
|
||||
* removes input of Concat if the tensor size is equal to 0
|
||||
*/
|
||||
|
||||
class ov::pass::RemoveConcatZeroDimInput: public ov::pass::MatcherPass {
|
||||
class ov::pass::RemoveConcatZeroDimInput : public ov::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
RemoveConcatZeroDimInput();
|
||||
|
||||
@@ -4,12 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -20,13 +18,13 @@ class TRANSFORMATIONS_API RemoveFilteringBoxesBySize;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
||||
class ngraph::pass::FuseFilteringBoxesBySize: public ngraph::pass::GraphRewrite {
|
||||
class ngraph::pass::FuseFilteringBoxesBySize : public ngraph::pass::GraphRewrite {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
FuseFilteringBoxesBySize();
|
||||
};
|
||||
|
||||
class ngraph::pass::RemoveFilteringBoxesBySize: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::RemoveFilteringBoxesBySize : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
RemoveFilteringBoxesBySize();
|
||||
|
||||
@@ -4,11 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <openvino/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
@@ -25,7 +24,7 @@ class TRANSFORMATIONS_API RemoveMultiSubGraphOpDanglingParams;
|
||||
* in the bodies of a MultiSubGraphOp
|
||||
*/
|
||||
|
||||
class ov::pass::RemoveMultiSubGraphOpDanglingParams: public ov::pass::MatcherPass {
|
||||
class ov::pass::RemoveMultiSubGraphOpDanglingParams : public ov::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
RemoveMultiSubGraphOpDanglingParams();
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -18,10 +17,11 @@ class TRANSFORMATIONS_API ReshapeSequenceFusion;
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief ReshapeSequenceFusion fuses sequence of Reshape operation into single Reshape or eliminates full redundant sequence
|
||||
* @brief ReshapeSequenceFusion fuses sequence of Reshape operation into single Reshape or eliminates full redundant
|
||||
* sequence
|
||||
*/
|
||||
|
||||
class ngraph::pass::ReshapeSequenceFusion: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::ReshapeSequenceFusion : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ReshapeSequenceFusion(bool use_shape_for_elimination = true);
|
||||
|
||||
@@ -4,11 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <openvino/pass/pass.hpp>
|
||||
#include <openvino/core/model.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <openvino/core/model.hpp>
|
||||
#include <openvino/pass/pass.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -23,8 +22,8 @@ class TRANSFORMATIONS_API ReverseInputChannelsFusion;
|
||||
* @brief ReverseInputChannelsFusion
|
||||
*/
|
||||
|
||||
class ngraph::pass::ReverseInputChannelsFusion: public ov::pass::ModelPass {
|
||||
class ngraph::pass::ReverseInputChannelsFusion : public ov::pass::ModelPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
bool run_on_model(const std::shared_ptr<ov::Model> &) override;
|
||||
bool run_on_model(const std::shared_ptr<ov::Model>&) override;
|
||||
};
|
||||
|
||||
@@ -4,17 +4,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
|
||||
class TRANSFORMATIONS_API ShuffleChannelsFusion;
|
||||
class TRANSFORMATIONS_API ShuffleChannelsFusion;
|
||||
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
||||
@@ -4,15 +4,13 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/opsets/opset1.hpp>
|
||||
#include <ngraph/opsets/opset3.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <ngraph/util.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -27,14 +25,13 @@ class TRANSFORMATIONS_API SimplifySecondInputOfReshape;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief SharedShapeOf transformation replaces group of ShapeOf
|
||||
* 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 ngraph::pass::SharedShapeOf : public ngraph::pass::FunctionPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
bool run_on_model(const std::shared_ptr<ngraph::Function>& m) override;
|
||||
@@ -46,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 ngraph::pass::GroupedGatherElimination : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
GroupedGatherElimination();
|
||||
@@ -56,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 ngraph::pass::SimplifyShapeOfSubGraph : public ngraph::pass::FunctionPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
bool run_on_model(const std::shared_ptr<ngraph::Function>& m) override;
|
||||
@@ -66,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 ngraph::pass::GatherNopElimination : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
GatherNopElimination();
|
||||
@@ -78,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 ngraph::pass::SimplifyGatherShapeOf : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
SimplifyGatherShapeOf();
|
||||
|
||||
@@ -19,7 +19,7 @@ class TRANSFORMATIONS_API SkipGatherBeforeTransposeAndReshape;
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief SkipGatherBeforeTransposeAndReshape transformation removes Gather from the Gather->Transpose->Reshape sequence
|
||||
* @brief SkipGatherBeforeTransposeAndReshape transformation removes Gather from the Gather->Transpose->Reshape sequence
|
||||
* 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.
|
||||
*/
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -70,7 +69,7 @@ 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 ngraph::pass::SoftmaxFusion : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
SoftmaxFusion();
|
||||
|
||||
@@ -4,11 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -23,7 +22,7 @@ class TRANSFORMATIONS_API SoftPlusFusion;
|
||||
* @brief SoftPlusFusion transformation replaces group of
|
||||
* operations: log(exp(x) + 1) to SoftPlus op.
|
||||
*/
|
||||
class ngraph::pass::SoftPlusFusion: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::SoftPlusFusion : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
SoftPlusFusion();
|
||||
|
||||
@@ -4,13 +4,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/ngraph.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
#include "ngraph/pattern/matcher.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
@@ -26,7 +25,7 @@ class TRANSFORMATIONS_API SoftPlusToMishFusion;
|
||||
* @brief SoftPlusToMishFusion transformation replaces group of
|
||||
* operations: x * tanh(softplus(x)) to Mish op.
|
||||
*/
|
||||
class ngraph::pass::SoftPlusToMishFusion: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::SoftPlusToMishFusion : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
SoftPlusToMishFusion();
|
||||
|
||||
@@ -4,12 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -31,7 +29,7 @@ class TRANSFORMATIONS_API SpaceToBatchFusion;
|
||||
* - SpaceToDepthMode must be BLOCKS_FIRST
|
||||
*/
|
||||
|
||||
class ngraph::pass::SpaceToBatchFusion: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::SpaceToBatchFusion : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
SpaceToBatchFusion();
|
||||
|
||||
@@ -4,13 +4,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/ngraph.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
#include "ngraph/pattern/matcher.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
|
||||
@@ -4,13 +4,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/ngraph.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
#include "ngraph/pattern/matcher.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <ngraph/util.hpp>
|
||||
#include <ngraph/pass/pass.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <ngraph/pass/pass.hpp>
|
||||
#include <ngraph/util.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -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 ngraph::pass::ConvStridesPropagation : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvStridesPropagation();
|
||||
@@ -35,10 +35,11 @@ public:
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief SupportedNodesStridesPropagation either propagates stride (greater than 1) from current node up through the graph
|
||||
* or inserts pooling between current node and its consumers if the consumers have different StridesProp attributes.
|
||||
* @brief SupportedNodesStridesPropagation either propagates stride (greater than 1) from current node up through the
|
||||
* 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 ngraph::pass::SupportedNodesStridesPropagation : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
SupportedNodesStridesPropagation();
|
||||
@@ -49,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 ngraph::pass::UnsupportedNodesStridesPropagation : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
UnsupportedNodesStridesPropagation();
|
||||
@@ -57,9 +58,10 @@ public:
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief StridesOptimization transformation works backward on function and propagates strides up through the graph if possible
|
||||
* @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 ngraph::pass::StridesOptimization : public ngraph::pass::BackwardGraphRewrite {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
StridesOptimization() {
|
||||
|
||||
@@ -5,10 +5,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -26,7 +25,7 @@ class TRANSFORMATIONS_API SwishFusionWithoutBeta;
|
||||
* @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 ngraph::pass::SwishFusionWithSigmoid : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
SwishFusionWithSigmoid();
|
||||
@@ -36,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 ngraph::pass::SwishFusionWithSigmoidWithBeta : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
SwishFusionWithSigmoidWithBeta();
|
||||
@@ -46,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 ngraph::pass::SwishFusionWithBeta : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
SwishFusionWithBeta();
|
||||
@@ -56,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 ngraph::pass::SwishFusionWithoutBeta : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
SwishFusionWithoutBeta();
|
||||
@@ -66,7 +65,7 @@ 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 ngraph::pass::SwishFusion : public ngraph::pass::GraphRewrite {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
SwishFusion() {
|
||||
|
||||
@@ -4,12 +4,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include "transformations_visibility.hpp"
|
||||
#include <vector>
|
||||
|
||||
#include "ngraph/pass/graph_rewrite.hpp"
|
||||
#include "transformations_visibility.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -25,7 +24,7 @@ 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 ngraph::pass::TransposeReshapeEliminationForMatmul : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
TransposeReshapeEliminationForMatmul();
|
||||
|
||||
@@ -4,13 +4,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/ngraph.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
#include "ngraph/pattern/matcher.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
@@ -38,7 +37,8 @@ public:
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief TransposeFQReduction transformation sinks Transpose through FakeQuantize in case it is followed by reduction or squeeze
|
||||
* @brief TransposeFQReduction transformation sinks Transpose through FakeQuantize in case it is followed by reduction
|
||||
* or squeeze
|
||||
*/
|
||||
class ngraph::pass::TransposeFQReduction : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
@@ -68,8 +68,8 @@ public:
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @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
|
||||
* @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 {
|
||||
public:
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief TransposeSinking transformation sinks Transposes through known operations
|
||||
*/
|
||||
class ngraph::pass::TransposeSinking: public ngraph::pass::GraphRewrite {
|
||||
class ngraph::pass::TransposeSinking : public ngraph::pass::GraphRewrite {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
TransposeSinking() {
|
||||
|
||||
@@ -4,13 +4,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/ngraph.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
#include "ngraph/pattern/matcher.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
|
||||
@@ -4,11 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -26,7 +25,7 @@ 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 ngraph::pass::WeightsDequantizeToFakeQuantize : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
WeightsDequantizeToFakeQuantize();
|
||||
|
||||
@@ -4,11 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -33,7 +32,7 @@ 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 ngraph::pass::WrapInterpolateIntoTransposes : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
WrapInterpolateIntoTransposes();
|
||||
|
||||
@@ -15,12 +15,14 @@ class TRANSFORMATIONS_API UnrollIf;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
||||
// clang-format off
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief The transformation replaces 'If' operations with one of the internal functions (bodies) if the provided condition is constant.
|
||||
* The condition is true: 'If' op is replaced with then_body
|
||||
* The condition is false 'If' op is replaced with else_body
|
||||
*/
|
||||
// clang-format on
|
||||
|
||||
class ngraph::pass::UnrollIf : public ngraph::pass::FunctionPass {
|
||||
public:
|
||||
|
||||
@@ -4,12 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -27,7 +25,7 @@ class TRANSFORMATIONS_API UnrollTensorIterator;
|
||||
* are added to the network.
|
||||
*/
|
||||
|
||||
class ngraph::pass::UnrollTensorIterator: public ngraph::pass::FunctionPass {
|
||||
class ngraph::pass::UnrollTensorIterator : public ngraph::pass::FunctionPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
bool run_on_model(const std::shared_ptr<ngraph::Function>& m) override;
|
||||
|
||||
@@ -4,19 +4,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <algorithm>
|
||||
#include <unordered_map>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/pass.hpp>
|
||||
#include <memory>
|
||||
#include <ngraph/opsets/opset3.hpp>
|
||||
#include <ngraph/validation_util.hpp>
|
||||
#include <ngraph/rt_info.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
|
||||
#include <ngraph/pass/pass.hpp>
|
||||
#include <ngraph/rt_info.hpp>
|
||||
#include <ngraph/validation_util.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -71,23 +68,28 @@ class NGRAPH_API ConvertPrecision;
|
||||
* LessEqual
|
||||
*/
|
||||
|
||||
using type_to_fuse_map = std::unordered_map<ngraph::NodeTypeInfo, std::function<bool(const std::shared_ptr<ngraph::Node>&, ngraph::element::Type, size_t idx)>>;
|
||||
using type_to_fuse_map =
|
||||
std::unordered_map<ngraph::NodeTypeInfo,
|
||||
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 {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvertPrecision(ngraph::element::Type_t from, ngraph::element::Type_t to, type_to_fuse_map additional_type_to_fuse_map = {})
|
||||
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_additional_type_to_fuse_map(additional_type_to_fuse_map) {}
|
||||
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 = {})
|
||||
ConvertPrecision(const precisions_array& precisions, const type_to_fuse_map& additional_type_to_fuse_map = {})
|
||||
: FunctionPass(),
|
||||
m_precisions(precisions),
|
||||
m_additional_type_to_fuse_map(additional_type_to_fuse_map) {}
|
||||
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;
|
||||
|
||||
private:
|
||||
precisions_array m_precisions;
|
||||
type_to_fuse_map m_additional_type_to_fuse_map;
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "transformations_visibility.hpp"
|
||||
#include "openvino/pass/graph_rewrite.hpp"
|
||||
#include "transformations_visibility.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace pass {
|
||||
|
||||
@@ -9,10 +9,9 @@
|
||||
* @file init_node_info.hpp
|
||||
*/
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <vector>
|
||||
|
||||
/**
|
||||
* @brief ngraph namespace
|
||||
@@ -37,7 +36,7 @@ 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 ngraph::pass::FixRtInfo : public ngraph::pass::FunctionPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
bool run_on_model(const std::shared_ptr<ngraph::Function>& m) override;
|
||||
|
||||
@@ -9,10 +9,9 @@
|
||||
* @file init_node_info.hpp
|
||||
*/
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <vector>
|
||||
|
||||
/**
|
||||
* @brief ngraph namespace
|
||||
@@ -32,14 +31,14 @@ class NGRAPH_API InitNodeInfo;
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief InitNodeInfo transformation helps to set runtime info attributes in a single place.
|
||||
*
|
||||
*
|
||||
* Every runtime info attribute that needs to be initialized should be registered
|
||||
* in run_on_function method. Also do not forget to override init methods for registered
|
||||
* attribute.
|
||||
* 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 ngraph::pass::InitNodeInfo : public ngraph::pass::FunctionPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
bool run_on_model(const std::shared_ptr<ngraph::Function>& m) override;
|
||||
|
||||
@@ -5,10 +5,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -21,6 +20,5 @@ class TRANSFORMATIONS_API DisableConvertConstantFoldingOnConstPath;
|
||||
class ngraph::pass::DisableConvertConstantFoldingOnConstPath : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
DisableConvertConstantFoldingOnConstPath(
|
||||
const element::TypeVector & inputPrecisions = {});
|
||||
DisableConvertConstantFoldingOnConstPath(const element::TypeVector& inputPrecisions = {});
|
||||
};
|
||||
|
||||
@@ -5,13 +5,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/ngraph.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <ngraph/opsets/opset5.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -23,7 +20,7 @@ class TRANSFORMATIONS_API BatchNormDecomposition;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
||||
class ngraph::pass::BatchNormDecomposition: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::BatchNormDecomposition : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
BatchNormDecomposition();
|
||||
|
||||
@@ -4,13 +4,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <string>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
|
||||
@@ -4,13 +4,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/ops.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -33,7 +31,7 @@ class TRANSFORMATIONS_API ConvertBatchToSpace;
|
||||
*
|
||||
*/
|
||||
|
||||
class ngraph::pass::ConvertBatchToSpace: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::ConvertBatchToSpace : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
explicit ConvertBatchToSpace(bool convert_by_elements = true) : MatcherPass() {
|
||||
|
||||
@@ -4,12 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -19,7 +17,7 @@ class TRANSFORMATIONS_API ConvertBroadcast3;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
||||
class ngraph::pass::ConvertBroadcast3: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::ConvertBroadcast3 : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvertBroadcast3();
|
||||
|
||||
@@ -4,12 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -19,7 +17,7 @@ class TRANSFORMATIONS_API ConvertBroadcastToTiles;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
||||
class ngraph::pass::ConvertBroadcastToTiles: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::ConvertBroadcastToTiles : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvertBroadcastToTiles();
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
|
||||
@@ -4,12 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -19,7 +17,7 @@ class TRANSFORMATIONS_API ConvertDepthToSpace;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
||||
class ngraph::pass::ConvertDepthToSpace: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::ConvertDepthToSpace : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvertDepthToSpace();
|
||||
|
||||
@@ -4,12 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -20,13 +18,13 @@ class TRANSFORMATIONS_API ConvertDivideWithConstant;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
||||
class ngraph::pass::ConvertDivide: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::ConvertDivide : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvertDivide();
|
||||
};
|
||||
|
||||
class ngraph::pass::ConvertDivideWithConstant: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::ConvertDivideWithConstant : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvertDivideWithConstant();
|
||||
|
||||
@@ -4,13 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -22,7 +19,8 @@ class TRANSFORMATIONS_API ConvertGather0D;
|
||||
|
||||
/**
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief ConvertGather0D decomposes v1::Gather operation into v0::Unsqueeze + v1::Gather + v0::Squeeze pattern when gather indices is scalar
|
||||
* @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 {
|
||||
public:
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
|
||||
@@ -4,12 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
#include "ngraph/op/gelu.hpp"
|
||||
|
||||
@@ -21,7 +19,7 @@ class TRANSFORMATIONS_API ConvertGELU;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
||||
class ngraph::pass::ConvertGELU: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::ConvertGELU : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvertGELU();
|
||||
|
||||
@@ -4,13 +4,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -24,7 +22,7 @@ class TRANSFORMATIONS_API ConvertInterpolate1ToInterpolate4;
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief ConvertInterpolate1ToInterpolate4 covert v0:interpolate into v4::Interpolate.
|
||||
*/
|
||||
class ngraph::pass::ConvertInterpolate1ToInterpolate4: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::ConvertInterpolate1ToInterpolate4 : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvertInterpolate1ToInterpolate4();
|
||||
|
||||
@@ -4,12 +4,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -19,7 +18,7 @@ class TRANSFORMATIONS_API ConvertMatrixNmsToMatrixNmsIE;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
||||
class ngraph::pass::ConvertMatrixNmsToMatrixNmsIE: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::ConvertMatrixNmsToMatrixNmsIE : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvertMatrixNmsToMatrixNmsIE(bool force_i32_output_type = true);
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
|
||||
@@ -4,12 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -19,7 +17,7 @@ class TRANSFORMATIONS_API ConvertMinimum;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
||||
class ngraph::pass::ConvertMinimum: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::ConvertMinimum : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvertMinimum();
|
||||
|
||||
@@ -4,12 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -19,7 +17,7 @@ class TRANSFORMATIONS_API ConvertMod;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
||||
class ngraph::pass::ConvertMod: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::ConvertMod : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvertMod();
|
||||
|
||||
@@ -4,12 +4,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -19,7 +18,7 @@ class TRANSFORMATIONS_API ConvertMulticlassNmsToMulticlassNmsIE;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
||||
class ngraph::pass::ConvertMulticlassNmsToMulticlassNmsIE: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::ConvertMulticlassNmsToMulticlassNmsIE : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvertMulticlassNmsToMulticlassNmsIE(bool force_i32_output_type = true);
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
|
||||
@@ -4,12 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -19,7 +17,7 @@ class TRANSFORMATIONS_API ConvertNegative;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
||||
class ngraph::pass::ConvertNegative: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::ConvertNegative : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvertNegative();
|
||||
|
||||
@@ -4,12 +4,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -19,7 +18,7 @@ class TRANSFORMATIONS_API ConvertNMSToNMSIEInternal;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
||||
class ngraph::pass::ConvertNMSToNMSIEInternal: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::ConvertNMSToNMSIEInternal : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvertNMSToNMSIEInternal();
|
||||
|
||||
@@ -4,12 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -28,7 +26,7 @@ class TRANSFORMATIONS_API ConvertPadToGroupConvolution;
|
||||
* 3. Input shape rank must be static and greater than 3
|
||||
*/
|
||||
|
||||
class ngraph::pass::ConvertPadToGroupConvolution: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::ConvertPadToGroupConvolution : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvertPadToGroupConvolution();
|
||||
|
||||
@@ -5,10 +5,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -20,21 +19,20 @@ class TRANSFORMATIONS_API ConvertNMS4ToNMS5;
|
||||
} // namespace pass
|
||||
} // namespace ngraph
|
||||
|
||||
class ngraph::pass::ConvertNMS1ToNMS5: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::ConvertNMS1ToNMS5 : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvertNMS1ToNMS5();
|
||||
};
|
||||
|
||||
class ngraph::pass::ConvertNMS3ToNMS5: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::ConvertNMS3ToNMS5 : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvertNMS3ToNMS5();
|
||||
};
|
||||
|
||||
class ngraph::pass::ConvertNMS4ToNMS5: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::ConvertNMS4ToNMS5 : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvertNMS4ToNMS5();
|
||||
};
|
||||
|
||||
|
||||
@@ -4,19 +4,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <algorithm>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <memory>
|
||||
#include <ngraph/op/util/op_types.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <ngraph/opsets/opset1.hpp>
|
||||
#include <ngraph/validation_util.hpp>
|
||||
#include <ngraph/rt_info.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <ngraph/pattern/op/wrap_type.hpp>
|
||||
|
||||
#include <ngraph/rt_info.hpp>
|
||||
#include <ngraph/validation_util.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -35,25 +32,25 @@ public:
|
||||
ngraph::matcher_pass_callback convert_reduce_to_pooling();
|
||||
};
|
||||
|
||||
class ngraph::pass::ConvertReduceMeanToPooling: public ConvertReduceBase {
|
||||
class ngraph::pass::ConvertReduceMeanToPooling : public ConvertReduceBase {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvertReduceMeanToPooling();
|
||||
};
|
||||
|
||||
class ngraph::pass::ConvertReduceMaxToPooling: public ConvertReduceBase {
|
||||
class ngraph::pass::ConvertReduceMaxToPooling : public ConvertReduceBase {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvertReduceMaxToPooling();
|
||||
};
|
||||
|
||||
class ngraph::pass::ConvertReduceSumToPooling: public ConvertReduceBase {
|
||||
class ngraph::pass::ConvertReduceSumToPooling : public ConvertReduceBase {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvertReduceSumToPooling();
|
||||
};
|
||||
|
||||
class ngraph::pass::ConvertReduceToPooling: public ngraph::pass::GraphRewrite {
|
||||
class ngraph::pass::ConvertReduceToPooling : public ngraph::pass::GraphRewrite {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvertReduceToPooling() {
|
||||
@@ -74,7 +71,8 @@ ngraph::matcher_pass_callback ConvertReduceBase::convert_reduce_to_pooling() {
|
||||
|
||||
auto input = reduce->input_value(0);
|
||||
|
||||
auto axes_node = std::dynamic_pointer_cast<ngraph::opset1::Constant>(reduce->input_value(1).get_node_shared_ptr());
|
||||
auto axes_node =
|
||||
std::dynamic_pointer_cast<ngraph::opset1::Constant>(reduce->input_value(1).get_node_shared_ptr());
|
||||
if (!axes_node) {
|
||||
return false;
|
||||
}
|
||||
@@ -97,11 +95,16 @@ ngraph::matcher_pass_callback ConvertReduceBase::convert_reduce_to_pooling() {
|
||||
auto input_shape = input.get_shape();
|
||||
|
||||
// If Reduce op reduces only 1 dims we replace it with Reshape
|
||||
if (std::all_of(axes_vector.begin(), axes_vector.end(),
|
||||
[&input_shape](const int64_t & axis) { return input_shape[axis] == 1; })) {
|
||||
if (std::all_of(axes_vector.begin(), axes_vector.end(), [&input_shape](const int64_t& axis) {
|
||||
return input_shape[axis] == 1;
|
||||
})) {
|
||||
const auto reshape_shape = reduce->output(0).get_shape();
|
||||
auto reshape = std::make_shared<ngraph::opset1::Reshape>(input,
|
||||
ngraph::opset1::Constant::create(ngraph::element::i64, ngraph::Shape{reshape_shape.size()}, reshape_shape), true);
|
||||
auto reshape = std::make_shared<ngraph::opset1::Reshape>(
|
||||
input,
|
||||
ngraph::opset1::Constant::create(ngraph::element::i64,
|
||||
ngraph::Shape{reshape_shape.size()},
|
||||
reshape_shape),
|
||||
true);
|
||||
|
||||
reshape->set_friendly_name(reduce->get_friendly_name());
|
||||
copy_runtime_info(reduce, reshape);
|
||||
@@ -111,7 +114,7 @@ ngraph::matcher_pass_callback ConvertReduceBase::convert_reduce_to_pooling() {
|
||||
|
||||
// Check that axes are consecutive otherwise this transformation is not applicable
|
||||
for (size_t i = 1; i < axes_vector.size(); ++i) {
|
||||
if (axes_vector[i] - axes_vector[i-1] != 1) {
|
||||
if (axes_vector[i] - axes_vector[i - 1] != 1) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -169,7 +172,7 @@ ngraph::matcher_pass_callback ConvertReduceBase::convert_reduce_to_pooling() {
|
||||
kernel.push_back(1);
|
||||
}
|
||||
for (auto& axis : axes_vector) {
|
||||
kernel[axis-2] = input_shape[axis];
|
||||
kernel[axis - 2] = input_shape[axis];
|
||||
}
|
||||
shape_end = reduce->output(0).get_shape();
|
||||
}
|
||||
@@ -192,8 +195,10 @@ ngraph::matcher_pass_callback ConvertReduceBase::convert_reduce_to_pooling() {
|
||||
ngraph::NodeVector new_ops;
|
||||
|
||||
if (!shape_begin.empty() && shape_begin != input.get_shape()) {
|
||||
input = std::make_shared<ngraph::opset1::Reshape>(input,
|
||||
ngraph::opset1::Constant::create(ngraph::element::i64, ngraph::Shape{shape_begin.size()}, shape_begin), true);
|
||||
input = std::make_shared<ngraph::opset1::Reshape>(
|
||||
input,
|
||||
ngraph::opset1::Constant::create(ngraph::element::i64, ngraph::Shape{shape_begin.size()}, shape_begin),
|
||||
true);
|
||||
input.get_node_shared_ptr()->set_friendly_name(reduce->get_friendly_name() + "/reshape_begin");
|
||||
new_ops.push_back(input.get_node_shared_ptr());
|
||||
}
|
||||
@@ -229,18 +234,19 @@ ngraph::matcher_pass_callback ConvertReduceBase::convert_reduce_to_pooling() {
|
||||
}
|
||||
|
||||
input = std::make_shared<ngraph::opset1::AvgPool>(input,
|
||||
strides,
|
||||
pads_begin,
|
||||
pads_end,
|
||||
kernel,
|
||||
true,
|
||||
ngraph::op::RoundingType::FLOOR);
|
||||
strides,
|
||||
pads_begin,
|
||||
pads_end,
|
||||
kernel,
|
||||
true,
|
||||
ngraph::op::RoundingType::FLOOR);
|
||||
|
||||
input.get_node_shared_ptr()->set_friendly_name(reduce->get_friendly_name() + "/pool");
|
||||
new_ops.push_back(input.get_node_shared_ptr());
|
||||
|
||||
input = std::make_shared<ngraph::opset1::Multiply>(input,
|
||||
ngraph::opset1::Constant::create(input.get_element_type(), ngraph::Shape{1}, {reduction_dims_count}));
|
||||
input = std::make_shared<ngraph::opset1::Multiply>(
|
||||
input,
|
||||
ngraph::opset1::Constant::create(input.get_element_type(), ngraph::Shape{1}, {reduction_dims_count}));
|
||||
input.get_node_shared_ptr()->set_friendly_name(reduce->get_friendly_name() + "/mul");
|
||||
new_ops.push_back(input.get_node_shared_ptr());
|
||||
|
||||
@@ -253,8 +259,10 @@ ngraph::matcher_pass_callback ConvertReduceBase::convert_reduce_to_pooling() {
|
||||
}
|
||||
|
||||
if (shape_end != input.get_shape()) {
|
||||
input = std::make_shared<ngraph::opset1::Reshape>(input,
|
||||
ngraph::opset1::Constant::create(ngraph::element::i64, ngraph::Shape{shape_end.size()}, shape_end), true);
|
||||
input = std::make_shared<ngraph::opset1::Reshape>(
|
||||
input,
|
||||
ngraph::opset1::Constant::create(ngraph::element::i64, ngraph::Shape{shape_end.size()}, shape_end),
|
||||
true);
|
||||
new_ops.push_back(input.get_node_shared_ptr());
|
||||
}
|
||||
input.get_node_shared_ptr()->set_friendly_name(reduce->get_friendly_name());
|
||||
|
||||
@@ -4,12 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -23,7 +21,7 @@ class TRANSFORMATIONS_API ConvertScatterElementsToScatter;
|
||||
* @ingroup ie_transformation_common_api
|
||||
* @brief ConvertScatterElementsToScatter convert opset3::ScatterElementsUpdate to opset3::ScatterUpdate.
|
||||
*/
|
||||
class ngraph::pass::ConvertScatterElementsToScatter: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::ConvertScatterElementsToScatter : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvertScatterElementsToScatter();
|
||||
|
||||
@@ -4,12 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <transformations_visibility.hpp>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <transformations_visibility.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@@ -28,7 +26,7 @@ class TRANSFORMATIONS_API ConvertSequenceToTensorIterator;
|
||||
* *
|
||||
*/
|
||||
|
||||
class ngraph::pass::ConvertRNNSequenceToTensorIterator: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::ConvertRNNSequenceToTensorIterator : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvertRNNSequenceToTensorIterator();
|
||||
@@ -40,7 +38,7 @@ public:
|
||||
* *
|
||||
*/
|
||||
|
||||
class ngraph::pass::ConvertGRUSequenceToTensorIterator: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::ConvertGRUSequenceToTensorIterator : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvertGRUSequenceToTensorIterator();
|
||||
@@ -52,7 +50,7 @@ public:
|
||||
* *
|
||||
*/
|
||||
|
||||
class ngraph::pass::ConvertLSTMSequenceToTensorIterator: public ngraph::pass::MatcherPass {
|
||||
class ngraph::pass::ConvertLSTMSequenceToTensorIterator : public ngraph::pass::MatcherPass {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
ConvertLSTMSequenceToTensorIterator();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user