[IE Myriad] Correct destruction order in functional tests with DISABLE_PLUGIN_CACHE env. variable (#542)

This commit is contained in:
Nikita Kudriavtsev 2020-05-25 15:45:59 +03:00 committed by GitHub
parent b6a05c232e
commit 74e8b54ce3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 4 deletions

View File

@ -7,7 +7,7 @@
namespace LayerTestsUtils { namespace LayerTestsUtils {
LayerTestsCommon::LayerTestsCommon() { LayerTestsCommon::LayerTestsCommon() {
core = PluginCache::get().ie(targetDevice).get(); core = PluginCache::get().ie(targetDevice);
} }
void LayerTestsCommon::Run() { void LayerTestsCommon::Run() {

View File

@ -293,7 +293,7 @@ private:
std::vector<InferenceEngine::Blob::Ptr> GetOutputs(); std::vector<InferenceEngine::Blob::Ptr> GetOutputs();
InferenceEngine::Core *core = nullptr; std::shared_ptr<InferenceEngine::Core> core;
InferenceEngine::CNNNetwork cnnNetwork; InferenceEngine::CNNNetwork cnnNetwork;
InferenceEngine::InferRequest inferRequest; InferenceEngine::InferRequest inferRequest;
RefMode refMode = RefMode::INTERPRETER; RefMode refMode = RefMode::INTERPRETER;

View File

@ -34,6 +34,10 @@ public:
InferenceEngine::ExecutableNetwork ImportNetwork(std::istream& networkModel, InferenceEngine::ExecutableNetwork ImportNetwork(std::istream& networkModel,
const std::map<std::string, std::string>& config = {}); const std::map<std::string, std::string>& config = {});
std::shared_ptr<InferenceEngine::Core>& ieCore() {
return m_ieCore;
}
private: private:
std::shared_ptr<InferenceEngine::Core> m_ieCore; std::shared_ptr<InferenceEngine::Core> m_ieCore;
std::string m_deviceName; std::string m_deviceName;

View File

@ -53,7 +53,11 @@ void vpuLayersTests::TearDown() {
} }
} }
_vpuPluginPtr = {}; _exeNetwork = {};
_inferRequest = {};
_refBlob = {};
TestsCommon::TearDown();
} }
bool vpuLayersTests::CheckMyriadX() { bool vpuLayersTests::CheckMyriadX() {
@ -229,7 +233,7 @@ void vpuLayersTests::makeSingleLayerNetworkImpl(const LayerParams& layerParams,
} }
void vpuLayersTests::readNetwork(const std::string& model, const WeightsBlob::Ptr& modelWeights) { void vpuLayersTests::readNetwork(const std::string& model, const WeightsBlob::Ptr& modelWeights) {
_cnnNetwork = PluginCache::get().ie()->ReadNetwork(model, modelWeights); _cnnNetwork = _vpuPluginPtr->ieCore()->ReadNetwork(model, modelWeights);
ASSERT_NO_THROW(_inputsInfo = _cnnNetwork.getInputsInfo()); ASSERT_NO_THROW(_inputsInfo = _cnnNetwork.getInputsInfo());
ASSERT_NO_THROW(_outputsInfo = _cnnNetwork.getOutputsInfo()); ASSERT_NO_THROW(_outputsInfo = _cnnNetwork.getOutputsInfo());