Removed deprecated error listener, getmappedtopology (#915)
This commit is contained in:
1 parent
3a900d0080
commit
351a11b730
43 files changed
+14
-393
No files matched your search
@@ -1567,18 +1567,6 @@ cdef class IENetwork:
|
||||
def batch_size(self):
|
||||
return self.impl.getBatch()
|
||||
|
||||
## \note This property is deprecated:
|
||||
# network precision does not make sense, use precision on edges.
|
||||
#
|
||||
# Precision of the network
|
||||
@property
|
||||
def precision(self):
|
||||
warnings.warn("Network precision is deprecated "
|
||||
"because it does not make sence, "
|
||||
"use precision on egdes.",
|
||||
DeprecationWarning)
|
||||
return self.impl.precision.decode()
|
||||
|
||||
@batch_size.setter
|
||||
def batch_size(self, batch: int):
|
||||
if batch <= 0:
|
||||
|
||||
@@ -175,9 +175,6 @@ InferenceEnginePython::IENetwork::IENetwork(const std::string &model, const std:
|
||||
actual = std::make_shared<InferenceEngine::CNNNetwork>(net);
|
||||
name = actual->getName();
|
||||
batch_size = actual->getBatchSize();
|
||||
IE_SUPPRESS_DEPRECATED_START
|
||||
precision = actual->getPrecision().name();
|
||||
IE_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
|
||||
InferenceEnginePython::IENetwork::IENetwork(const std::shared_ptr<InferenceEngine::CNNNetwork> &cnn_network)
|
||||
@@ -185,9 +182,6 @@ InferenceEnginePython::IENetwork::IENetwork(const std::shared_ptr<InferenceEngin
|
||||
if (actual == nullptr) THROW_IE_EXCEPTION << "IENetwork was not initialized.";
|
||||
name = actual->getName();
|
||||
batch_size = actual->getBatchSize();
|
||||
IE_SUPPRESS_DEPRECATED_START
|
||||
precision = actual->getPrecision().name();
|
||||
IE_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
|
||||
InferenceEnginePython::IENetwork::IENetwork(PyObject* network) {
|
||||
@@ -200,9 +194,6 @@ InferenceEnginePython::IENetwork::IENetwork(PyObject* network) {
|
||||
actual = std::make_shared<InferenceEngine::CNNNetwork>(cnnNetwork);
|
||||
name = actual->getName();
|
||||
batch_size = actual->getBatchSize();
|
||||
IE_SUPPRESS_DEPRECATED_START
|
||||
precision = actual->getPrecision().name();
|
||||
IE_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
|
||||
void
|
||||
@@ -218,9 +209,6 @@ InferenceEnginePython::IENetwork::load_from_buffer(const char *xml, size_t xml_s
|
||||
IE_SUPPRESS_DEPRECATED_END
|
||||
actual = std::make_shared<InferenceEngine::CNNNetwork>(net);
|
||||
batch_size = actual->getBatchSize();
|
||||
IE_SUPPRESS_DEPRECATED_START
|
||||
precision = actual->getPrecision().name();
|
||||
IE_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
|
||||
void InferenceEnginePython::IENetwork::serialize(const std::string &path_to_xml, const std::string &path_to_bin) {
|
||||
|
||||
@@ -41,7 +41,6 @@ struct IENetwork {
|
||||
std::shared_ptr<InferenceEngine::CNNNetwork> actual;
|
||||
std::string name;
|
||||
std::size_t batch_size;
|
||||
std::string precision;
|
||||
PyObject* getFunction();
|
||||
|
||||
void setBatch(const size_t size);
|
||||
|
||||
@@ -79,17 +79,6 @@ public:
|
||||
*/
|
||||
virtual ~CNNNetwork() {}
|
||||
|
||||
/**
|
||||
* @deprecated Network precision does not make sence, use precision on egdes. The method will be removed in 2021.1
|
||||
* @copybrief ICNNNetwork::getPrecision
|
||||
*
|
||||
* Wraps ICNNNetwork::getPrecision
|
||||
*
|
||||
* @return A precision type
|
||||
*/
|
||||
INFERENCE_ENGINE_DEPRECATED("Network precision does not make sence, use precision on egdes. The method will be removed in 2021.1")
|
||||
virtual Precision getPrecision() const;
|
||||
|
||||
/**
|
||||
* @copybrief ICNNNetwork::getOutputsInfo
|
||||
*
|
||||
|
||||
@@ -149,21 +149,6 @@ public:
|
||||
CALL_STATUS_FNC(Export, networkModel);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use ExecutableNetwork::GetExecGraphInfo to get information about an internal graph.
|
||||
* This method will be removed in 2021.1 release.
|
||||
* @copybrief IExecutableNetwork::GetMappedTopology
|
||||
*
|
||||
* Wraps IExecutableNetwork::GetMappedTopology.
|
||||
* @param deployedTopology Map of PrimitiveInfo objects that represent the deployed topology
|
||||
*/
|
||||
IE_SUPPRESS_DEPRECATED_START
|
||||
INFERENCE_ENGINE_DEPRECATED("Use ExecutableNetwork::GetExecGraphInfo to get information about an internal graph")
|
||||
void GetMappedTopology(std::map<std::string, std::vector<PrimitiveInfo::Ptr>>& deployedTopology) {
|
||||
CALL_STATUS_FNC(GetMappedTopology, deployedTopology);
|
||||
}
|
||||
IE_SUPPRESS_DEPRECATED_END
|
||||
|
||||
/**
|
||||
* @brief cast operator is used when this wrapper initialized by LoadNetwork
|
||||
* @return A shared pointer to IExecutableNetwork interface.
|
||||
|
||||
@@ -71,20 +71,6 @@ public:
|
||||
*/
|
||||
std::map<std::string, Version> GetVersions(const std::string& deviceName) const;
|
||||
|
||||
/**
|
||||
* @deprecated IErrorListener is not used anymore. An exception is thrown in case of any unexpected situations.
|
||||
* The function will be removed in 2021.1 release.
|
||||
* @brief Sets logging callback
|
||||
*
|
||||
* Logging is used to track what is going on inside the plugins, Inference Engine library
|
||||
*
|
||||
* @param listener Logging sink
|
||||
*/
|
||||
IE_SUPPRESS_DEPRECATED_START
|
||||
INFERENCE_ENGINE_DEPRECATED("IErrorListener is not used anymore. An exception is thrown in case of any unexpected situations.")
|
||||
void SetLogCallback(IErrorListener& listener) const;
|
||||
IE_SUPPRESS_DEPRECATED_END
|
||||
|
||||
#ifdef ENABLE_UNICODE_PATH_SUPPORT
|
||||
/**
|
||||
* @brief Reads IR xml and bin files
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
// Copyright (C) 2018-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
/**
|
||||
* @brief A header file for a plugin logging mechanism
|
||||
*
|
||||
* @file ie_error.hpp
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
namespace InferenceEngine {
|
||||
/**
|
||||
* @deprecated IErrorListener is not used anymore. An exception is thrown / StatusCode set in case of any unexpected situations
|
||||
* The class will be removed in 2021.1 release.
|
||||
* @brief This class represents a custom error listener.
|
||||
*/
|
||||
class
|
||||
INFERENCE_ENGINE_DEPRECATED("IErrorListener is not used anymore. An exception is thrown / StatusCode set in case of any unexpected situations")
|
||||
IErrorListener {
|
||||
public:
|
||||
/**
|
||||
* @brief The plugin calls this method with a null terminated error message (in case of error)
|
||||
* @param msg Error message
|
||||
*/
|
||||
virtual void onError(const char* msg) noexcept = 0;
|
||||
};
|
||||
} // namespace InferenceEngine
|
||||
@@ -71,20 +71,6 @@ public:
|
||||
actual->GetVersion(versionInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated IErrorListener is not used anymore. StatusCode is provided in case of unexpected situations
|
||||
* The method will be removed in 2021.1 release.
|
||||
* @brief Sets a log callback that is used to track what is going on inside
|
||||
*
|
||||
* @param listener Logging listener
|
||||
*/
|
||||
IE_SUPPRESS_DEPRECATED_START
|
||||
INFERENCE_ENGINE_DEPRECATED("IErrorListener is not used anymore. StatusCode is provided in case of unexpected situations")
|
||||
void SetLogCallback(InferenceEngine::IErrorListener& listener) noexcept override {
|
||||
actual->SetLogCallback(listener);
|
||||
}
|
||||
IE_SUPPRESS_DEPRECATED_END
|
||||
|
||||
/**
|
||||
* @brief Cleans the resources up
|
||||
*/
|
||||
@@ -226,20 +212,6 @@ public:
|
||||
actual->GetVersion(versionInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief IErrorListener is not used anymore. StatusCode is provided in case of unexpected situations
|
||||
* The method will be removed in 2021.1 release.
|
||||
* @brief Sets a log callback that is used to track what is going on inside
|
||||
*
|
||||
* @param listener Logging listener
|
||||
*/
|
||||
IE_SUPPRESS_DEPRECATED_START
|
||||
INFERENCE_ENGINE_DEPRECATED("IErrorListener is not used anymore. StatusCode is provided in case of unexpected situations")
|
||||
void SetLogCallback(InferenceEngine::IErrorListener& listener) noexcept override {
|
||||
actual->SetLogCallback(listener);
|
||||
}
|
||||
IE_SUPPRESS_DEPRECATED_END
|
||||
|
||||
/**
|
||||
* @brief Cleans the resources up
|
||||
*/
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include "ie_imemory_state.hpp"
|
||||
#include "ie_input_info.hpp"
|
||||
#include "ie_parameter.hpp"
|
||||
#include "ie_primitive_info.hpp"
|
||||
#include "ie_remote_context.hpp"
|
||||
|
||||
namespace InferenceEngine {
|
||||
@@ -99,21 +98,6 @@ public:
|
||||
*/
|
||||
virtual StatusCode Export(std::ostream& networkModel, ResponseDesc* resp) noexcept = 0;
|
||||
|
||||
/**
|
||||
* @deprecated Use ExecutableNetwork::GetExecGraphInfo to get information about an internal graph.
|
||||
* The method will be removed in 2021.1 release.
|
||||
* @brief Get the mapping of IR layer names to implemented kernels
|
||||
*
|
||||
* @param deployedTopology Map of PrimitiveInfo objects that represent the deployed topology
|
||||
* @param resp Optional: pointer to an already allocated object to contain information in case of failure
|
||||
* @return Status code of the operation: InferenceEngine::OK (0) for success
|
||||
*/
|
||||
IE_SUPPRESS_DEPRECATED_START_WIN
|
||||
INFERENCE_ENGINE_DEPRECATED("Use ExecutableNetwork::GetExecGraphInfo to get information about an internal graph")
|
||||
virtual StatusCode GetMappedTopology(std::map<std::string, std::vector<PrimitiveInfo::Ptr>>& deployedTopology,
|
||||
ResponseDesc* resp) noexcept = 0;
|
||||
IE_SUPPRESS_DEPRECATED_END_WIN
|
||||
|
||||
/**
|
||||
* @brief Get executable graph information from a device
|
||||
*
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
#include "details/ie_no_copy.hpp"
|
||||
#include "ie_api.h"
|
||||
#include "ie_error.hpp"
|
||||
#include "ie_common.h"
|
||||
#include "ie_layouts.h"
|
||||
#include "ie_blob.h"
|
||||
@@ -212,20 +211,6 @@ public:
|
||||
*/
|
||||
class IShapeInferExtension : public InferenceEngine::details::IRelease {
|
||||
public:
|
||||
/**
|
||||
* @deprecated IErrorListener is not used anymore. StatusCode is provided in case of unexpected situations
|
||||
* The method will be removed in 2021.1 release.
|
||||
* @brief Sets logging callback.
|
||||
*
|
||||
* Logging is used to track what is going on inside.
|
||||
*
|
||||
* @param listener Logging sink
|
||||
*/
|
||||
IE_SUPPRESS_DEPRECATED_START
|
||||
INFERENCE_ENGINE_DEPRECATED("IErrorListener is not used anymore. StatusCode is provided in case of unexpected situations")
|
||||
virtual void SetLogCallback(InferenceEngine::IErrorListener& listener) noexcept { (void)listener; }
|
||||
IE_SUPPRESS_DEPRECATED_END
|
||||
|
||||
/**
|
||||
* @brief Gets extension version information and stores in versionInfo
|
||||
* @param versionInfo Pointer to version info, will be set by plugin
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include "details/ie_no_copy.hpp"
|
||||
#include "ie_api.h"
|
||||
#include "ie_core.hpp"
|
||||
#include "ie_error.hpp"
|
||||
#include "ie_iexecutable_network.hpp"
|
||||
#include "ie_version.hpp"
|
||||
|
||||
@@ -42,19 +41,6 @@ public:
|
||||
*/
|
||||
virtual void GetVersion(const Version*& versionInfo) noexcept = 0;
|
||||
|
||||
/**
|
||||
* @deprecated IErrorListener is not used anymore. StatusCode is provided in case of unexpected situations
|
||||
* This API will be removed in 2021.1 release.
|
||||
* @brief Sets logging callback
|
||||
*
|
||||
* Logging is used to track what is going on inside
|
||||
* @param listener Logging sink
|
||||
*/
|
||||
IE_SUPPRESS_DEPRECATED_START
|
||||
INFERENCE_ENGINE_DEPRECATED("IErrorListener is not used anymore. StatusCode is provided in case of unexpected situations")
|
||||
virtual void SetLogCallback(IErrorListener& listener) noexcept = 0;
|
||||
IE_SUPPRESS_DEPRECATED_END
|
||||
|
||||
/**
|
||||
* @brief Creates an executable network from a network object. User can create as many networks as they need and use
|
||||
* them simultaneously (up to the limitation of the hardware resources)
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
// Copyright (C) 2018-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
/**
|
||||
* @brief A header file for the PrimitiveInfo struct
|
||||
*
|
||||
* @file ie_primitive_info.hpp
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "ie_tensor_info.hpp"
|
||||
|
||||
namespace InferenceEngine {
|
||||
|
||||
/**
|
||||
* @deprecated Use ExecutableNetwork::GetExecGraphInfo to get information about an internal graph.
|
||||
* This structure will be removed in 2021.1 release.
|
||||
* @brief Structure with information about Primitive
|
||||
*/
|
||||
struct INFERENCE_ENGINE_DEPRECATED("Use ExecutableNetwork::GetExecGraphInfo to get information about an internal graph") PrimitiveInfo {
|
||||
/**
|
||||
* @brief A shared pointer to PrimitiveInfo object
|
||||
*/
|
||||
IE_SUPPRESS_DEPRECATED_START
|
||||
using Ptr = std::shared_ptr<PrimitiveInfo>;
|
||||
IE_SUPPRESS_DEPRECATED_END
|
||||
|
||||
/**
|
||||
* @brief Some internal id, could be used as a name
|
||||
*/
|
||||
std::string sId;
|
||||
|
||||
/**
|
||||
* @brief Implementation type of this kernel
|
||||
*/
|
||||
std::string sType;
|
||||
|
||||
/**
|
||||
* @brief Mainly the allocation of the output tensor
|
||||
*/
|
||||
int iPreAllocatedMemory;
|
||||
|
||||
IE_SUPPRESS_DEPRECATED_START
|
||||
|
||||
/**
|
||||
* @brief Vector of TensorInfo objects that are related to input tensors
|
||||
*/
|
||||
std::vector<TensorInfo::Ptr> inputs;
|
||||
|
||||
/**
|
||||
* @brief Vector of TensorInfo object that are related to outputs tensors
|
||||
*/
|
||||
std::vector<TensorInfo::Ptr> outputs;
|
||||
|
||||
IE_SUPPRESS_DEPRECATED_END
|
||||
|
||||
/**
|
||||
* @brief Any other important textual information user might find interesting about this kernel
|
||||
*/
|
||||
std::map<std::string, std::string> extraInfo;
|
||||
};
|
||||
|
||||
} // namespace InferenceEngine
|
||||
@@ -1,44 +0,0 @@
|
||||
// Copyright (C) 2018-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
/**
|
||||
* @brief A header file for the TensorInfo structure
|
||||
*
|
||||
* @file ie_tensor_info.hpp
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <ie_api.h>
|
||||
|
||||
namespace InferenceEngine {
|
||||
|
||||
/**
|
||||
* @deprecated Use ExecutableNetwork::GetExecGraphInfo to get information about an internal graph.
|
||||
* This API will be removed in 2021.1 release.
|
||||
* @struct TensorInfo
|
||||
* @brief This structure describes tensor information
|
||||
*/
|
||||
struct INFERENCE_ENGINE_DEPRECATED("Use ExecutableNetwork::GetExecGraphInfo to get information about an internal graph") TensorInfo {
|
||||
/**
|
||||
* @brief A shared pointer to the TensorInfo object
|
||||
*/
|
||||
IE_SUPPRESS_DEPRECATED_START
|
||||
using Ptr = std::shared_ptr<TensorInfo>;
|
||||
IE_SUPPRESS_DEPRECATED_END
|
||||
|
||||
/**
|
||||
* @brief A map of extra info:
|
||||
* - memory layout BFYX, BXYF (enum)
|
||||
* - size
|
||||
* - precision
|
||||
*/
|
||||
std::map<std::string, std::string> extraInfo;
|
||||
};
|
||||
|
||||
} // namespace InferenceEngine
|
||||
@@ -15,7 +15,6 @@
|
||||
#include <cpp/ie_executable_network.hpp>
|
||||
#include <cpp/ie_plugin_cpp.hpp>
|
||||
#include <ie_core.hpp>
|
||||
#include <ie_error.hpp>
|
||||
#include <ie_icnn_network.hpp>
|
||||
#include <ie_icnn_network_stats.hpp>
|
||||
#include <ie_plugin_config.hpp>
|
||||
|
||||
@@ -635,11 +635,6 @@ std::map<std::string, Version> Core::GetVersions(const std::string& deviceName)
|
||||
return versions;
|
||||
}
|
||||
|
||||
IE_SUPPRESS_DEPRECATED_START
|
||||
void Core::SetLogCallback(IErrorListener&) const {
|
||||
}
|
||||
IE_SUPPRESS_DEPRECATED_END
|
||||
|
||||
CNNNetwork Core::ReadNetwork(const std::string& modelPath, const std::string& binPath) const {
|
||||
return _impl->ReadNetwork(modelPath, binPath);
|
||||
}
|
||||
|
||||
@@ -12,11 +12,6 @@ IE_SUPPRESS_DEPRECATED_START
|
||||
|
||||
namespace InferenceEngine {
|
||||
|
||||
Precision CNNNetwork::getPrecision() const {
|
||||
if (actual == nullptr) THROW_IE_EXCEPTION << "CNNNetwork was not initialized.";
|
||||
return actual->getPrecision();
|
||||
}
|
||||
|
||||
CNNLayerPtr CNNNetwork::getLayerByName(const char* layerName) const {
|
||||
CNNLayerPtr layer;
|
||||
CALL_STATUS_FNC(getLayerByName, layerName, layer);
|
||||
|
||||
@@ -63,13 +63,6 @@ public:
|
||||
TO_STATUS(_impl->Export(networkModel));
|
||||
}
|
||||
|
||||
IE_SUPPRESS_DEPRECATED_START
|
||||
StatusCode GetMappedTopology(std::map<std::string, std::vector<PrimitiveInfo::Ptr>>& deployedTopology,
|
||||
ResponseDesc* resp) noexcept override {
|
||||
return NOT_IMPLEMENTED;
|
||||
}
|
||||
IE_SUPPRESS_DEPRECATED_END
|
||||
|
||||
StatusCode GetExecGraphInfo(ICNNNetwork::Ptr& graphPtr, ResponseDesc* resp) noexcept override {
|
||||
TO_STATUS(_impl->GetExecGraphInfo(graphPtr));
|
||||
}
|
||||
|
||||
@@ -73,12 +73,6 @@ public:
|
||||
versionInfo = &_version;
|
||||
}
|
||||
|
||||
IE_SUPPRESS_DEPRECATED_START
|
||||
void SetLogCallback(IErrorListener& listener) noexcept override {
|
||||
(void)listener;
|
||||
}
|
||||
IE_SUPPRESS_DEPRECATED_END
|
||||
|
||||
StatusCode LoadNetwork(IExecutableNetwork::Ptr& executableNetwork, const ICNNNetwork& network,
|
||||
const std::map<std::string, std::string>& config, ResponseDesc* resp) noexcept override {
|
||||
TO_STATUS(_impl->LoadNetwork(executableNetwork, network, config));
|
||||
|
||||
@@ -19,13 +19,6 @@ TEST_F(CNNNetworkTests, throwsOnInitWithNullNgraph) {
|
||||
ASSERT_THROW(CNNNetwork network(nlptr), InferenceEngine::details::InferenceEngineException);
|
||||
}
|
||||
|
||||
TEST_F(CNNNetworkTests, throwsOnUninitializedGetPrecision) {
|
||||
CNNNetwork network;
|
||||
IE_SUPPRESS_DEPRECATED_START
|
||||
ASSERT_THROW(network.getPrecision(), InferenceEngine::details::InferenceEngineException);
|
||||
IE_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
|
||||
TEST_F(CNNNetworkTests, throwsOnUninitializedGetOutputsInfo) {
|
||||
CNNNetwork network;
|
||||
ASSERT_THROW(network.getOutputsInfo(), InferenceEngine::details::InferenceEngineException);
|
||||
|
||||
@@ -52,9 +52,6 @@ class TestExtension : public InferenceEngine::IExtension {
|
||||
public:
|
||||
TestExtension() = default;
|
||||
void GetVersion(const InferenceEngine::Version*& versionInfo) const noexcept override;
|
||||
IE_SUPPRESS_DEPRECATED_START
|
||||
void SetLogCallback(InferenceEngine::IErrorListener& /*listener*/) noexcept override {}
|
||||
IE_SUPPRESS_DEPRECATED_END
|
||||
void Unload() noexcept override {}
|
||||
void Release() noexcept override {
|
||||
delete this;
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
//
|
||||
|
||||
#include "unit_test_utils/mocks/mock_allocator.hpp"
|
||||
#include "unit_test_utils/mocks/mock_error_listener.hpp"
|
||||
#include "unit_test_utils/mocks/mock_icnn_network.hpp"
|
||||
#include "unit_test_utils/mocks/mock_ie_imemory_state.hpp"
|
||||
#include "unit_test_utils/mocks/mock_iexecutable_network.hpp"
|
||||
|
||||
-1
@@ -30,7 +30,6 @@ public:
|
||||
MOCK_METHOD1(setNetworkOutputs, void(OutputsDataMap));
|
||||
MOCK_METHOD1(CreateInferRequest, void(IInferRequest::Ptr &));
|
||||
MOCK_METHOD1(Export, void(const std::string &));
|
||||
MOCK_METHOD1(GetMappedTopology, void(std::map<std::string, std::vector<PrimitiveInfo::Ptr>> &));
|
||||
MOCK_METHOD1(GetExecGraphInfo, void(ICNNNetwork::Ptr &));
|
||||
void WrapOstreamExport(std::ostream& networkModel) {
|
||||
ExecutableNetworkInternal::Export(networkModel);
|
||||
|
||||
-1
@@ -22,6 +22,5 @@ public:
|
||||
AsyncInferRequestInternal::Ptr(InputsDataMap networkInputs, OutputsDataMap networkOutputs));
|
||||
MOCK_METHOD1(Export, void(const std::string &));
|
||||
void Export(std::ostream&) override {}
|
||||
MOCK_METHOD1(GetMappedTopology, void(std::map<std::string, std::vector<PrimitiveInfo::Ptr>> &));
|
||||
};
|
||||
IE_SUPPRESS_DEPRECATED_END
|
||||
-1
@@ -19,6 +19,5 @@ public:
|
||||
std::shared_ptr<InferRequestInternal>(InputsDataMap networkInputs, OutputsDataMap networkOutputs));
|
||||
MOCK_METHOD1(Export, void(const std::string &));
|
||||
void Export(std::ostream &) override {}
|
||||
MOCK_METHOD1(GetMappedTopology, void(std::map<std::string, std::vector<PrimitiveInfo::Ptr>> &));
|
||||
};
|
||||
IE_SUPPRESS_DEPRECATED_END
|
||||
-1
@@ -30,7 +30,6 @@ public:
|
||||
MOCK_METHOD1(CreateInferRequest, void(IInferRequest::Ptr &));
|
||||
MOCK_METHOD1(Export, void(const std::string &));
|
||||
void Export(std::ostream &) override {};
|
||||
MOCK_METHOD1(GetMappedTopology, void(std::map<std::string, std::vector<PrimitiveInfo::Ptr>> &));
|
||||
MOCK_METHOD0(QueryState, std::vector<IMemoryStateInternal::Ptr>());
|
||||
MOCK_METHOD1(GetExecGraphInfo, void(ICNNNetwork::Ptr &));
|
||||
|
||||
|
||||
-3
@@ -29,9 +29,6 @@ class MockPluginImpl {
|
||||
}
|
||||
MOCK_METHOD1(AddExtension, void(InferenceEngine::IExtensionPtr ext_ptr));
|
||||
MOCK_METHOD1(SetConfig, void(const std::map <std::string, std::string> &));
|
||||
IE_SUPPRESS_DEPRECATED_START
|
||||
MOCK_METHOD1(SetLogCallback, void(InferenceEngine::IErrorListener &));
|
||||
IE_SUPPRESS_DEPRECATED_END
|
||||
MOCK_METHOD2(ImportNetwork, InferenceEngine::IExecutableNetwork::Ptr(const std::string &, const std::map<std::string, std::string> &));
|
||||
InferenceEngine::ExecutableNetwork ImportNetwork(const std::istream&, const std::map<std::string, std::string> &) {return {};}
|
||||
MOCK_QUALIFIED_METHOD0(GetName, const noexcept, std::string(void));
|
||||
|
||||
@@ -32,10 +32,6 @@ void MockPlugin::Release() noexcept {
|
||||
delete this;
|
||||
}
|
||||
|
||||
void MockPlugin::SetLogCallback(InferenceEngine::IErrorListener &listener) noexcept {
|
||||
IF_NOT_NULL(SetLogCallback(listener));
|
||||
}
|
||||
|
||||
void MockPlugin::GetVersion(const Version *&versionInfo) noexcept {
|
||||
versionInfo = &version;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ public:
|
||||
explicit MockPlugin(InferenceEngine::IInferencePlugin*target);
|
||||
|
||||
void GetVersion(const InferenceEngine::Version *& versionInfo) noexcept override;
|
||||
void SetLogCallback(InferenceEngine::IErrorListener& listener) noexcept override;
|
||||
|
||||
InferenceEngine::StatusCode AddExtension(InferenceEngine::IExtensionPtr extension, InferenceEngine::ResponseDesc *resp) noexcept override;
|
||||
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
// Copyright (C) 2018-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <gmock/gmock.h>
|
||||
#include <ie_error.hpp>
|
||||
|
||||
IE_SUPPRESS_DEPRECATED_START
|
||||
|
||||
class Listener : public InferenceEngine::IErrorListener {
|
||||
public:
|
||||
MOCK_QUALIFIED_METHOD1(onError, noexcept, void(const char * err));
|
||||
};
|
||||
|
||||
IE_SUPPRESS_DEPRECATED_END
|
||||
-1
@@ -26,7 +26,6 @@ public:
|
||||
MOCK_QUALIFIED_METHOD2(CreateInferRequest, noexcept, StatusCode(IInferRequest::Ptr &, ResponseDesc*));
|
||||
MOCK_QUALIFIED_METHOD2(Export, noexcept, StatusCode(const std::string &, ResponseDesc*));
|
||||
MOCK_QUALIFIED_METHOD2(Export, noexcept, StatusCode(std::ostream &, ResponseDesc *));
|
||||
MOCK_QUALIFIED_METHOD2(GetMappedTopology, noexcept, StatusCode(std::map<std::string, std::vector<PrimitiveInfo::Ptr>> &, ResponseDesc*));
|
||||
MOCK_QUALIFIED_METHOD2(GetExecGraphInfo, noexcept, StatusCode(ICNNNetwork::Ptr &, ResponseDesc*));
|
||||
MOCK_QUALIFIED_METHOD2(SetConfig, noexcept, StatusCode(const std::map<std::string, Parameter> &config, ResponseDesc *resp));
|
||||
MOCK_QUALIFIED_METHOD3(GetConfig, const noexcept, StatusCode(const std::string &name, Parameter &result, ResponseDesc *resp));
|
||||
|
||||
@@ -17,7 +17,6 @@ public:
|
||||
InferenceEngine::ResponseDesc *resp));
|
||||
MOCK_QUALIFIED_METHOD1(GetVersion, noexcept, void(const InferenceEngine::Version *&));
|
||||
MOCK_QUALIFIED_METHOD0(Release, noexcept, void());
|
||||
MOCK_QUALIFIED_METHOD1(SetLogCallback, noexcept, void(InferenceEngine::IErrorListener &));
|
||||
MOCK_QUALIFIED_METHOD2(LoadNetwork, noexcept, InferenceEngine::StatusCode(
|
||||
const InferenceEngine::ICNNNetwork &, InferenceEngine::ResponseDesc *resp));
|
||||
MOCK_QUALIFIED_METHOD4(LoadNetwork, noexcept, InferenceEngine::StatusCode(
|
||||
|
||||
-1
@@ -16,7 +16,6 @@ class MockShapeInferExtension : public InferenceEngine::IShapeInferExtension {
|
||||
using Ptr = std::shared_ptr<MockShapeInferExtension>;
|
||||
MOCK_QUALIFIED_METHOD1(GetVersion, const noexcept, void(const InferenceEngine::Version *&));
|
||||
MOCK_QUALIFIED_METHOD0(Release, noexcept, void());
|
||||
MOCK_QUALIFIED_METHOD1(SetLogCallback, noexcept, void(InferenceEngine::IErrorListener &));
|
||||
MOCK_QUALIFIED_METHOD0(Unload, noexcept, void());
|
||||
|
||||
MOCK_QUALIFIED_METHOD3(getShapeInferTypes, noexcept, InferenceEngine::StatusCode
|
||||
|
||||
@@ -24,7 +24,6 @@ using testing::SetArgReferee;
|
||||
// TODO: add tests for the next methods:
|
||||
// 1. void Export(const std::string& modelFileName)
|
||||
// 2. void Export(std::ostream& networkModel)
|
||||
// 3. void GetMappedTopology(std::map<std::string, std::vector<PrimitiveInfo::Ptr>>& deployedTopology)
|
||||
// 4. CNNNetwork GetExecGraphInfo()
|
||||
// 5. void SetConfig(const std::map<std::string, Parameter>& config)
|
||||
// 6. Parameter GetConfig(const std::string& name) const
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#include "details/ie_so_loader.h"
|
||||
|
||||
#include "unit_test_utils/mocks/mock_engine/mock_plugin.hpp"
|
||||
#include "unit_test_utils/mocks/mock_error_listener.hpp"
|
||||
#include "unit_test_utils/mocks/mock_iinference_plugin.hpp"
|
||||
|
||||
|
||||
@@ -41,7 +40,6 @@ protected:
|
||||
}
|
||||
|
||||
MockIInferencePlugin engine;
|
||||
Listener error;
|
||||
};
|
||||
|
||||
TEST_F(PluginTest, canCreatePlugin) {
|
||||
@@ -50,10 +48,6 @@ TEST_F(PluginTest, canCreatePlugin) {
|
||||
unique_ptr<IInferencePlugin, std::function<void(IInferencePlugin*)>> smart_ptr(ptr(nullptr), [](IInferencePlugin *p) {
|
||||
p->Release();
|
||||
});
|
||||
|
||||
//expect that no error handler has been called
|
||||
smart_ptr->SetLogCallback(error);
|
||||
EXPECT_CALL(error, onError(_)).Times(0);
|
||||
}
|
||||
|
||||
TEST_F(PluginTest, canCreatePluginUsingSmartPtr) {
|
||||
@@ -64,13 +58,6 @@ TEST_F(PluginTest, shouldThrowExceptionIfPluginNotExist) {
|
||||
EXPECT_THROW(InferenceEnginePluginPtr("unknown_plugin"), InferenceEngineException);
|
||||
}
|
||||
|
||||
ACTION_TEMPLATE(CallListenerWithErrorMessage,
|
||||
HAS_1_TEMPLATE_PARAMS(int, k),
|
||||
AND_1_VALUE_PARAMS(pointer)) {
|
||||
InferenceEngine::IErrorListener & data = ::std::get<k>(args);
|
||||
data.onError(pointer);
|
||||
}
|
||||
|
||||
InferenceEnginePluginPtr PluginTest::getPtr() {
|
||||
InferenceEnginePluginPtr smart_ptr(get_mock_engine_name());
|
||||
return smart_ptr;
|
||||
|
||||
-2
@@ -206,8 +206,6 @@ public:
|
||||
versionInfo = &VERSION;
|
||||
}
|
||||
|
||||
void SetLogCallback(InferenceEngine::IErrorListener &listener) noexcept override {}
|
||||
|
||||
void Unload() noexcept override {}
|
||||
|
||||
std::vector<std::string> getImplTypes(const std::shared_ptr<ngraph::Node>& node) override {
|
||||
|
||||
@@ -316,26 +316,6 @@ TEST_F(IEClassBasicTest, smoke_SetConfigHeteroNoThrow) {
|
||||
ASSERT_FALSE(value);
|
||||
}
|
||||
|
||||
//
|
||||
// LogCallBack
|
||||
//
|
||||
|
||||
TEST_F(IEClassBasicTest, smoke_LogCallBackNoThrow) {
|
||||
Core ie;
|
||||
|
||||
IE_SUPPRESS_DEPRECATED_START
|
||||
class ConsoleErrorListener : public IErrorListener {
|
||||
void onError(const char *msg) noexcept override {
|
||||
std::clog << "Plugin message: " << msg << std::endl;
|
||||
}
|
||||
};
|
||||
|
||||
ConsoleErrorListener listener;
|
||||
|
||||
ASSERT_NO_THROW(ie.SetLogCallback(listener));
|
||||
IE_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
|
||||
//
|
||||
// ImportNetwork
|
||||
//
|
||||
|
||||
+2
@@ -850,6 +850,8 @@ public:
|
||||
std::string getName() const override;
|
||||
bool transform(CNNNetwork& network, LayerTransformation::Params& params) const override;
|
||||
std::string getModel(SingleLayerTransformationsTestParams& p) const override;
|
||||
|
||||
mutable InferenceEngine::Precision netPrecision;
|
||||
};
|
||||
|
||||
class PowerTestModel : public SingleLayerTestModel {
|
||||
|
||||
+8
-2
@@ -6,8 +6,13 @@
|
||||
|
||||
std::string PoolingTestModel::getModel(SingleLayerTransformationsTestParams& p) const {
|
||||
size_t type_size = sizeof(InferenceEngine::PrecisionTrait<InferenceEngine::Precision::FP32>::value_type);
|
||||
if (p._network_precision == "FP16")
|
||||
netPrecision = Precision::FP32;
|
||||
|
||||
// TODO: don't use network precision
|
||||
if (p._network_precision == "FP16") {
|
||||
netPrecision = Precision::FP16;
|
||||
type_size = sizeof(InferenceEngine::PrecisionTrait<InferenceEngine::Precision::FP16>::value_type);
|
||||
}
|
||||
|
||||
CommonTestUtils::pool_common_params pooling = { {1, 1}, {1, 1}, {0, 0}, {0, 0}, "valid", false, true };
|
||||
std::vector<size_t> poolOutShape(p.inputDimensions[0].size());
|
||||
@@ -55,7 +60,8 @@ bool PoolingTestModel::transform(CNNNetwork& network, LayerTransformation::Param
|
||||
LowPrecisionTransformer transformer(LowPrecisionTransformer::getAllTransformations(params));
|
||||
transformer.transform(network);
|
||||
|
||||
const Precision precision = params.updatePrecisions ? Precision(Precision::U8) : network.getPrecision();
|
||||
// TODO: don't use network precision
|
||||
const Precision precision = params.updatePrecisions ? Precision(Precision::U8) : netPrecision;
|
||||
|
||||
CNNLayerPtr fakeQuantize = getLayer(network, "FakeQuantize6");
|
||||
if (fakeQuantize->outData[0]->getPrecision() != precision) {
|
||||
|
||||
+2
-1
@@ -54,7 +54,8 @@ bool PowerTestModel::transform(CNNNetwork& network, LayerTransformation::Params&
|
||||
LowPrecisionTransformer transformer(LowPrecisionTransformer::getAllTransformations(params));
|
||||
transformer.transform(network);
|
||||
|
||||
const Precision precision = params.updatePrecisions ? Precision(Precision::U8) : network.getPrecision();
|
||||
const Precision precision = params.updatePrecisions ? Precision(Precision::U8) :
|
||||
network.getInputsInfo().begin()->second->getPrecision();
|
||||
|
||||
CNNLayerPtr fakeQuantize = getLayer(network, "FakeQuantize6");
|
||||
if (fakeQuantize->outData[0]->getPrecision() != precision) {
|
||||
|
||||
+2
-2
@@ -10,7 +10,7 @@
|
||||
|
||||
TBlob<uint8_t>::Ptr SingleLayerTransformationsTest::generateWeights(const CNNNetwork& network) {
|
||||
std::vector<Blob::Ptr> blobs;
|
||||
const auto net_precision = network.getPrecision();
|
||||
const auto net_precision = network.getInputsInfo().begin()->second->getPrecision();
|
||||
|
||||
std::vector<CNNLayerPtr> sortedLayers = CNNNetSortTopologically(network);
|
||||
for (CNNLayerPtr layer : sortedLayers) {
|
||||
@@ -294,7 +294,7 @@ void SingleLayerTransformationsTest::SetUp() {
|
||||
const auto transformedOutput = infer(network, inputBlobs, core, p.device_name, executableNetworkTransformed, inferRequestTransformed);
|
||||
|
||||
//compareInDetails(originalOutputMap, *transformedOutput, 70, 0.5);
|
||||
auto net_precision = network.getPrecision();
|
||||
auto net_precision = network.getInputsInfo().begin()->second->getPrecision();
|
||||
for (auto& originalOutput : originalOutputMap) {
|
||||
const auto& name = originalOutput.first;
|
||||
const auto outSize = originalOutput.second->size();
|
||||
|
||||
@@ -90,7 +90,6 @@ public:
|
||||
}
|
||||
|
||||
void GetVersion(const InferenceEngine::Version *&versionInfo) const noexcept override {}
|
||||
void SetLogCallback(InferenceEngine::IErrorListener &listener) noexcept override {}
|
||||
void Unload() noexcept override {}
|
||||
void Release() noexcept override {
|
||||
delete this;
|
||||
|
||||
-2
@@ -9,8 +9,6 @@
|
||||
#include <ie_plugin_config.hpp>
|
||||
#include "tests_common.hpp"
|
||||
|
||||
#include "unit_test_utils/mocks/mock_error_listener.hpp"
|
||||
|
||||
using namespace ::testing;
|
||||
using namespace std;
|
||||
using namespace mkldnn;
|
||||
|
||||
-2
@@ -7,8 +7,6 @@
|
||||
#include "tests_common.hpp"
|
||||
#include <ie_core.hpp>
|
||||
|
||||
#include "unit_test_utils/mocks/mock_error_listener.hpp"
|
||||
|
||||
using namespace ::testing;
|
||||
using namespace std;
|
||||
using namespace mkldnn;
|
||||
|
||||
Reference in new issue
Block a user