From fef0df6ee100e19775ad22e766967f04ef58fac9 Mon Sep 17 00:00:00 2001 From: River Li Date: Mon, 13 Nov 2023 14:37:35 +0800 Subject: [PATCH] [CPU] Add deprecation message to extension API (#20970) --- src/plugins/intel_cpu/src/plugin.cpp | 8 +++++++- src/plugins/intel_cpu/src/plugin.h | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/plugins/intel_cpu/src/plugin.cpp b/src/plugins/intel_cpu/src/plugin.cpp index ae37a2a1bf70b7..5b22beb98ba6ea 100644 --- a/src/plugins/intel_cpu/src/plugin.cpp +++ b/src/plugins/intel_cpu/src/plugin.cpp @@ -820,6 +820,12 @@ ov::Any Engine::get_ro_property(const std::string& name, const ov::AnyMap& optio return get_metric_legacy(name, options); } +OPENVINO_SUPPRESS_DEPRECATED_START +void Engine::add_extension(const InferenceEngine::IExtensionPtr& extension) { + extensionManager->AddExtension(extension); +} +OPENVINO_SUPPRESS_DEPRECATED_END + ov::SupportedOpsMap Engine::query_model(const std::shared_ptr& model, const ov::AnyMap& config) const { WeightsSharing::Ptr fake_w_cache; @@ -839,7 +845,7 @@ ov::SupportedOpsMap Engine::query_model(const std::shared_ptr& const Config::SnippetsMode snippetsMode = getSnippetsMode(config, conf); auto context = - std::make_shared(conf, nullptr, fake_w_cache, false); + std::make_shared(conf, extensionManager, fake_w_cache, false); auto supported = ov::get_supported_nodes( model, diff --git a/src/plugins/intel_cpu/src/plugin.h b/src/plugins/intel_cpu/src/plugin.h index 4bb728f91376e0..2a44c35988a746 100644 --- a/src/plugins/intel_cpu/src/plugin.h +++ b/src/plugins/intel_cpu/src/plugin.h @@ -57,6 +57,10 @@ class Engine : public ov::IPlugin { "get_default_context is not supported by CPU plugin!"); }; + OPENVINO_SUPPRESS_DEPRECATED_START + void add_extension(const std::shared_ptr& extension) override; + OPENVINO_SUPPRESS_DEPRECATED_END + private: bool is_legacy_api() const;