From 51c024e06bc858c8a6223d599dfe7ff5f0bc6be5 Mon Sep 17 00:00:00 2001 From: "Zhai, Xuejun" Date: Tue, 28 Feb 2023 10:51:11 +0800 Subject: [PATCH] Fix format issue Signed-off-by: Zhai, Xuejun --- src/core/tests/pattern.cpp | 54 +++++++++---------- .../template/backend/pass/dyn_elimination.cpp | 30 +++++------ 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/src/core/tests/pattern.cpp b/src/core/tests/pattern.cpp index 87acfa1f205..ef5a75ec99c 100644 --- a/src/core/tests/pattern.cpp +++ b/src/core/tests/pattern.cpp @@ -112,21 +112,21 @@ public: auto m = make_shared(make_shared(pattern, iconst1)); auto match_pass = std::make_shared( - m->get_name(), - m, - [m, callback](const std::shared_ptr& node) -> bool { - NGRAPH_DEBUG << "Running matcher " << m->get_name() << " on " << node; - if (std::dynamic_pointer_cast(m)->match(node->output(0))) { - NGRAPH_DEBUG << "Matcher " << m->get_name() << " matched " << node; - bool status = callback(*m.get()); - // explicitly clear Matcher state because it holds pointers to matched nodes - m->clear_state(); - return status; - } + m->get_name(), + m, + [m, callback](const std::shared_ptr& node) -> bool { + NGRAPH_DEBUG << "Running matcher " << m->get_name() << " on " << node; + if (std::dynamic_pointer_cast(m)->match(node->output(0))) { + NGRAPH_DEBUG << "Matcher " << m->get_name() << " matched " << node; + bool status = callback(*m.get()); + // explicitly clear Matcher state because it holds pointers to matched nodes + m->clear_state(); + return status; + } m->clear_state(); return false; - }, - ov::pass::PassProperty::REQUIRE_STATIC_SHAPE); + }, + ov::pass::PassProperty::REQUIRE_STATIC_SHAPE); this->add_matcher(match_pass); } @@ -170,22 +170,22 @@ public: auto add = make_shared(pattern, iconst0); auto m = make_shared(add); - auto match_pass = std::make_shared( - m->get_name(), - m, - [m, callback](const std::shared_ptr& node) -> bool { - NGRAPH_DEBUG << "Running matcher " << m->get_name() << " on " << node; - if (std::dynamic_pointer_cast(m)->match(node->output(0))) { - NGRAPH_DEBUG << "Matcher " << m->get_name() << " matched " << node; - bool status = callback(*m.get()); - // explicitly clear Matcher state because it holds pointers to matched nodes - m->clear_state(); - return status; - } + auto match_pass = std::make_shared( + m->get_name(), + m, + [m, callback](const std::shared_ptr& node) -> bool { + NGRAPH_DEBUG << "Running matcher " << m->get_name() << " on " << node; + if (std::dynamic_pointer_cast(m)->match(node->output(0))) { + NGRAPH_DEBUG << "Matcher " << m->get_name() << " matched " << node; + bool status = callback(*m.get()); + // explicitly clear Matcher state because it holds pointers to matched nodes + m->clear_state(); + return status; + } m->clear_state(); return false; - }, - ov::pass::PassProperty::REQUIRE_STATIC_SHAPE); + }, + ov::pass::PassProperty::REQUIRE_STATIC_SHAPE); this->add_matcher(match_pass); } diff --git a/src/plugins/template/backend/pass/dyn_elimination.cpp b/src/plugins/template/backend/pass/dyn_elimination.cpp index 1bafe775036..53bc898636c 100644 --- a/src/plugins/template/backend/pass/dyn_elimination.cpp +++ b/src/plugins/template/backend/pass/dyn_elimination.cpp @@ -6,6 +6,7 @@ #include +#include "core/src/itt.hpp" #include "ngraph/builder/reshape.hpp" #include "ngraph/op/broadcast.hpp" #include "ngraph/op/range.hpp" @@ -14,7 +15,6 @@ #include "ngraph/pattern/op/label.hpp" #include "ngraph/runtime/reference/range.hpp" #include "ngraph/slice_plan.hpp" -#include "core/src/itt.hpp" NGRAPH_SUPPRESS_DEPRECATED_START @@ -124,21 +124,21 @@ void pass::DynElimination::construct_range() { auto range_matcher = make_shared(range_pat, "DynElimination.Range"); auto match_pass = std::make_shared( - range_matcher->get_name(), - range_matcher, - [range_matcher, range_callback](const std::shared_ptr& node) -> bool { - NGRAPH_DEBUG << "Running matcher " << range_matcher->get_name() << " on " << node; - OV_PASS_CALLBACK(m); - if (std::dynamic_pointer_cast(range_matcher)->match(node->output(0))) { - NGRAPH_DEBUG << "Matcher " << range_matcher->get_name() << " matched " << node; - bool status = range_callback(*range_matcher.get()); - // explicitly clear Matcher state because it holds pointers to matched nodes - range_matcher->clear_state(); - return status; - } + range_matcher->get_name(), + range_matcher, + [range_matcher, range_callback](const std::shared_ptr& node) -> bool { + NGRAPH_DEBUG << "Running matcher " << range_matcher->get_name() << " on " << node; + OV_PASS_CALLBACK(m); + if (std::dynamic_pointer_cast(range_matcher)->match(node->output(0))) { + NGRAPH_DEBUG << "Matcher " << range_matcher->get_name() << " matched " << node; + bool status = range_callback(*range_matcher.get()); + // explicitly clear Matcher state because it holds pointers to matched nodes + range_matcher->clear_state(); + return status; + } range_matcher->clear_state(); return false; - }, - all_pass_property_off); + }, + all_pass_property_off); add_matcher(match_pass); }