diff --git a/docs/snippets/lpt_intel_cpu_plugin.cpp b/docs/snippets/lpt_intel_cpu_plugin.cpp index 8c4aec2cddf..14dcfad486f 100644 --- a/docs/snippets/lpt_intel_cpu_plugin.cpp +++ b/docs/snippets/lpt_intel_cpu_plugin.cpp @@ -17,7 +17,7 @@ namespace ngraph { namespace pass { namespace device { -class ConvertOpSet1ToDeviceSpecific: public ngraph::pass::FunctionPass { +class ConvertOpSet1ToDeviceSpecific: public ov::pass::ModelPass { public: bool run_on_model(const std::shared_ptr& f) override { return true; diff --git a/src/common/conditional_compilation/include/openvino/cc/pass/itt.hpp b/src/common/conditional_compilation/include/openvino/cc/pass/itt.hpp index c0a0092ba30..32de9caa492 100644 --- a/src/common/conditional_compilation/include/openvino/cc/pass/itt.hpp +++ b/src/common/conditional_compilation/include/openvino/cc/pass/itt.hpp @@ -24,6 +24,11 @@ OV_CC_DOMAINS(ov_pass); # define ADD_MATCHER(obj, region, ...) obj->add_matcher(__VA_ARGS__); # define REGISTER_PASS(obj, region, ...) obj.register_pass(__VA_ARGS__); # define REGISTER_DISABLED_PASS(obj, region, ...) obj.register_pass(__VA_ARGS__); + +# define OV_PASS_CALLBACK(matcher) \ + openvino::itt::handle_t m_callback_handle; \ + m_callback_handle = openvino::itt::handle(matcher->get_name()); \ + OV_ITT_SCOPED_TASK(SIMPLE_ov_pass, m_callback_handle) #elif defined(SELECTIVE_BUILD) # define MATCHER_SCOPE_(scope, region) \ @@ -70,6 +75,7 @@ OV_CC_DOMAINS(ov_pass); # define REGISTER_DISABLED_PASS(obj, region, ...) \ OV_PP_CAT(REGISTER_PASS_WITH_FALSE_, OV_CC_SCOPE_IS_ENABLED(OV_PP_CAT3(ov_pass, _, region))) \ (obj, region, __VA_ARGS__) +# define OV_PASS_CALLBACK(matcher) #else # define MATCHER_SCOPE(region) const std::string matcher_name(OV_PP_TOSTRING(region)) @@ -79,6 +85,7 @@ OV_CC_DOMAINS(ov_pass); # define ADD_MATCHER(obj, region, ...) obj->add_matcher(__VA_ARGS__); # define REGISTER_PASS(obj, region, ...) obj.register_pass(__VA_ARGS__); # define REGISTER_DISABLED_PASS(obj, region, ...) obj.register_pass(__VA_ARGS__); +# define OV_PASS_CALLBACK(matcher) #endif #define ADD_MATCHER_FOR_THIS(region, ...) ADD_MATCHER(this, region, __VA_ARGS__) diff --git a/src/common/low_precision_transformations/CMakeLists.txt b/src/common/low_precision_transformations/CMakeLists.txt index 2dc91a3fbb3..fbdc61d4b5d 100644 --- a/src/common/low_precision_transformations/CMakeLists.txt +++ b/src/common/low_precision_transformations/CMakeLists.txt @@ -33,8 +33,7 @@ target_link_libraries(${TARGET_NAME}_obj PRIVATE openvino::itt) target_include_directories(${TARGET_NAME}_obj PRIVATE $ $> - $> - ${CMAKE_CURRENT_SOURCE_DIR}/../..) + $>) add_cpplint_target(${TARGET_NAME}_cpplint FOR_TARGETS ${TARGET_NAME}_obj) @@ -52,8 +51,7 @@ target_link_libraries(${TARGET_NAME} INTERFACE openvino::runtime) target_include_directories(${TARGET_NAME} INTERFACE $ $> - $> - ${CMAKE_CURRENT_SOURCE_DIR}/../..) + $>) # LTO diff --git a/src/common/low_precision_transformations/src/layer_transformation.cpp b/src/common/low_precision_transformations/src/layer_transformation.cpp index 4b0171fa100..6a496f15657 100644 --- a/src/common/low_precision_transformations/src/layer_transformation.cpp +++ b/src/common/low_precision_transformations/src/layer_transformation.cpp @@ -4,7 +4,6 @@ #include #include -#include "core/src/itt.hpp" #include #include diff --git a/src/common/low_precision_transformations/src/low_precision.cpp b/src/common/low_precision_transformations/src/low_precision.cpp index 3c0aee5d1f2..0a476b6f436 100644 --- a/src/common/low_precision_transformations/src/low_precision.cpp +++ b/src/common/low_precision_transformations/src/low_precision.cpp @@ -5,7 +5,6 @@ #include "low_precision/low_precision.hpp" #include -#include "core/src/itt.hpp" #include #include #include diff --git a/src/core/include/openvino/pass/pass.hpp b/src/core/include/openvino/pass/pass.hpp index 988f4d1c05b..9cbbce52ba8 100644 --- a/src/core/include/openvino/pass/pass.hpp +++ b/src/core/include/openvino/pass/pass.hpp @@ -91,10 +91,7 @@ class OPENVINO_API ModelPass : public PassBase { public: OPENVINO_RTTI("ov::pass::ModelPass"); ~ModelPass() override; - virtual bool run_on_model(const std::shared_ptr& m); - -private: - bool call_on_model{false}; + virtual bool run_on_model(const std::shared_ptr& m) = 0; }; } // namespace pass diff --git a/src/core/src/itt.hpp b/src/core/src/itt.hpp index 8501692d89f..5c527ecee2d 100644 --- a/src/core/src/itt.hpp +++ b/src/core/src/itt.hpp @@ -33,10 +33,6 @@ OV_CC_DOMAINS(ov_opset); */ #if defined(SELECTIVE_BUILD_ANALYZER) # define OV_OP_SCOPE(region) OV_SCOPE(ov_op, region) -# define OV_PASS_CALLBACK(matcher) \ - openvino::itt::handle_t m_callback_handle; \ - m_callback_handle = openvino::itt::handle(matcher->get_name()); \ - OV_ITT_SCOPED_TASK(SIMPLE_ov_pass, m_callback_handle) # define REGISTER_OP(opset_name, op_name) \ OV_ITT_SCOPED_TASK(SIMPLE_ov_opset, openvino::itt::handle(opset_name + "_" + op_name)) # define INSERT_OP(opset_name, op_name, op_namespace) opset.insert() @@ -44,14 +40,12 @@ OV_CC_DOMAINS(ov_opset); # define OV_OP_SCOPE(region) \ if (OV_CC_SCOPE_IS_ENABLED(OV_PP_CAT3(ov_op, _, region)) == 0) \ throw ngraph::ngraph_error(std::string(OV_PP_TOSTRING(OV_PP_CAT3(ov_op, _, region))) + " is disabled!") -# define OV_PASS_CALLBACK(matcher) # define REGISTER_OP(opset_name, op_name) # define INSERT_OP(opset_name, op_name, op_namespace) \ if (OV_CC_SCOPE_IS_ENABLED(OV_PP_CAT4(ov_opset_, opset_name, _, op_name)) == 1) \ opset.insert() #else # define OV_OP_SCOPE(region) OV_ITT_SCOPED_TASK(ov::itt::domains::ov_op, OV_PP_TOSTRING(region)) -# define OV_PASS_CALLBACK(matcher) # define REGISTER_OP(opset_name, op_name) # define INSERT_OP(opset_name, op_name, op_namespace) opset.insert() #endif diff --git a/src/core/src/pass/pass.cpp b/src/core/src/pass/pass.cpp index 7aaf4cb9899..65a4aa7bde0 100644 --- a/src/core/src/pass/pass.cpp +++ b/src/core/src/pass/pass.cpp @@ -72,13 +72,6 @@ private: ov::pass::ModelPass::~ModelPass() = default; -bool ov::pass::ModelPass::run_on_model(const std::shared_ptr& m) { - RUN_ON_MODEL_SCOPE(ModelPass); - RunLocker locked(call_on_model); - bool sts = run_on_model(m); - return sts; -} - NGRAPH_RTTI_DEFINITION(ngraph::pass::NodePass, "ngraph::pass::NodePass", 0); ngraph::pass::NodePass::~NodePass() = default; diff --git a/src/plugins/template/backend/CMakeLists.txt b/src/plugins/template/backend/CMakeLists.txt index cfcb334d3c4..16645f0df8f 100644 --- a/src/plugins/template/backend/CMakeLists.txt +++ b/src/plugins/template/backend/CMakeLists.txt @@ -34,9 +34,7 @@ target_compile_definitions(interpreter_backend ) target_link_libraries(interpreter_backend PRIVATE ngraph::builder ngraph::reference openvino::util openvino::runtime::dev) -target_include_directories(interpreter_backend PUBLIC $ - ${CMAKE_CURRENT_SOURCE_DIR}/../../.. - ${CMAKE_CURRENT_SOURCE_DIR}/../../../common/conditional_compilation/include) +target_include_directories(interpreter_backend PUBLIC $) file(GLOB_RECURSE all_backends_src "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") add_clang_format_target(interpreter_backend_clang FOR_SOURCES ${all_backends_src}) diff --git a/src/plugins/template/backend/pass/dyn_elimination.cpp b/src/plugins/template/backend/pass/dyn_elimination.cpp index 53bc898636c..d3ad3b1a7ca 100644 --- a/src/plugins/template/backend/pass/dyn_elimination.cpp +++ b/src/plugins/template/backend/pass/dyn_elimination.cpp @@ -6,7 +6,6 @@ #include -#include "core/src/itt.hpp" #include "ngraph/builder/reshape.hpp" #include "ngraph/op/broadcast.hpp" #include "ngraph/op/range.hpp"