From 567ef8a4f097d1357c11673009b0432c42792bab Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Fri, 15 Jan 2021 19:12:14 +0300 Subject: [PATCH] Fixed warnings generation for ngraph API (#3864) --- inference-engine/ie_bridges/c/tests/test_model_repo.hpp | 2 +- .../convert_mul_or_add_finally.hpp | 2 ++ .../convert_mul_add_to_scaleshift_or_power.cpp | 2 ++ .../convert_prior_to_ie_prior.cpp | 4 ++++ .../convert_opset1_to_legacy/reshape_fc_fusion.cpp | 2 ++ .../src/layer_transformation.cpp | 2 ++ .../src/low_precision_transformations/src/transformer.cpp | 2 ++ .../common_optimizations/nop_elimination.cpp | 2 -- .../remove_filtering_boxes_by_size.cpp | 2 ++ .../src/vpu/graph_transformer/src/frontend/frontend.cpp | 2 ++ ngraph/core/include/ngraph/op/lstm_cell.hpp | 2 -- ngraph/core/include/ngraph/pass/pass_config.hpp | 8 ++++++++ ngraph/core/src/op/lstm_sequence.cpp | 2 ++ ngraph/test/graph_rewrite.cpp | 2 ++ ngraph/test/runtime/pass/fused_op_decomposition.hpp | 5 ++++- .../test/runtime/pass/implicit_broadcast_elimination.hpp | 2 ++ 16 files changed, 37 insertions(+), 6 deletions(-) diff --git a/inference-engine/ie_bridges/c/tests/test_model_repo.hpp b/inference-engine/ie_bridges/c/tests/test_model_repo.hpp index 62bac0b3008..f279389b6af 100644 --- a/inference-engine/ie_bridges/c/tests/test_model_repo.hpp +++ b/inference-engine/ie_bridges/c/tests/test_model_repo.hpp @@ -44,7 +44,7 @@ std::string generate_model_path(std::string dir, std::string filename) { } std::string generate_image_path(std::string dir, std::string filename) { - return get_data_path() + kPathSeparator +"validation_set" + kPathSeparator + dir + kPathSeparator + filename; + return get_data_path() + kPathSeparator + "validation_set" + kPathSeparator + dir + kPathSeparator + filename; } std::string generate_ieclass_xml_path(std::string filename) { diff --git a/inference-engine/src/legacy_api/include/legacy/transformations/convert_opset1_to_legacy/convert_mul_or_add_finally.hpp b/inference-engine/src/legacy_api/include/legacy/transformations/convert_opset1_to_legacy/convert_mul_or_add_finally.hpp index 62c3480f760..f89f55a1f93 100755 --- a/inference-engine/src/legacy_api/include/legacy/transformations/convert_opset1_to_legacy/convert_mul_or_add_finally.hpp +++ b/inference-engine/src/legacy_api/include/legacy/transformations/convert_opset1_to_legacy/convert_mul_or_add_finally.hpp @@ -299,5 +299,7 @@ void ngraph::pass::ConvertMulOrAddFinally::convert_mul_or_add_finally() { auto lin_op = std::make_shared(data_batch_1, data_batch_2); auto m = std::make_shared(lin_op); + NGRAPH_SUPPRESS_DEPRECATED_START this->add_matcher(m, get_callback(), PassProperty::CHANGE_DYNAMIC_STATE); + NGRAPH_SUPPRESS_DEPRECATED_END } diff --git a/inference-engine/src/legacy_api/src/transformations/convert_opset1_to_legacy/convert_mul_add_to_scaleshift_or_power.cpp b/inference-engine/src/legacy_api/src/transformations/convert_opset1_to_legacy/convert_mul_add_to_scaleshift_or_power.cpp index fc5f734d7b1..d24a70066da 100644 --- a/inference-engine/src/legacy_api/src/transformations/convert_opset1_to_legacy/convert_mul_add_to_scaleshift_or_power.cpp +++ b/inference-engine/src/legacy_api/src/transformations/convert_opset1_to_legacy/convert_mul_add_to_scaleshift_or_power.cpp @@ -210,5 +210,7 @@ void ngraph::pass::ConvertMulAddToScaleShiftOrPower::convert_mul_add_to_scaleshi }; auto m = std::make_shared(add, "CPUFusion.MulAddToScaleShiftOrPower"); + NGRAPH_SUPPRESS_DEPRECATED_START this->add_matcher(m, callback, PassProperty::CHANGE_DYNAMIC_STATE); + NGRAPH_SUPPRESS_DEPRECATED_END } diff --git a/inference-engine/src/legacy_api/src/transformations/convert_opset1_to_legacy/convert_prior_to_ie_prior.cpp b/inference-engine/src/legacy_api/src/transformations/convert_opset1_to_legacy/convert_prior_to_ie_prior.cpp index 2c45024684c..563268cb807 100644 --- a/inference-engine/src/legacy_api/src/transformations/convert_opset1_to_legacy/convert_prior_to_ie_prior.cpp +++ b/inference-engine/src/legacy_api/src/transformations/convert_opset1_to_legacy/convert_prior_to_ie_prior.cpp @@ -154,7 +154,9 @@ void ngraph::pass::ConvertPriorBox::convert_prior_box() { }; auto m = std::make_shared(unsqueeze, "CPUFusion.ConvertPriorBoxToPriorBoxIE"); + NGRAPH_SUPPRESS_DEPRECATED_START this->add_matcher(m, callback, PassProperty::CHANGE_DYNAMIC_STATE); + NGRAPH_SUPPRESS_DEPRECATED_END } void ngraph::pass::ConvertPriorBox::convert_prior_box_clustered() { @@ -292,5 +294,7 @@ void ngraph::pass::ConvertPriorBox::convert_prior_box_clustered() { }; auto m = std::make_shared(unsqueeze, "CPUFusion.ConvertPriorBoxClusteredToPriorBoxClusteredIE"); + NGRAPH_SUPPRESS_DEPRECATED_START this->add_matcher(m, callback, PassProperty::CHANGE_DYNAMIC_STATE); + NGRAPH_SUPPRESS_DEPRECATED_END } \ No newline at end of file diff --git a/inference-engine/src/legacy_api/src/transformations/convert_opset1_to_legacy/reshape_fc_fusion.cpp b/inference-engine/src/legacy_api/src/transformations/convert_opset1_to_legacy/reshape_fc_fusion.cpp index 610424d0b9c..e0fc2cd914d 100644 --- a/inference-engine/src/legacy_api/src/transformations/convert_opset1_to_legacy/reshape_fc_fusion.cpp +++ b/inference-engine/src/legacy_api/src/transformations/convert_opset1_to_legacy/reshape_fc_fusion.cpp @@ -52,5 +52,7 @@ void ngraph::pass::ReshapeFullyConnectedFusion::construct_reshape_fc() { }; auto m = std::make_shared(m_fc, "ReshapeFullyConnectedFusion"); + NGRAPH_SUPPRESS_DEPRECATED_START this->add_matcher(m, callback, PassProperty::CHANGE_DYNAMIC_STATE); + NGRAPH_SUPPRESS_DEPRECATED_END } diff --git a/inference-engine/src/low_precision_transformations/src/layer_transformation.cpp b/inference-engine/src/low_precision_transformations/src/layer_transformation.cpp index 8ca663700f9..b2d904746f5 100644 --- a/inference-engine/src/low_precision_transformations/src/layer_transformation.cpp +++ b/inference-engine/src/low_precision_transformations/src/layer_transformation.cpp @@ -492,7 +492,9 @@ void LayerTransformation::addPattern(ngraph::pass::GraphRewrite& pass, Transform }; // TODO: better name for matcher? required? auto m = std::make_shared(patternRoot, "SingleNodeMatcher"); + NGRAPH_SUPPRESS_DEPRECATED_START pass.add_matcher(m, internal_callback, ngraph::pass::PassProperty::CHANGE_DYNAMIC_STATE); + NGRAPH_SUPPRESS_DEPRECATED_END } } // namespace low_precision diff --git a/inference-engine/src/low_precision_transformations/src/transformer.cpp b/inference-engine/src/low_precision_transformations/src/transformer.cpp index b475b83ca40..83a334d97f8 100644 --- a/inference-engine/src/low_precision_transformations/src/transformer.cpp +++ b/inference-engine/src/low_precision_transformations/src/transformer.cpp @@ -302,7 +302,9 @@ void make_matcher_type_relaxed(ngraph::pass::GraphRewrite* transformation) { }; auto m = std::make_shared(p_node, "TypeRelaxedReplacer"); + NGRAPH_SUPPRESS_DEPRECATED_START transformation->add_matcher(m, callback, ngraph::pass::PassProperty::CHANGE_DYNAMIC_STATE); + NGRAPH_SUPPRESS_DEPRECATED_END } TypeRelaxedReplacer::TypeRelaxedReplacer() { diff --git a/inference-engine/src/transformations/src/transformations/common_optimizations/nop_elimination.cpp b/inference-engine/src/transformations/src/transformations/common_optimizations/nop_elimination.cpp index 04a0875bcfd..3ff7f1e0423 100644 --- a/inference-engine/src/transformations/src/transformations/common_optimizations/nop_elimination.cpp +++ b/inference-engine/src/transformations/src/transformations/common_optimizations/nop_elimination.cpp @@ -25,8 +25,6 @@ #include #include -NGRAPH_SUPPRESS_DEPRECATED_START - using namespace std; using namespace ngraph; diff --git a/inference-engine/src/transformations/src/transformations/common_optimizations/remove_filtering_boxes_by_size.cpp b/inference-engine/src/transformations/src/transformations/common_optimizations/remove_filtering_boxes_by_size.cpp index 7613695980a..789e86ee912 100644 --- a/inference-engine/src/transformations/src/transformations/common_optimizations/remove_filtering_boxes_by_size.cpp +++ b/inference-engine/src/transformations/src/transformations/common_optimizations/remove_filtering_boxes_by_size.cpp @@ -104,5 +104,7 @@ void ngraph::pass::RemoveFilteringBoxesBySize::remove_filtering_boxes_by_size() }; auto m = std::make_shared(cast, "RemoveFilteringBoxesBySize"); + NGRAPH_SUPPRESS_DEPRECATED_START this->add_matcher(m, callback, PassProperty::CHANGE_DYNAMIC_STATE); + NGRAPH_SUPPRESS_DEPRECATED_END } diff --git a/inference-engine/src/vpu/graph_transformer/src/frontend/frontend.cpp b/inference-engine/src/vpu/graph_transformer/src/frontend/frontend.cpp index 0f97b1f0807..8847b7c29be 100644 --- a/inference-engine/src/vpu/graph_transformer/src/frontend/frontend.cpp +++ b/inference-engine/src/vpu/graph_transformer/src/frontend/frontend.cpp @@ -197,7 +197,9 @@ ie::ICNNNetwork::Ptr FrontEnd::convertNetwork(ie::ICNNNetwork& network) { manager.register_pass(); manager.get_pass_config()->disable(); + NGRAPH_SUPPRESS_DEPRECATED_START manager.set_callback(transformationsPredicate); + NGRAPH_SUPPRESS_DEPRECATED_END manager.run_passes(nGraphFunc); vpu::MergeSubsequentDSROperations().run_on_function(nGraphFunc); diff --git a/ngraph/core/include/ngraph/op/lstm_cell.hpp b/ngraph/core/include/ngraph/op/lstm_cell.hpp index 46cf64f2bb9..cb9ed6ca2ca 100644 --- a/ngraph/core/include/ngraph/op/lstm_cell.hpp +++ b/ngraph/core/include/ngraph/op/lstm_cell.hpp @@ -26,8 +26,6 @@ #include "ngraph/op/util/fused_op.hpp" #include "ngraph/op/util/rnn_cell_base.hpp" -NGRAPH_SUPPRESS_DEPRECATED_START - namespace ngraph { namespace op diff --git a/ngraph/core/include/ngraph/pass/pass_config.hpp b/ngraph/core/include/ngraph/pass/pass_config.hpp index 785a7763e86..ffdb8e09341 100644 --- a/ngraph/core/include/ngraph/pass/pass_config.hpp +++ b/ngraph/core/include/ngraph/pass/pass_config.hpp @@ -77,7 +77,9 @@ namespace ngraph template void disable() { + NGRAPH_SUPPRESS_DEPRECATED_START disable(T::type_info); + NGRAPH_SUPPRESS_DEPRECATED_END } /// \brief Enable transformation by its type_info @@ -87,7 +89,9 @@ namespace ngraph template void enable() { + NGRAPH_SUPPRESS_DEPRECATED_START enable(T::type_info); + NGRAPH_SUPPRESS_DEPRECATED_END } /// \brief Set callback for all kind of transformations @@ -142,7 +146,9 @@ namespace ngraph template param_callback get_callback() const { + NGRAPH_SUPPRESS_DEPRECATED_START return get_callback(T::type_info); + NGRAPH_SUPPRESS_DEPRECATED_END } /// \brief Check either transformation type is disabled or not @@ -158,7 +164,9 @@ namespace ngraph template bool is_disabled() const { + NGRAPH_SUPPRESS_DEPRECATED_START return is_disabled(T::type_info); + NGRAPH_SUPPRESS_DEPRECATED_END } /// \brief Check either transformation type is force enabled or not diff --git a/ngraph/core/src/op/lstm_sequence.cpp b/ngraph/core/src/op/lstm_sequence.cpp index 0bced1917d7..70a113335ad 100644 --- a/ngraph/core/src/op/lstm_sequence.cpp +++ b/ngraph/core/src/op/lstm_sequence.cpp @@ -30,6 +30,8 @@ using namespace ngraph; using namespace std; +NGRAPH_SUPPRESS_DEPRECATED_START + NGRAPH_RTTI_DEFINITION(op::v0::LSTMSequence, "LSTMSequence", 0); NGRAPH_RTTI_DEFINITION(op::v5::LSTMSequence, "LSTMSequence", 5); diff --git a/ngraph/test/graph_rewrite.cpp b/ngraph/test/graph_rewrite.cpp index 7c5b106a2a9..dc423c1317c 100644 --- a/ngraph/test/graph_rewrite.cpp +++ b/ngraph/test/graph_rewrite.cpp @@ -8,6 +8,8 @@ #include #include +NGRAPH_SUPPRESS_DEPRECATED_START + using namespace ::testing; using namespace std; using namespace ngraph; diff --git a/ngraph/test/runtime/pass/fused_op_decomposition.hpp b/ngraph/test/runtime/pass/fused_op_decomposition.hpp index d594aac26e8..7cda76a38cb 100644 --- a/ngraph/test/runtime/pass/fused_op_decomposition.hpp +++ b/ngraph/test/runtime/pass/fused_op_decomposition.hpp @@ -19,9 +19,10 @@ #include #include "backend_visibility.hpp" -#include "ngraph/op/util/fused_op.hpp" #include "ngraph/pass/pass.hpp" +NGRAPH_SUPPRESS_DEPRECATED_START + namespace ngraph { namespace pass @@ -74,3 +75,5 @@ namespace ngraph }; } } + +NGRAPH_SUPPRESS_DEPRECATED_END diff --git a/ngraph/test/runtime/pass/implicit_broadcast_elimination.hpp b/ngraph/test/runtime/pass/implicit_broadcast_elimination.hpp index d1b9fb3bfb8..64440e9316a 100644 --- a/ngraph/test/runtime/pass/implicit_broadcast_elimination.hpp +++ b/ngraph/test/runtime/pass/implicit_broadcast_elimination.hpp @@ -21,6 +21,7 @@ #include "ngraph/pass/pass.hpp" NGRAPH_SUPPRESS_DEPRECATED_START + namespace ngraph { namespace pass @@ -35,4 +36,5 @@ class BACKEND_API ngraph::pass::ImplicitBroadcastElimination : public ngraph::pa public: bool run_on_node(std::shared_ptr node) override; }; + NGRAPH_SUPPRESS_DEPRECATED_END