Removed ICNNNetReader interface (#1042)

* Removed ICNNNetReader interface

* Fixed stress tests

* Fixed comments in VPU plugin

* Removed duplicated stress tests

* Fixed watchdog tests
This commit is contained in:
Ilya Lavrenov
2020-06-23 22:34:26 +03:00
committed by GitHub
parent 34de464027
commit a7579d5c35
23 changed files with 47 additions and 564 deletions

View File

@@ -22,17 +22,7 @@ std::function<void()> load_unload_plugin(const std::string &target_device) {
};
}
std::function<void()> read_network(const std::string &model) {
return [&] {
IE_SUPPRESS_DEPRECATED_START
CNNNetReader netReader;
netReader.ReadNetwork(model);
netReader.ReadWeights(fileNameNoExt(model) + ".bin");
IE_SUPPRESS_DEPRECATED_END
};
}
std::function<void()> create_cnnnetwork(const std::string &model) {
std::function<void()> read_cnnnetwork(const std::string &model) {
return [&] {
Core ie;
CNNNetwork cnnNetwork = ie.ReadNetwork(model);

View File

@@ -7,8 +7,7 @@
#include <inference_engine.hpp>
std::function<void()> load_unload_plugin(const std::string &target_device);
std::function<void()> read_network(const std::string &model);
std::function<void()> create_cnnnetwork(const std::string &model);
std::function<void()> read_cnnnetwork(const std::string &model);
std::function<void()> cnnnetwork_reshape_batch_x2(const std::string &model);
std::function<void()> set_input_params(const std::string &model);
std::function<void()> create_exenetwork(const std::string &model, const std::string &target_device);

View File

@@ -55,14 +55,6 @@ TEST_P(MemLeaksTestSuiteNoDevice, read_network) {
test_runner(test_params.numthreads, test);
}
TEST_P(MemLeaksTestSuiteNoDevice, create_cnnnetwork) {
auto test_params = GetParam();
auto test = [&] {
return test_create_cnnnetwork(test_params.model, test_params.numiters);
};
test_runner(test_params.numthreads, test);
}
TEST_P(MemLeaksTestSuiteNoDevice, cnnnetwork_reshape_batch_x2) {
auto test_params = GetParam();
auto test = [&] {

View File

@@ -144,12 +144,7 @@ TestResult test_load_unload_plugin(const std::string& target_device, const int&
TestResult test_read_network(const std::string& model, const int& n) {
log_info("Read network: \"" << model << "\" for " << n << " times");
return common_test_pipeline(read_network(model), n);
}
TestResult test_create_cnnnetwork(const std::string& model, const int& n) {
log_info("Create CNNNetwork from network: \"" << model << "\" for " << n << " times");
return common_test_pipeline(create_cnnnetwork(model), n);
return common_test_pipeline(read_cnnnetwork(model), n);
}
TestResult test_cnnnetwork_reshape_batch_x2(const std::string& model, const int& n) {

View File

@@ -15,7 +15,6 @@
// tests_pipelines/tests_pipelines.cpp
TestResult test_load_unload_plugin(const std::string &target_device, const int &n);
TestResult test_read_network(const std::string &model, const int &n);
TestResult test_create_cnnnetwork(const std::string &model, const int &n);
TestResult test_cnnnetwork_reshape_batch_x2(const std::string &model, const int &n);
TestResult test_set_input_params(const std::string &model, const int &n);
TestResult test_recreate_exenetwork(InferenceEngine::Core &ie, const std::string &model, const std::string &target_device, const int &n);

View File

@@ -25,10 +25,6 @@ TEST_P(UnitTestSuiteNoDevice, read_network) {
runTest(test_read_network, GetParam());
}
TEST_P(UnitTestSuiteNoDevice, create_cnnnetwork) {
runTest(test_create_cnnnetwork, GetParam());
}
TEST_P(UnitTestSuiteNoDevice, cnnnetwork_reshape_batch_x2) {
runTest(test_cnnnetwork_reshape_batch_x2, GetParam());
}
@@ -60,10 +56,6 @@ TEST_P(UnitTestSuite, read_network_full_pipeline) {
runTest(test_read_network_full_pipeline, GetParam());
}
TEST_P(UnitTestSuite, create_cnnnetwork_full_pipeline) {
runTest(test_create_cnnnetwork_full_pipeline, GetParam());
}
TEST_P(UnitTestSuite, set_input_params_full_pipeline) {
runTest(test_set_input_params_full_pipeline, GetParam());
}

View File

@@ -27,17 +27,7 @@ void test_read_network(const std::string &model, const std::string &target_devic
if (i == n / 2) {
log_info("Half of the test have already passed");
}
read_network(model)();
}
}
void test_create_cnnnetwork(const std::string &model, const std::string &target_device, const int &n) {
log_info("Create CNNNetwork from network: \"" << model << "\" for " << n << " times");
for (int i = 0; i < n; i++) {
if (i == n / 2) {
log_info("Half of the test have already passed");
}
create_cnnnetwork(model)();
read_cnnnetwork(model)();
}
}

View File

@@ -12,7 +12,6 @@
// tests_pipelines/tests_pipelines.cpp
void test_load_unload_plugin(const std::string &model, const std::string &target_device, const int &n);
void test_read_network(const std::string &model, const std::string &target_device, const int &n);
void test_create_cnnnetwork(const std::string &model, const std::string &target_device, const int &n);
void test_cnnnetwork_reshape_batch_x2(const std::string &model, const std::string &target_device, const int &n);
void test_set_input_params(const std::string &model, const std::string &target_device, const int &n);
void test_create_exenetwork(const std::string &model, const std::string &target_device, const int &n);
@@ -23,7 +22,6 @@ void test_infer_request_inference(const std::string &model, const std::string &t
// tests_pipelines/tests_pipelines_full_pipeline.cpp
void test_load_unload_plugin_full_pipeline(const std::string &model, const std::string &target_device, const int &n);
void test_read_network_full_pipeline(const std::string &model, const std::string &target_device, const int &n);
void test_create_cnnnetwork_full_pipeline(const std::string &model, const std::string &target_device, const int &n);
void test_set_input_params_full_pipeline(const std::string &model, const std::string &target_device, const int &n);
void test_cnnnetwork_reshape_batch_x2_full_pipeline(const std::string &model, const std::string &target_device, const int &n);
void test_create_exenetwork_full_pipeline(const std::string &model, const std::string &target_device, const int &n);

View File

@@ -65,38 +65,6 @@ void test_load_unload_plugin_full_pipeline(const std::string &model, const std::
void test_read_network_full_pipeline(const std::string &model, const std::string &target_device, const int &n) {
log_info("Read network: \"" << model << "\" for " << n << " times");
Core ie;
IE_SUPPRESS_DEPRECATED_START
std::shared_ptr<CNNNetReader> netReaderPtr;
for (int i = 0; i < n; i++) {
if (i == n / 2) {
log_info("Half of the test have already passed");
}
CNNNetReader netReader;
netReader.ReadNetwork(model);
netReader.ReadWeights(fileNameNoExt(model) + ".bin");
netReaderPtr = std::make_shared<CNNNetReader>(netReader);
}
CNNNetwork cnnNetwork = netReaderPtr->getNetwork();
IE_SUPPRESS_DEPRECATED_END
InputsDataMap inputInfo(cnnNetwork.getInputsInfo());
ICNNNetwork::InputShapes shapes = cnnNetwork.getInputShapes();
bool doReshape = false;
for (auto &input : inputInfo) {
setInputParameters();
computeShapesToReshape();
}
reshapeCNNNetwork();
ExecutableNetwork exeNetwork = ie.LoadNetwork(cnnNetwork, target_device);
InferRequest infer_request = exeNetwork.CreateInferRequest();
infer_request.Infer();
OutputsDataMap output_info(cnnNetwork.getOutputsInfo());
for (auto &output : output_info)
Blob::Ptr outputBlob = infer_request.GetBlob(output.first);
}
void test_create_cnnnetwork_full_pipeline(const std::string &model, const std::string &target_device, const int &n) {
log_info("Create CNNNetwork from network: \"" << model << "\" for " << n << " times");
Core ie;
CNNNetwork cnnNetwork;
for (int i = 0; i < n; i++) {
if (i == n / 2) {