[Remove APIs] Fix review comments
Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
This commit is contained in:
parent
51c024e06b
commit
d14a92d174
@ -17,7 +17,7 @@ namespace ngraph {
|
|||||||
namespace pass {
|
namespace pass {
|
||||||
namespace device {
|
namespace device {
|
||||||
|
|
||||||
class ConvertOpSet1ToDeviceSpecific: public ngraph::pass::FunctionPass {
|
class ConvertOpSet1ToDeviceSpecific: public ov::pass::ModelPass {
|
||||||
public:
|
public:
|
||||||
bool run_on_model(const std::shared_ptr<ngraph::Function>& f) override {
|
bool run_on_model(const std::shared_ptr<ngraph::Function>& f) override {
|
||||||
return true;
|
return true;
|
||||||
|
@ -24,6 +24,11 @@ OV_CC_DOMAINS(ov_pass);
|
|||||||
# define ADD_MATCHER(obj, region, ...) obj->add_matcher<region>(__VA_ARGS__);
|
# define ADD_MATCHER(obj, region, ...) obj->add_matcher<region>(__VA_ARGS__);
|
||||||
# define REGISTER_PASS(obj, region, ...) obj.register_pass<region>(__VA_ARGS__);
|
# define REGISTER_PASS(obj, region, ...) obj.register_pass<region>(__VA_ARGS__);
|
||||||
# define REGISTER_DISABLED_PASS(obj, region, ...) obj.register_pass<region, false>(__VA_ARGS__);
|
# define REGISTER_DISABLED_PASS(obj, region, ...) obj.register_pass<region, false>(__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)
|
#elif defined(SELECTIVE_BUILD)
|
||||||
|
|
||||||
# define MATCHER_SCOPE_(scope, region) \
|
# define MATCHER_SCOPE_(scope, region) \
|
||||||
@ -70,6 +75,7 @@ OV_CC_DOMAINS(ov_pass);
|
|||||||
# define REGISTER_DISABLED_PASS(obj, region, ...) \
|
# define REGISTER_DISABLED_PASS(obj, region, ...) \
|
||||||
OV_PP_CAT(REGISTER_PASS_WITH_FALSE_, OV_CC_SCOPE_IS_ENABLED(OV_PP_CAT3(ov_pass, _, region))) \
|
OV_PP_CAT(REGISTER_PASS_WITH_FALSE_, OV_CC_SCOPE_IS_ENABLED(OV_PP_CAT3(ov_pass, _, region))) \
|
||||||
(obj, region, __VA_ARGS__)
|
(obj, region, __VA_ARGS__)
|
||||||
|
# define OV_PASS_CALLBACK(matcher)
|
||||||
#else
|
#else
|
||||||
|
|
||||||
# define MATCHER_SCOPE(region) const std::string matcher_name(OV_PP_TOSTRING(region))
|
# 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<region>(__VA_ARGS__);
|
# define ADD_MATCHER(obj, region, ...) obj->add_matcher<region>(__VA_ARGS__);
|
||||||
# define REGISTER_PASS(obj, region, ...) obj.register_pass<region>(__VA_ARGS__);
|
# define REGISTER_PASS(obj, region, ...) obj.register_pass<region>(__VA_ARGS__);
|
||||||
# define REGISTER_DISABLED_PASS(obj, region, ...) obj.register_pass<region, false>(__VA_ARGS__);
|
# define REGISTER_DISABLED_PASS(obj, region, ...) obj.register_pass<region, false>(__VA_ARGS__);
|
||||||
|
# define OV_PASS_CALLBACK(matcher)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ADD_MATCHER_FOR_THIS(region, ...) ADD_MATCHER(this, region, __VA_ARGS__)
|
#define ADD_MATCHER_FOR_THIS(region, ...) ADD_MATCHER(this, region, __VA_ARGS__)
|
||||||
|
@ -33,8 +33,7 @@ target_link_libraries(${TARGET_NAME}_obj PRIVATE openvino::itt)
|
|||||||
|
|
||||||
target_include_directories(${TARGET_NAME}_obj PRIVATE $<BUILD_INTERFACE:${PUBLIC_HEADERS_DIR}>
|
target_include_directories(${TARGET_NAME}_obj PRIVATE $<BUILD_INTERFACE:${PUBLIC_HEADERS_DIR}>
|
||||||
$<BUILD_INTERFACE:$<TARGET_PROPERTY:ngraph,INTERFACE_INCLUDE_DIRECTORIES>>
|
$<BUILD_INTERFACE:$<TARGET_PROPERTY:ngraph,INTERFACE_INCLUDE_DIRECTORIES>>
|
||||||
$<BUILD_INTERFACE:$<TARGET_PROPERTY:inference_engine_transformations,INTERFACE_INCLUDE_DIRECTORIES>>
|
$<BUILD_INTERFACE:$<TARGET_PROPERTY:inference_engine_transformations,INTERFACE_INCLUDE_DIRECTORIES>>)
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../..)
|
|
||||||
|
|
||||||
add_cpplint_target(${TARGET_NAME}_cpplint FOR_TARGETS ${TARGET_NAME}_obj)
|
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
|
target_include_directories(${TARGET_NAME} INTERFACE
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
$<BUILD_INTERFACE:$<TARGET_PROPERTY:ngraph,INTERFACE_INCLUDE_DIRECTORIES>>
|
$<BUILD_INTERFACE:$<TARGET_PROPERTY:ngraph,INTERFACE_INCLUDE_DIRECTORIES>>
|
||||||
$<BUILD_INTERFACE:$<TARGET_PROPERTY:inference_engine_transformations,INTERFACE_INCLUDE_DIRECTORIES>>
|
$<BUILD_INTERFACE:$<TARGET_PROPERTY:inference_engine_transformations,INTERFACE_INCLUDE_DIRECTORIES>>)
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../..)
|
|
||||||
|
|
||||||
# LTO
|
# LTO
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
#include <low_precision/layer_transformation.hpp>
|
#include <low_precision/layer_transformation.hpp>
|
||||||
#include <low_precision/network_helper.hpp>
|
#include <low_precision/network_helper.hpp>
|
||||||
#include "core/src/itt.hpp"
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
#include "low_precision/low_precision.hpp"
|
#include "low_precision/low_precision.hpp"
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include "core/src/itt.hpp"
|
|
||||||
#include <ngraph/ngraph.hpp>
|
#include <ngraph/ngraph.hpp>
|
||||||
#include <ngraph/pass/manager.hpp>
|
#include <ngraph/pass/manager.hpp>
|
||||||
#include <ngraph/pass/constant_folding.hpp>
|
#include <ngraph/pass/constant_folding.hpp>
|
||||||
|
@ -91,10 +91,7 @@ class OPENVINO_API ModelPass : public PassBase {
|
|||||||
public:
|
public:
|
||||||
OPENVINO_RTTI("ov::pass::ModelPass");
|
OPENVINO_RTTI("ov::pass::ModelPass");
|
||||||
~ModelPass() override;
|
~ModelPass() override;
|
||||||
virtual bool run_on_model(const std::shared_ptr<ov::Model>& m);
|
virtual bool run_on_model(const std::shared_ptr<ov::Model>& m) = 0;
|
||||||
|
|
||||||
private:
|
|
||||||
bool call_on_model{false};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace pass
|
} // namespace pass
|
||||||
|
@ -33,10 +33,6 @@ OV_CC_DOMAINS(ov_opset);
|
|||||||
*/
|
*/
|
||||||
#if defined(SELECTIVE_BUILD_ANALYZER)
|
#if defined(SELECTIVE_BUILD_ANALYZER)
|
||||||
# define OV_OP_SCOPE(region) OV_SCOPE(ov_op, region)
|
# 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) \
|
# define REGISTER_OP(opset_name, op_name) \
|
||||||
OV_ITT_SCOPED_TASK(SIMPLE_ov_opset, openvino::itt::handle(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<op_namespace::op_name>()
|
# define INSERT_OP(opset_name, op_name, op_namespace) opset.insert<op_namespace::op_name>()
|
||||||
@ -44,14 +40,12 @@ OV_CC_DOMAINS(ov_opset);
|
|||||||
# define OV_OP_SCOPE(region) \
|
# define OV_OP_SCOPE(region) \
|
||||||
if (OV_CC_SCOPE_IS_ENABLED(OV_PP_CAT3(ov_op, _, region)) == 0) \
|
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!")
|
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 REGISTER_OP(opset_name, op_name)
|
||||||
# define INSERT_OP(opset_name, op_name, op_namespace) \
|
# 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) \
|
if (OV_CC_SCOPE_IS_ENABLED(OV_PP_CAT4(ov_opset_, opset_name, _, op_name)) == 1) \
|
||||||
opset.insert<op_namespace::op_name>()
|
opset.insert<op_namespace::op_name>()
|
||||||
#else
|
#else
|
||||||
# define OV_OP_SCOPE(region) OV_ITT_SCOPED_TASK(ov::itt::domains::ov_op, OV_PP_TOSTRING(region))
|
# 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 REGISTER_OP(opset_name, op_name)
|
||||||
# define INSERT_OP(opset_name, op_name, op_namespace) opset.insert<op_namespace::op_name>()
|
# define INSERT_OP(opset_name, op_name, op_namespace) opset.insert<op_namespace::op_name>()
|
||||||
#endif
|
#endif
|
||||||
|
@ -72,13 +72,6 @@ private:
|
|||||||
|
|
||||||
ov::pass::ModelPass::~ModelPass() = default;
|
ov::pass::ModelPass::~ModelPass() = default;
|
||||||
|
|
||||||
bool ov::pass::ModelPass::run_on_model(const std::shared_ptr<ov::Model>& 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_RTTI_DEFINITION(ngraph::pass::NodePass, "ngraph::pass::NodePass", 0);
|
||||||
|
|
||||||
ngraph::pass::NodePass::~NodePass() = default;
|
ngraph::pass::NodePass::~NodePass() = default;
|
||||||
|
@ -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_link_libraries(interpreter_backend PRIVATE ngraph::builder ngraph::reference openvino::util openvino::runtime::dev)
|
||||||
|
|
||||||
target_include_directories(interpreter_backend PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
target_include_directories(interpreter_backend PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../../..
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../../../common/conditional_compilation/include)
|
|
||||||
|
|
||||||
file(GLOB_RECURSE all_backends_src "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp")
|
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})
|
add_clang_format_target(interpreter_backend_clang FOR_SOURCES ${all_backends_src})
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
|
|
||||||
#include "core/src/itt.hpp"
|
|
||||||
#include "ngraph/builder/reshape.hpp"
|
#include "ngraph/builder/reshape.hpp"
|
||||||
#include "ngraph/op/broadcast.hpp"
|
#include "ngraph/op/broadcast.hpp"
|
||||||
#include "ngraph/op/range.hpp"
|
#include "ngraph/op/range.hpp"
|
||||||
|
Loading…
Reference in New Issue
Block a user