Skip to content

Commit

Permalink
[CPU] Add deprecation message to extension API (openvinotoolkit#20970)
Browse files Browse the repository at this point in the history
  • Loading branch information
riverlijunjie authored Nov 13, 2023
1 parent 306137f commit fef0df6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/plugins/intel_cpu/src/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<const ov::Model>& model, const ov::AnyMap& config) const {
WeightsSharing::Ptr fake_w_cache;

Expand All @@ -839,7 +845,7 @@ ov::SupportedOpsMap Engine::query_model(const std::shared_ptr<const ov::Model>&
const Config::SnippetsMode snippetsMode = getSnippetsMode(config, conf);

auto context =
std::make_shared<GraphContext>(conf, nullptr, fake_w_cache, false);
std::make_shared<GraphContext>(conf, extensionManager, fake_w_cache, false);

auto supported = ov::get_supported_nodes(
model,
Expand Down
4 changes: 4 additions & 0 deletions src/plugins/intel_cpu/src/plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<InferenceEngine::IExtension>& extension) override;
OPENVINO_SUPPRESS_DEPRECATED_END

private:
bool is_legacy_api() const;

Expand Down

0 comments on commit fef0df6

Please sign in to comment.