Removed deprecated ICNNNetwork::getData (#1093)
authorIlya Lavrenov <ilya.lavrenov@intel.com>
Wed, 24 Jun 2020 02:53:28 +0000 (05:53 +0300)
committerGitHub <noreply@github.com>
Wed, 24 Jun 2020 02:53:28 +0000 (05:53 +0300)
inference-engine/include/ie_icnn_network.hpp
inference-engine/src/inference_engine/cnn_network_ngraph_impl.cpp
inference-engine/src/inference_engine/cnn_network_ngraph_impl.hpp
inference-engine/src/legacy_api/include/cnn_network_impl.hpp
inference-engine/tests_deprecated/unit/graph_tools/graph_copy_tests.cpp

index 7889db6..93a6a5d 100644 (file)
@@ -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
index 4432715..1af35ab 100644 (file)
@@ -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();
index 3a90758..0210cf2 100644 (file)
@@ -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<ICNNNetwork> getCNNNetwork();
 
     // This method is not really implemented; don't call it
index 9f1c9da..1aad2c9 100644 (file)
@@ -77,7 +77,7 @@ public:
         return _layers.size();
     }
 
-    DataPtr& getData(const char* name) noexcept override {
+    DataPtr& getData(const char* name) noexcept {
         return _data[name];
     }
 
index d225397..525fbc0 100644 (file)
@@ -100,16 +100,6 @@ TEST_F(GraphCopyTests, canPreserveAttributes) {
     ASSERT_STREQ(idMemInput.c_str(), "r-1-2-3");
 }
 
-TEST_F(GraphCopyTests, canPreserveGetData) {
-    auto clone = CNNNetCopy<MockCopier>(*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<float, float, float, float, float> {