From: Ilya Lavrenov Date: Wed, 24 Jun 2020 02:53:28 +0000 (+0300) Subject: Removed deprecated ICNNNetwork::getData (#1093) X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=94c8b9e5a72efd51632f4d6a9742995582a47a41;p=platform%2Fupstream%2Fdldt.git Removed deprecated ICNNNetwork::getData (#1093) --- diff --git a/inference-engine/include/ie_icnn_network.hpp b/inference-engine/include/ie_icnn_network.hpp index 7889db6..93a6a5d 100644 --- a/inference-engine/include/ie_icnn_network.hpp +++ b/inference-engine/include/ie_icnn_network.hpp @@ -107,18 +107,6 @@ public: /** * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1 - * @brief Returns a smart pointer reference to a Data node given its name. - * - * If the Data node is missing, returns reference to a default initialized new empty data pointer with given name. - * - * @param dname Name of the Data node - * @return Data node smart pointer - */ - INFERENCE_ENGINE_DEPRECATED("Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1") - virtual DataPtr& getData(const char* dname) noexcept = 0; - - /** - * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1 * @brief Insert a layer into the network. A user is responsible to connect it to other data elements. * * @param layer Const reference to a layer smart pointer diff --git a/inference-engine/src/inference_engine/cnn_network_ngraph_impl.cpp b/inference-engine/src/inference_engine/cnn_network_ngraph_impl.cpp index 4432715..1af35ab 100644 --- a/inference-engine/src/inference_engine/cnn_network_ngraph_impl.cpp +++ b/inference-engine/src/inference_engine/cnn_network_ngraph_impl.cpp @@ -171,26 +171,6 @@ void CNNNetworkNGraphImpl::setInputInfo(InputInfo::Ptr data) { _inputData[data->name()] = data; } -DataPtr& CNNNetworkNGraphImpl::getData(const char* name) noexcept { - if (cnnNetwork) return cnnNetwork->getData(name); - if (_data.find(name) != _data.end()) { - return _data[name]; - } else { - try { - convertToCNNNetworkImpl(); - return cnnNetwork->getData(name); - } catch (...) { - return _data[name]; - } - } -} - -DataPtr& CNNNetworkNGraphImpl::getData(const std::string& name) { - IE_SUPPRESS_DEPRECATED_START - return getData(name.c_str()); - IE_SUPPRESS_DEPRECATED_END -} - const std::string& CNNNetworkNGraphImpl::getName() const noexcept { if (cnnNetwork) { return cnnNetwork->getName(); diff --git a/inference-engine/src/inference_engine/cnn_network_ngraph_impl.hpp b/inference-engine/src/inference_engine/cnn_network_ngraph_impl.hpp index 3a90758..0210cf2 100644 --- a/inference-engine/src/inference_engine/cnn_network_ngraph_impl.hpp +++ b/inference-engine/src/inference_engine/cnn_network_ngraph_impl.hpp @@ -58,12 +58,6 @@ public: void setInputInfo(InputInfo::Ptr data); - INFERENCE_ENGINE_DEPRECATED("Use ngraph::Function directly") - DataPtr& getData(const char* name) noexcept override; - - INFERENCE_ENGINE_DEPRECATED("Use ngraph::Function directly") - DataPtr& getData(const std::string& name); - std::shared_ptr getCNNNetwork(); // This method is not really implemented; don't call it diff --git a/inference-engine/src/legacy_api/include/cnn_network_impl.hpp b/inference-engine/src/legacy_api/include/cnn_network_impl.hpp index 9f1c9da..1aad2c9 100644 --- a/inference-engine/src/legacy_api/include/cnn_network_impl.hpp +++ b/inference-engine/src/legacy_api/include/cnn_network_impl.hpp @@ -77,7 +77,7 @@ public: return _layers.size(); } - DataPtr& getData(const char* name) noexcept override { + DataPtr& getData(const char* name) noexcept { return _data[name]; } diff --git a/inference-engine/tests_deprecated/unit/graph_tools/graph_copy_tests.cpp b/inference-engine/tests_deprecated/unit/graph_tools/graph_copy_tests.cpp index d225397..525fbc0 100644 --- a/inference-engine/tests_deprecated/unit/graph_tools/graph_copy_tests.cpp +++ b/inference-engine/tests_deprecated/unit/graph_tools/graph_copy_tests.cpp @@ -100,16 +100,6 @@ TEST_F(GraphCopyTests, canPreserveAttributes) { ASSERT_STREQ(idMemInput.c_str(), "r-1-2-3"); } -TEST_F(GraphCopyTests, canPreserveGetData) { - auto clone = CNNNetCopy(*mockNet, mc); - - ASSERT_NE(clone->getData("1"), nullptr); - ASSERT_NE(clone->getData("2"), nullptr); - ASSERT_NE(clone->getData("3"), nullptr); - ASSERT_NE(clone->getData("4"), nullptr); - ASSERT_NE(clone->getData("5"), nullptr); -} - #ifdef ENABLE_GNA using namespace GNAPluginNS; struct _FP32_2_FP32 : public GNAPluginNS::frontend::QuantDescTmpl {