From a3448032caa15ca583f515a992280bb3b61a8a66 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Fri, 14 May 2021 18:47:54 +0300 Subject: [PATCH] Minimized legacy usage in tests (#5591) * Minimized legacy usage in tests * Use legacy only for specific files * Fixed code style * Fixed linkage * Removed old CPU / GPU tests binaries * Test * Disabled IB console * Disabled test for AUTO QueryNetwork from parallel threads --- .ci/azure/windows.yml | 2 +- .../tests/functional/CMakeLists.txt | 2 +- .../inference_engine/CMakeLists.txt | 15 ++ .../inference_engine/caching_test.cpp | 3 +- .../inference_engine/core_threading_tests.cpp | 13 +- .../ngraph_reader/constant_tests.cpp | 16 +- .../ngraph_reader/custom_op_tests.cpp | 60 +++---- .../ngraph_reader/einsum_tests.cpp | 1 - .../ngraph_reader/fake_quantize_tests.cpp | 6 - .../{ => ngraph_reader}/net_reader_test.cpp | 2 +- .../ngraph_reader}/network_utils.cpp | 3 +- .../ngraph_reader}/network_utils.hpp | 1 - .../ngraph_reader/ngraph_reader_tests.hpp | 2 +- .../non_max_suppression_tests.cpp | 2 - .../ngraph_reader/relu_tests.cpp | 6 - .../ngraph_reader/tensor_names.cpp | 2 + .../inference_engine/ngraph_reshape_tests.cpp | 11 -- .../convert_ngraph_to_cnn_network_tests.cpp | 0 .../convert_ti_to_sequences_test.cpp | 1 - .../depth_to_space_fusion_test.cpp | 1 - .../keep_constant_inputs_tests.cpp | 1 + .../optimize_strided_slice_test.cpp | 2 - .../transformations/unroll_loop_test.cpp | 1 - .../unroll_tensor_iterator_test.cpp | 1 - .../tests/functional/plugin/CMakeLists.txt | 1 - .../functional/plugin/cpu/CMakeLists.txt | 5 + .../plugin/cpu/extension/extension.cpp | 148 ++++++++--------- .../skip_tests_config.cpp | 3 + .../cpu/test_utils/fusing_test_utils.hpp | 4 +- .../functional/plugin/gna/CMakeLists.txt | 10 +- .../import_export_memory_layer.cpp | 2 + .../functional/plugin/gpu/CMakeLists.txt | 16 ++ .../layer_transformation.cpp | 5 +- .../conversions/dynamic_shape_resolver.cpp | 1 - .../functional/plugin/shared/CMakeLists.txt | 7 +- .../include/behavior/core_threading_tests.hpp | 4 +- .../include/behavior/exec_graph_info.hpp | 156 ++++++------------ .../shared/include/behavior/test_plugin.hpp | 11 -- .../shared/src/behavior/caching_tests.cpp | 2 +- .../network_serializer.cpp | 92 ----------- .../num_inputs_fusing_bin_conv.cpp | 68 ++------ .../unique_node_names.cpp | 44 ++--- .../depth_to_space_transformation.cpp | 1 - .../layer_transformation.cpp | 1 + .../conv_bias_fusion.cpp | 27 ++- .../shared_test_classes/CMakeLists.txt | 7 +- .../layer_transformation.hpp | 2 - .../single_layer/eltwise.hpp | 1 - .../single_layer/reduce_ops.hpp | 1 - .../layer_transformation.cpp | 2 - .../src/single_layer/gru_sequence.cpp | 1 + .../src/single_layer/prior_box_clustered.cpp | 1 - .../src/subgraph/split_concat_memory.cpp | 1 - .../common_test_utils/CMakeLists.txt | 15 +- .../common_layers_params.cpp | 14 -- .../common_layers_params.hpp | 5 - .../common_test_utils/common_utils.cpp | 40 +++++ .../common_test_utils/common_utils.hpp | 33 ++-- .../functional_test_utils/CMakeLists.txt | 3 + .../src/layer_test_utils/summary.cpp | 3 + .../unit_test_utils/CMakeLists.txt | 3 + .../ie_test_utils/unit_test_utils/empty.cpp | 22 --- .../ie_test_utils/unit_test_utils/mock.cpp | 65 ++++++++ .../mocks/mock_icnn_network.hpp | 7 +- .../mocks/mock_not_empty_icnn_network.hpp | 40 +---- .../src/reshape_fully_connected_function.cpp | 1 - .../functional/CMakeLists.txt | 8 - .../functional/cldnn/CMakeLists.txt | 7 - .../functional/cldnn/dummy.cpp | 4 - .../functional/mkldnn/CMakeLists.txt | 7 - .../functional/mkldnn/dummy.cpp | 3 - .../single_layer_tests.hpp | 1 + 72 files changed, 439 insertions(+), 620 deletions(-) rename inference-engine/tests/functional/inference_engine/{ => ngraph_reader}/net_reader_test.cpp (99%) rename inference-engine/tests/{ie_test_utils/functional_test_utils/src => functional/inference_engine/ngraph_reader}/network_utils.cpp (99%) rename inference-engine/tests/{ie_test_utils/functional_test_utils/include/functional_test_utils => functional/inference_engine/ngraph_reader}/network_utils.hpp (91%) rename inference-engine/tests/functional/inference_engine/{cnn_network => transformations}/convert_ngraph_to_cnn_network_tests.cpp (100%) rename inference-engine/tests/functional/inference_engine/{ => transformations}/keep_constant_inputs_tests.cpp (98%) delete mode 100644 inference-engine/tests/functional/plugin/shared/src/execution_graph_tests/network_serializer.cpp create mode 100644 inference-engine/tests/ie_test_utils/common_test_utils/common_utils.cpp delete mode 100644 inference-engine/tests/ie_test_utils/unit_test_utils/empty.cpp create mode 100644 inference-engine/tests/ie_test_utils/unit_test_utils/mock.cpp delete mode 100644 inference-engine/tests_deprecated/functional/cldnn/CMakeLists.txt delete mode 100644 inference-engine/tests_deprecated/functional/cldnn/dummy.cpp delete mode 100644 inference-engine/tests_deprecated/functional/mkldnn/CMakeLists.txt delete mode 100644 inference-engine/tests_deprecated/functional/mkldnn/dummy.cpp diff --git a/.ci/azure/windows.yml b/.ci/azure/windows.yml index 0ae20539c9b..d029cae6fd0 100644 --- a/.ci/azure/windows.yml +++ b/.ci/azure/windows.yml @@ -163,7 +163,7 @@ jobs: - script: | set PATH=$(TEST_ENV_PATH) rem $(BIN_DIR)\cpuFuncTests.exe --gtest_filter=*smoke* --gtest_output=xml:TEST-cpuFuncTests.xml - "$(IB_TESTCONSOLE)" $(BIN_DIR)\cpuFuncTests.exe --gtest_filter=*smoke*:-*CompareWithRefs/base_size=16_pre_nms_topn=100_post_nms_topn=100_nms_thresh=0.7_feat_stride=1_min_size=1_ratio* --gtest_output=xml:TEST-cpuFuncTests-IB.xml /testlevel=24 + $(BIN_DIR)\cpuFuncTests.exe --gtest_filter=*smoke*:-*CompareWithRefs/base_size=16_pre_nms_topn=100_post_nms_topn=100_nms_thresh=0.7_feat_stride=1_min_size=1_ratio* --gtest_output=xml:TEST-cpuFuncTests-IB.xml displayName: 'CPU FuncTests - IB' continueOnError: false diff --git a/inference-engine/tests/functional/CMakeLists.txt b/inference-engine/tests/functional/CMakeLists.txt index 7acdc314ad2..fd58c0e2bdb 100644 --- a/inference-engine/tests/functional/CMakeLists.txt +++ b/inference-engine/tests/functional/CMakeLists.txt @@ -3,5 +3,5 @@ # add_subdirectory(shared_test_classes) -add_subdirectory(inference_engine) add_subdirectory(plugin) +add_subdirectory(inference_engine) diff --git a/inference-engine/tests/functional/inference_engine/CMakeLists.txt b/inference-engine/tests/functional/inference_engine/CMakeLists.txt index a63a2ba9fed..e6eefc809af 100644 --- a/inference-engine/tests/functional/inference_engine/CMakeLists.txt +++ b/inference-engine/tests/functional/inference_engine/CMakeLists.txt @@ -58,6 +58,21 @@ ie_faster_build(${TARGET_NAME} PCH PRIVATE "precomp.hpp" ) +# CVS-55343 + +file(GLOB_RECURSE legacy_tests + "${CMAKE_CURRENT_SOURCE_DIR}/transformations/*.cpp" # CVS-55385 + "${CMAKE_CURRENT_SOURCE_DIR}/lp_transformations/*.cpp" # CVS-55376 + "${CMAKE_CURRENT_SOURCE_DIR}/ngraph_reader/*.cpp" # CVS-55365 + "${CMAKE_CURRENT_SOURCE_DIR}/cnn_network/cnn_ngraph_impl_tests.cpp" # CVS-55375 + "${CMAKE_CURRENT_SOURCE_DIR}/core_threading_tests.cpp" # CVS-55257 + "${CMAKE_CURRENT_SOURCE_DIR}/caching_test.cpp" # CVS-55257 + "${CMAKE_CURRENT_SOURCE_DIR}/local_test.cpp" # CVS-55386 + ) + +set_source_files_properties(${legacy_tests} PROPERTIES INCLUDE_DIRECTORIES + $) + include(CMakeParseArguments) # diff --git a/inference-engine/tests/functional/inference_engine/caching_test.cpp b/inference-engine/tests/functional/inference_engine/caching_test.cpp index 396838e7b8e..947733c3f15 100644 --- a/inference-engine/tests/functional/inference_engine/caching_test.cpp +++ b/inference-engine/tests/functional/inference_engine/caching_test.cpp @@ -7,9 +7,11 @@ #include #include #include +#include #include #include +#include "ie_core.hpp" #include "ie_plugin_ptr.hpp" #include "ngraph/function.hpp" #include "details/ie_so_loader.h" @@ -23,7 +25,6 @@ #include "common_test_utils/test_constants.hpp" #include "functional_test_utils/test_model/test_model.hpp" -#include "functional_test_utils/network_utils.hpp" #include "unit_test_utils/mocks/mock_iexecutable_network.hpp" #include "unit_test_utils/mocks/mock_iinfer_request.hpp" diff --git a/inference-engine/tests/functional/inference_engine/core_threading_tests.cpp b/inference-engine/tests/functional/inference_engine/core_threading_tests.cpp index f0182f9d49f..791cb220093 100644 --- a/inference-engine/tests/functional/inference_engine/core_threading_tests.cpp +++ b/inference-engine/tests/functional/inference_engine/core_threading_tests.cpp @@ -20,8 +20,16 @@ #include class CoreThreadingTests : public ::testing::Test { +protected: + std::string modelName = "CoreThreadingTests.xml", weightsName = "CoreThreadingTests.bin"; + public: void SetUp() override { + FuncTestUtils::TestModel::generateTestModel(modelName, weightsName); + } + + void TearDown() override { + CommonTestUtils::removeIRFiles(modelName, weightsName); } void runParallel(std::function func, @@ -138,11 +146,10 @@ TEST_F(CoreThreadingTests, DISABLED_GetAvailableDevices) { // tested function: ReadNetwork, AddExtension TEST_F(CoreThreadingTests, ReadNetwork) { InferenceEngine::Core ie; - auto model = FuncTestUtils::TestModel::convReluNormPoolFcModelFP32; - auto network = ie.ReadNetwork(model.model_xml_str, model.weights_blob); + auto network = ie.ReadNetwork(modelName, weightsName); runParallel([&] () { safeAddExtension(ie); - (void)ie.ReadNetwork(model.model_xml_str, model.weights_blob); + (void)ie.ReadNetwork(modelName, weightsName); }, 100, 12); } diff --git a/inference-engine/tests/functional/inference_engine/ngraph_reader/constant_tests.cpp b/inference-engine/tests/functional/inference_engine/ngraph_reader/constant_tests.cpp index fb76a331e23..f88d68f798a 100644 --- a/inference-engine/tests/functional/inference_engine/ngraph_reader/constant_tests.cpp +++ b/inference-engine/tests/functional/inference_engine/ngraph_reader/constant_tests.cpp @@ -3,7 +3,6 @@ // #include -#include #include "ngraph_reader_tests.hpp" using namespace InferenceEngine; @@ -40,18 +39,13 @@ TEST_F(NGraphReaderTests, ReadConstantNetwork) { )V0G0N"; - IE_SUPPRESS_DEPRECATED_START - Core ie; - Blob::Ptr weights; + Core ie; + Blob::Ptr weights; - weights = make_shared_blob(TensorDesc(Precision::U8, {5808}, Layout::C)); - weights->allocate(); + weights = make_shared_blob(TensorDesc(Precision::U8, {5808}, Layout::C)); + weights->allocate(); - auto network = ie.ReadNetwork(model, weights); - auto clonedNetwork = cloneNetwork(network); - auto clonedNet = cloneNet(network); - - IE_SUPPRESS_DEPRECATED_END + auto network = ie.ReadNetwork(model, weights); } TEST_F(NGraphReaderTests, ReadConstantNetworkWithNegativeDimension) { diff --git a/inference-engine/tests/functional/inference_engine/ngraph_reader/custom_op_tests.cpp b/inference-engine/tests/functional/inference_engine/ngraph_reader/custom_op_tests.cpp index 70f77e7bf55..8efde583d67 100644 --- a/inference-engine/tests/functional/inference_engine/ngraph_reader/custom_op_tests.cpp +++ b/inference-engine/tests/functional/inference_engine/ngraph_reader/custom_op_tests.cpp @@ -4,7 +4,6 @@ #include #include -#include #include #include "ngraph_reader_tests.hpp" @@ -19,7 +18,7 @@ public: m_element_type(element_type), m_shape(shape), m_data(data) { - constructor_validate_and_infer_types(); + constructor_validate_and_infer_types(); } void validate_and_infer_types() override { set_output_type(0, m_element_type, m_shape); @@ -40,30 +39,27 @@ public: ngraph::Shape getShapeAttr() const { return m_shape; } void* getDataPtr() { return (m_data ? m_data->get_ptr() : nullptr); } - private: - ngraph::element::Type m_element_type; - ngraph::Shape m_shape{}; - std::shared_ptr m_data; +private: + ngraph::element::Type m_element_type; + ngraph::Shape m_shape{}; + std::shared_ptr m_data; }; constexpr ngraph::NodeTypeInfo CustomAddConst::type_info; class CustomAddConstExtension : public InferenceEngine::IExtension { - public: - CustomAddConstExtension() { - } +public: + void GetVersion(const InferenceEngine::Version*& versionInfo) const noexcept override {} - void GetVersion(const InferenceEngine::Version*& versionInfo) const noexcept override {} + void Unload() noexcept override {} - void Unload() noexcept override {} - - std::map getOpSets() override { - std::map opsets; - ngraph::OpSet opset; - opset.insert(); - opsets["custom_opset"] = opset; - return opsets; - } + std::map getOpSets() override { + std::map opsets; + ngraph::OpSet opset; + opset.insert(); + opsets["custom_opset"] = opset; + return opsets; + } }; TEST_F(NGraphReaderTests, ReadCustomAddConstNetwork) { @@ -106,26 +102,22 @@ TEST_F(NGraphReaderTests, ReadCustomAddConstNetwork) { )V0G0N"; - std::string expectedValue = std::string("0?|%.g6/,-{5~P1>"); + const std::string expectedValue = std::string("0?|%.g6/,-{5~P1>"); REPLACE_WITH_STR(model, "_VALUE_", expectedValue); InferenceEngine::Blob::CPtr weights; + InferenceEngine::Core ie; ie.AddExtension(std::make_shared()); - auto network = ie.ReadNetwork(model, weights); - IE_SUPPRESS_DEPRECATED_START - auto convertedNetwork = std::make_shared(network); - - for (auto it = details::CNNNetworkIterator(convertedNetwork.get()); it != details::CNNNetworkIterator(); it++) { - InferenceEngine::CNNLayerPtr layer = *it; - ASSERT_NE(nullptr, layer->getNode()); + bool found = false; + for (const auto & op : network.getFunction()->get_ops()) { + if (auto casted = std::dynamic_pointer_cast(op)) { + std::string actualValue(reinterpret_cast(casted->getDataPtr()), + expectedValue.length()); + ASSERT_EQ(expectedValue, actualValue); + found = true; + } } - - InferenceEngine::CNNLayerPtr customAdd; - convertedNetwork->getLayerByName("activation", customAdd, nullptr); - - ASSERT_EQ(expectedValue, customAdd->GetParamAsString("value")); - - IE_SUPPRESS_DEPRECATED_END + ASSERT_TRUE(found); } diff --git a/inference-engine/tests/functional/inference_engine/ngraph_reader/einsum_tests.cpp b/inference-engine/tests/functional/inference_engine/ngraph_reader/einsum_tests.cpp index 753aff586cb..16da3327ac5 100644 --- a/inference-engine/tests/functional/inference_engine/ngraph_reader/einsum_tests.cpp +++ b/inference-engine/tests/functional/inference_engine/ngraph_reader/einsum_tests.cpp @@ -4,7 +4,6 @@ #include #include "ngraph_reader_tests.hpp" -#include "common_test_utils/xml_net_builder/ir_net.hpp" TEST_F(NGraphReaderTests, ReadEinsumNetwork) { std::string model = R"V0G0N( diff --git a/inference-engine/tests/functional/inference_engine/ngraph_reader/fake_quantize_tests.cpp b/inference-engine/tests/functional/inference_engine/ngraph_reader/fake_quantize_tests.cpp index 1be3cc7f70d..991699c3af6 100644 --- a/inference-engine/tests/functional/inference_engine/ngraph_reader/fake_quantize_tests.cpp +++ b/inference-engine/tests/functional/inference_engine/ngraph_reader/fake_quantize_tests.cpp @@ -255,10 +255,4 @@ TEST_F(NGraphReaderTests, ReadFQNetwork) { Core reader; auto cnn = reader.ReadNetwork(model, weights); - - IE_SUPPRESS_DEPRECATED_START - // convert to old representation - auto convertedNetwork = std::make_shared(cnn); - (void)convertedNetwork; - IE_SUPPRESS_DEPRECATED_END } diff --git a/inference-engine/tests/functional/inference_engine/net_reader_test.cpp b/inference-engine/tests/functional/inference_engine/ngraph_reader/net_reader_test.cpp similarity index 99% rename from inference-engine/tests/functional/inference_engine/net_reader_test.cpp rename to inference-engine/tests/functional/inference_engine/ngraph_reader/net_reader_test.cpp index e01379ad348..71265bbf66d 100644 --- a/inference-engine/tests/functional/inference_engine/net_reader_test.cpp +++ b/inference-engine/tests/functional/inference_engine/ngraph_reader/net_reader_test.cpp @@ -14,7 +14,7 @@ #include "common_test_utils/unicode_utils.hpp" #include "common_test_utils/file_utils.hpp" #include "functional_test_utils/test_model/test_model.hpp" -#include "functional_test_utils/network_utils.hpp" +#include "network_utils.hpp" #ifdef ENABLE_UNICODE_PATH_SUPPORT diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/src/network_utils.cpp b/inference-engine/tests/functional/inference_engine/ngraph_reader/network_utils.cpp similarity index 99% rename from inference-engine/tests/ie_test_utils/functional_test_utils/src/network_utils.cpp rename to inference-engine/tests/functional/inference_engine/ngraph_reader/network_utils.cpp index 91348277147..7894d83f5cd 100644 --- a/inference-engine/tests/ie_test_utils/functional_test_utils/src/network_utils.cpp +++ b/inference-engine/tests/functional/inference_engine/ngraph_reader/network_utils.cpp @@ -9,10 +9,11 @@ #include #include -#include "functional_test_utils/network_utils.hpp" +#include "network_utils.hpp" #include "cpp/ie_cnn_network.h" #include "functional_test_utils/blob_utils.hpp" #include +#include namespace FuncTestUtils { diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/network_utils.hpp b/inference-engine/tests/functional/inference_engine/ngraph_reader/network_utils.hpp similarity index 91% rename from inference-engine/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/network_utils.hpp rename to inference-engine/tests/functional/inference_engine/ngraph_reader/network_utils.hpp index b50f52d6043..4cfa2bca7a5 100644 --- a/inference-engine/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/network_utils.hpp +++ b/inference-engine/tests/functional/inference_engine/ngraph_reader/network_utils.hpp @@ -6,7 +6,6 @@ #include "cpp/ie_cnn_network.h" #include -#include namespace FuncTestUtils { diff --git a/inference-engine/tests/functional/inference_engine/ngraph_reader/ngraph_reader_tests.hpp b/inference-engine/tests/functional/inference_engine/ngraph_reader/ngraph_reader_tests.hpp index ab6f7e5b42f..dc8ca7cff05 100644 --- a/inference-engine/tests/functional/inference_engine/ngraph_reader/ngraph_reader_tests.hpp +++ b/inference-engine/tests/functional/inference_engine/ngraph_reader/ngraph_reader_tests.hpp @@ -18,7 +18,7 @@ #include "common_test_utils/test_common.hpp" #include "common_test_utils/file_utils.hpp" #include "common_test_utils/data_utils.hpp" -#include "functional_test_utils/network_utils.hpp" +#include "network_utils.hpp" using namespace testing; using namespace InferenceEngine; diff --git a/inference-engine/tests/functional/inference_engine/ngraph_reader/non_max_suppression_tests.cpp b/inference-engine/tests/functional/inference_engine/ngraph_reader/non_max_suppression_tests.cpp index 039a3afc1ba..0148c84a5a9 100644 --- a/inference-engine/tests/functional/inference_engine/ngraph_reader/non_max_suppression_tests.cpp +++ b/inference-engine/tests/functional/inference_engine/ngraph_reader/non_max_suppression_tests.cpp @@ -18,8 +18,6 @@ #include "common_test_utils/ngraph_test_utils.hpp" -#include "legacy/convert_function_to_cnn_network.hpp" - using namespace ngraph; TEST_F(NGraphReaderTests, ReadNonMaxSuppression5) { diff --git a/inference-engine/tests/functional/inference_engine/ngraph_reader/relu_tests.cpp b/inference-engine/tests/functional/inference_engine/ngraph_reader/relu_tests.cpp index e6bb675637c..cc5fee390e1 100644 --- a/inference-engine/tests/functional/inference_engine/ngraph_reader/relu_tests.cpp +++ b/inference-engine/tests/functional/inference_engine/ngraph_reader/relu_tests.cpp @@ -220,10 +220,4 @@ TEST_F(NGraphReaderTests, ReadReLUScalarNetwork) { Blob::CPtr blob; Core reader; auto cnn = reader.ReadNetwork(model, blob); - - IE_SUPPRESS_DEPRECATED_START - // convert to old representation - auto convertedNetwork = std::make_shared(cnn); - (void)convertedNetwork; - IE_SUPPRESS_DEPRECATED_END } diff --git a/inference-engine/tests/functional/inference_engine/ngraph_reader/tensor_names.cpp b/inference-engine/tests/functional/inference_engine/ngraph_reader/tensor_names.cpp index 1710c49116d..b33ab31bd1c 100644 --- a/inference-engine/tests/functional/inference_engine/ngraph_reader/tensor_names.cpp +++ b/inference-engine/tests/functional/inference_engine/ngraph_reader/tensor_names.cpp @@ -3,6 +3,8 @@ // #include +#include + #include "ngraph_reader_tests.hpp" TEST_F(NGraphReaderTests, ReadNetworkWithTensorNames) { diff --git a/inference-engine/tests/functional/inference_engine/ngraph_reshape_tests.cpp b/inference-engine/tests/functional/inference_engine/ngraph_reshape_tests.cpp index b3b23babf32..761bea6ecdb 100644 --- a/inference-engine/tests/functional/inference_engine/ngraph_reshape_tests.cpp +++ b/inference-engine/tests/functional/inference_engine/ngraph_reshape_tests.cpp @@ -23,7 +23,6 @@ #include #include -#include #include #include "common_test_utils/test_common.hpp" @@ -337,10 +336,6 @@ TEST_F(NGraphReshapeTests, ReshapeNewIRWithNewExtension1) { auto output = network.getOutputsInfo(); SizeVector outDims = output["activation"]->getTensorDesc().getDims(); ASSERT_EQ(outDims, refAfterReshape); - // Convert to CNNNetwork - auto convertedNetwork = std::make_shared(network); - auto layer = CommonTestUtils::getLayerByName(InferenceEngine::CNNNetwork(convertedNetwork), "activation"); - ASSERT_EQ("CustomTestLayer", layer->type); } TEST_F(NGraphReshapeTests, ReshapeNewIRWithNewExtension2) { @@ -408,12 +403,6 @@ TEST_F(NGraphReshapeTests, ReshapeNewIRWithNewExtension2) { auto output = network.getOutputsInfo(); SizeVector outDims = output["activation"]->getTensorDesc().getDims(); ASSERT_EQ(outDims, refAfterReshape); - // Convert to CNNNetwork - auto convertedNetwork = std::make_shared(network); - auto layer = CommonTestUtils::getLayerByName(InferenceEngine::CNNNetwork(convertedNetwork), "activation"); - ASSERT_EQ("CustomTestLayer", layer->type); - ASSERT_EQ("false", layer->params["test1"]); - ASSERT_EQ("3", layer->params["test2"]); } class BadExtension : public InferenceEngine::IExtension { diff --git a/inference-engine/tests/functional/inference_engine/cnn_network/convert_ngraph_to_cnn_network_tests.cpp b/inference-engine/tests/functional/inference_engine/transformations/convert_ngraph_to_cnn_network_tests.cpp similarity index 100% rename from inference-engine/tests/functional/inference_engine/cnn_network/convert_ngraph_to_cnn_network_tests.cpp rename to inference-engine/tests/functional/inference_engine/transformations/convert_ngraph_to_cnn_network_tests.cpp diff --git a/inference-engine/tests/functional/inference_engine/transformations/convert_ti_to_sequences_test.cpp b/inference-engine/tests/functional/inference_engine/transformations/convert_ti_to_sequences_test.cpp index 26fff36c921..3d9135b32e0 100644 --- a/inference-engine/tests/functional/inference_engine/transformations/convert_ti_to_sequences_test.cpp +++ b/inference-engine/tests/functional/inference_engine/transformations/convert_ti_to_sequences_test.cpp @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/inference-engine/tests/functional/inference_engine/transformations/depth_to_space_fusion_test.cpp b/inference-engine/tests/functional/inference_engine/transformations/depth_to_space_fusion_test.cpp index 3475f882993..f610708e1b6 100644 --- a/inference-engine/tests/functional/inference_engine/transformations/depth_to_space_fusion_test.cpp +++ b/inference-engine/tests/functional/inference_engine/transformations/depth_to_space_fusion_test.cpp @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/inference-engine/tests/functional/inference_engine/keep_constant_inputs_tests.cpp b/inference-engine/tests/functional/inference_engine/transformations/keep_constant_inputs_tests.cpp similarity index 98% rename from inference-engine/tests/functional/inference_engine/keep_constant_inputs_tests.cpp rename to inference-engine/tests/functional/inference_engine/transformations/keep_constant_inputs_tests.cpp index 81bb6dd5ffe..d5ece0a3a61 100644 --- a/inference-engine/tests/functional/inference_engine/keep_constant_inputs_tests.cpp +++ b/inference-engine/tests/functional/inference_engine/transformations/keep_constant_inputs_tests.cpp @@ -5,6 +5,7 @@ #include #include #include // deprecated API +#include // deprecated API #include #include diff --git a/inference-engine/tests/functional/inference_engine/transformations/optimize_strided_slice_test.cpp b/inference-engine/tests/functional/inference_engine/transformations/optimize_strided_slice_test.cpp index b8fc20da532..cfe9314880f 100644 --- a/inference-engine/tests/functional/inference_engine/transformations/optimize_strided_slice_test.cpp +++ b/inference-engine/tests/functional/inference_engine/transformations/optimize_strided_slice_test.cpp @@ -16,8 +16,6 @@ #include #include #include -#include -#include #include #include diff --git a/inference-engine/tests/functional/inference_engine/transformations/unroll_loop_test.cpp b/inference-engine/tests/functional/inference_engine/transformations/unroll_loop_test.cpp index 311ea8e1b4e..e07785a0f67 100644 --- a/inference-engine/tests/functional/inference_engine/transformations/unroll_loop_test.cpp +++ b/inference-engine/tests/functional/inference_engine/transformations/unroll_loop_test.cpp @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/inference-engine/tests/functional/inference_engine/transformations/unroll_tensor_iterator_test.cpp b/inference-engine/tests/functional/inference_engine/transformations/unroll_tensor_iterator_test.cpp index c4d83b14d4b..8327ae02787 100644 --- a/inference-engine/tests/functional/inference_engine/transformations/unroll_tensor_iterator_test.cpp +++ b/inference-engine/tests/functional/inference_engine/transformations/unroll_tensor_iterator_test.cpp @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/inference-engine/tests/functional/plugin/CMakeLists.txt b/inference-engine/tests/functional/plugin/CMakeLists.txt index 0c7d7594d2d..348e59c925f 100644 --- a/inference-engine/tests/functional/plugin/CMakeLists.txt +++ b/inference-engine/tests/functional/plugin/CMakeLists.txt @@ -21,4 +21,3 @@ if (ENABLE_MYRIAD) endif() add_subdirectory(conformance) - diff --git a/inference-engine/tests/functional/plugin/cpu/CMakeLists.txt b/inference-engine/tests/functional/plugin/cpu/CMakeLists.txt index abc6cc8fd8f..e9eeb694ed5 100644 --- a/inference-engine/tests/functional/plugin/cpu/CMakeLists.txt +++ b/inference-engine/tests/functional/plugin/cpu/CMakeLists.txt @@ -30,3 +30,8 @@ addIeTargetTest( LABELS CPU ) + +# CVS-55352 +set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/bfloat16/memory_conv.cpp" + PROPERTIES INCLUDE_DIRECTORIES + $) diff --git a/inference-engine/tests/functional/plugin/cpu/extension/extension.cpp b/inference-engine/tests/functional/plugin/cpu/extension/extension.cpp index 93eb83c4f83..274aba63069 100644 --- a/inference-engine/tests/functional/plugin/cpu/extension/extension.cpp +++ b/inference-engine/tests/functional/plugin/cpu/extension/extension.cpp @@ -8,74 +8,71 @@ #include #include #include -#include #include class CustomAbsKernel : public InferenceEngine::ILayerExecImpl { - public: - explicit CustomAbsKernel(const std::shared_ptr& node): node(node) {} +public: + explicit CustomAbsKernel(const std::shared_ptr& node): node(node) {} - InferenceEngine::StatusCode - init(InferenceEngine::LayerConfig& /*config*/, InferenceEngine::ResponseDesc* /*resp*/) noexcept override { - return InferenceEngine::StatusCode::OK; + InferenceEngine::StatusCode + init(InferenceEngine::LayerConfig& /*config*/, InferenceEngine::ResponseDesc* /*resp*/) noexcept override { + return InferenceEngine::StatusCode::OK; + } + + InferenceEngine::StatusCode getSupportedConfigurations(std::vector& conf, + InferenceEngine::ResponseDesc* /*resp*/) noexcept override { + InferenceEngine::LayerConfig layerConfig; + layerConfig.dynBatchSupport = true; + + if (node->outputs().size() != 1 && node->inputs().size() != 1) + return InferenceEngine::GENERAL_ERROR; + + InferenceEngine::DataConfig cfg; + cfg.constant = false; + cfg.inPlace = 0; + + InferenceEngine::SizeVector order; + auto partialShape = node->get_output_partial_shape(0); + if (partialShape.is_dynamic()) + return InferenceEngine::GENERAL_ERROR; + + auto shape = node->get_output_shape(0); + for (size_t i = 0; i < shape.size(); i++) { + order.push_back(i); } + cfg.desc = InferenceEngine::TensorDesc(InferenceEngine::Precision::FP32, + shape, {shape, order}); + layerConfig.outConfs.push_back(cfg); + layerConfig.inConfs.push_back(cfg); + conf.push_back(layerConfig); + return InferenceEngine::OK; + } - InferenceEngine::StatusCode getSupportedConfigurations(std::vector& conf, - InferenceEngine::ResponseDesc* /*resp*/) noexcept override { - InferenceEngine::LayerConfig layerConfig; - layerConfig.dynBatchSupport = true; - - if (node->outputs().size() != 1 && node->inputs().size() != 1) - return InferenceEngine::GENERAL_ERROR; - - InferenceEngine::DataConfig cfg; - cfg.constant = false; - cfg.inPlace = 0; - - InferenceEngine::SizeVector order; - auto partialShape = node->get_output_partial_shape(0); - if (partialShape.is_dynamic()) - return InferenceEngine::GENERAL_ERROR; - - auto shape = node->get_output_shape(0); - for (size_t i = 0; i < shape.size(); i++) { - order.push_back(i); + InferenceEngine::StatusCode + execute(std::vector& inputs, std::vector& outputs, + InferenceEngine::ResponseDesc* /*resp*/) noexcept override { + for (size_t i = 0; i < inputs.size(); i++) { + InferenceEngine::MemoryBlob::CPtr minput = InferenceEngine::as(inputs[i]); + InferenceEngine::MemoryBlob::Ptr moutput = InferenceEngine::as(outputs[i]); + if (!moutput || !minput) { + return InferenceEngine::StatusCode::PARAMETER_MISMATCH; } - cfg.desc = InferenceEngine::TensorDesc(InferenceEngine::Precision::FP32, - shape, {shape, order}); - layerConfig.outConfs.push_back(cfg); - layerConfig.inConfs.push_back(cfg); - conf.push_back(layerConfig); - return InferenceEngine::OK; - } + // locked memory holder should be alive all time while access to its buffer happens + auto minputHolder = minput->rmap(); + auto moutputHolder = moutput->wmap(); - InferenceEngine::StatusCode - execute(std::vector& inputs, std::vector& outputs, - InferenceEngine::ResponseDesc* /*resp*/) noexcept override { - for (size_t i = 0; i < inputs.size(); i++) { - InferenceEngine::MemoryBlob::CPtr minput = InferenceEngine::as(inputs[i]); - InferenceEngine::MemoryBlob::Ptr moutput = InferenceEngine::as(outputs[i]); - if (!moutput || !minput) { - return InferenceEngine::StatusCode::PARAMETER_MISMATCH; - } - // locked memory holder should be alive all time while access to its buffer happens - auto minputHolder = minput->rmap(); - auto moutputHolder = moutput->wmap(); - - auto inputData = minputHolder.as(); - auto outputData = moutputHolder.as(); - for (size_t j = 0; j < minput->size(); j++) { - outputData[j] = inputData[j] < 0 ? (-inputData[j] * 2) : inputData[j]; - } + auto inputData = minputHolder.as(); + auto outputData = moutputHolder.as(); + for (size_t j = 0; j < minput->size(); j++) { + outputData[j] = inputData[j] < 0 ? (-inputData[j] * 2) : inputData[j]; } - return InferenceEngine::StatusCode::OK; } + return InferenceEngine::StatusCode::OK; + } - - - private: - const std::shared_ptr node; +private: + const std::shared_ptr node; }; class CustomAbs : public ngraph::op::Op { @@ -100,31 +97,28 @@ public: constexpr ngraph::NodeTypeInfo CustomAbs::type_info; class CustomAbsExtension : public InferenceEngine::IExtension { - public: - CustomAbsExtension() { - } +public: + void GetVersion(const InferenceEngine::Version*& versionInfo) const noexcept override {} - void GetVersion(const InferenceEngine::Version*& versionInfo) const noexcept override {} + void Unload() noexcept override {} - void Unload() noexcept override {} + std::map getOpSets() override { + std::map opsets; + ngraph::OpSet opset; + opset.insert(); + opsets["custom_opset"] = opset; + return opsets; + } - std::map getOpSets() override { - std::map opsets; - ngraph::OpSet opset; - opset.insert(); - opsets["custom_opset"] = opset; - return opsets; - } + std::vector getImplTypes(const std::shared_ptr& node) override { + if (node->description() != CustomAbs::type_info.name) + return {}; + return {"CPU"}; + } - std::vector getImplTypes(const std::shared_ptr& node) override { - if (node->description() != CustomAbs::type_info.name) - return {}; - return {"CPU"}; - } - - InferenceEngine::ILayerImpl::Ptr getImplementation(const std::shared_ptr& node, const std::string& implType) override { - return std::make_shared(node); - } + InferenceEngine::ILayerImpl::Ptr getImplementation(const std::shared_ptr& node, const std::string& implType) override { + return std::make_shared(node); + } }; void infer_model(InferenceEngine::Core& ie, const std::string& model, diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/skip_tests_config.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/skip_tests_config.cpp index 24493069064..c8afd43d056 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/skip_tests_config.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/skip_tests_config.cpp @@ -65,6 +65,9 @@ std::vector disabledTestPatterns() { // Unsupported operation of type: NormalizeL2 name : Doesn't support reduction axes: (2.2) R"(.*BF16NetworkRestore1.*)", R"(.*MobileNet_ssd_with_branching.*)", + + // AUTO plugin and QueryNetwork + R"(.*CoreThreading.*smoke_QueryNetwork.*targetDevice=AUTO_config.*)", }; if (!InferenceEngine::with_cpu_x86_avx512_core()) { diff --git a/inference-engine/tests/functional/plugin/cpu/test_utils/fusing_test_utils.hpp b/inference-engine/tests/functional/plugin/cpu/test_utils/fusing_test_utils.hpp index 2483c74e847..e291919da15 100644 --- a/inference-engine/tests/functional/plugin/cpu/test_utils/fusing_test_utils.hpp +++ b/inference-engine/tests/functional/plugin/cpu/test_utils/fusing_test_utils.hpp @@ -166,7 +166,7 @@ const auto fusingReluAdd = fusingSpecificParams{std::make_shared(s {[](std::shared_ptr inpNode, const ngraph::element::Type& ngPrc, ngraph::ParameterVector& params){ auto shape = inpNode->get_shape(); if (shape.size() == 1) - THROW_IE_EXCEPTION << "If shape.size() == 1 then Granularity can be PerTensor only"; + IE_THROW() << "If shape.size() == 1 then Granularity can be PerTensor only"; ngraph::Shape newShape(shape.size(), 1); newShape[1] = shape[1]; auto constNode = ngraph::builder::makeConstant(ngPrc, newShape, std::vector{}, true); @@ -221,7 +221,7 @@ const auto fusingFakeQuantizePerChannel = fusingSpecificParams{std::make_shared< auto localPrc = inpNode->get_element_type(); auto shape = inpNode->get_shape(); if (shape.size() == 1) - THROW_IE_EXCEPTION << "If shape.size() == 1 then Granularity can be PerTensor only"; + IE_THROW() << "If shape.size() == 1 then Granularity can be PerTensor only"; ngraph::Shape newShape(shape.size(), 1); newShape[1] = shape[1]; return ngraph::builder::makeFakeQuantize(inpNode, localPrc, 256, newShape); diff --git a/inference-engine/tests/functional/plugin/gna/CMakeLists.txt b/inference-engine/tests/functional/plugin/gna/CMakeLists.txt index 83567e31b8f..854e99ee2d5 100644 --- a/inference-engine/tests/functional/plugin/gna/CMakeLists.txt +++ b/inference-engine/tests/functional/plugin/gna/CMakeLists.txt @@ -14,4 +14,12 @@ addIeTargetTest( ADD_CPPLINT LABELS GNA -) \ No newline at end of file +) + +# CVS-55347 +set_source_files_properties( + "${CMAKE_CURRENT_SOURCE_DIR}/shared_tests_instances/behavior/add_output.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/shared_tests_instances/behavior/memory_states.cpp" + PROPERTIES INCLUDE_DIRECTORIES + $) + diff --git a/inference-engine/tests/functional/plugin/gna/Import_export_tests/import_export_memory_layer.cpp b/inference-engine/tests/functional/plugin/gna/Import_export_tests/import_export_memory_layer.cpp index 8adc666460a..c3f7a0c78ae 100644 --- a/inference-engine/tests/functional/plugin/gna/Import_export_tests/import_export_memory_layer.cpp +++ b/inference-engine/tests/functional/plugin/gna/Import_export_tests/import_export_memory_layer.cpp @@ -65,6 +65,7 @@ public: } auto importedNetwork = core->ImportNetwork(inputStream, targetDevice, configuration); std::vector queryToState; + IE_SUPPRESS_DEPRECATED_START for (const auto &query_state : executableNetwork.QueryState()) { queryToState.push_back(query_state.GetName()); } @@ -72,6 +73,7 @@ public: ASSERT_TRUE(std::find(queryToState.begin(), queryToState.end(), next_memory.GetName()) != queryToState.end()) << "State " << next_memory.GetName() << " expected to be in memory states but it is not!"; } + IE_SUPPRESS_DEPRECATED_END InferenceEngine::InferRequest importInfer = importedNetwork.CreateInferRequest(); importInfer.Infer(); } diff --git a/inference-engine/tests/functional/plugin/gpu/CMakeLists.txt b/inference-engine/tests/functional/plugin/gpu/CMakeLists.txt index 2cc1c9d3bc3..2d9707a3a2f 100644 --- a/inference-engine/tests/functional/plugin/gpu/CMakeLists.txt +++ b/inference-engine/tests/functional/plugin/gpu/CMakeLists.txt @@ -22,6 +22,22 @@ addIeTargetTest( GPU ) +# CVS-55376 +set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/shared_tests_instances/low_precision_transformations/layer_transformation.cpp" + PROPERTIES INCLUDE_DIRECTORIES + $) + +# try to find VA libraries +find_package(PkgConfig QUIET) +if(PkgConfig_FOUND) + pkg_search_module(LIBVA QUIET libva) +endif() + +# TODO: pkg_search_module finds libva not in sysroot +if(ANDROID) + set(LIBVA_FOUND OFF CACHE BOOL "" FORCE) +endif() + if(LIBVA_FOUND) target_compile_definitions(${TARGET_NAME} PRIVATE ENABLE_LIBVA) target_include_directories(${TARGET_NAME} PRIVATE ${LIBVA_INCLUDE_DIRS}) diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/low_precision_transformations/layer_transformation.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/low_precision_transformations/layer_transformation.cpp index 9769e9b9b0d..fd396fd631d 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/low_precision_transformations/layer_transformation.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/low_precision_transformations/layer_transformation.cpp @@ -11,13 +11,12 @@ #include -#include -#include -#include + #include #include #include #include +#include #include #include #include diff --git a/inference-engine/tests/functional/plugin/myriad/ngraph/conversions/dynamic_shape_resolver.cpp b/inference-engine/tests/functional/plugin/myriad/ngraph/conversions/dynamic_shape_resolver.cpp index 9ab50fc501e..25fc4c85cca 100644 --- a/inference-engine/tests/functional/plugin/myriad/ngraph/conversions/dynamic_shape_resolver.cpp +++ b/inference-engine/tests/functional/plugin/myriad/ngraph/conversions/dynamic_shape_resolver.cpp @@ -13,7 +13,6 @@ #include "common_test_utils/test_common.hpp" #include "common_test_utils/common_utils.hpp" -#include #include diff --git a/inference-engine/tests/functional/plugin/shared/CMakeLists.txt b/inference-engine/tests/functional/plugin/shared/CMakeLists.txt index 6bb9f918a2b..c55a06783e2 100644 --- a/inference-engine/tests/functional/plugin/shared/CMakeLists.txt +++ b/inference-engine/tests/functional/plugin/shared/CMakeLists.txt @@ -39,10 +39,15 @@ addIeTarget( ${EXPORT_DEPENDENCIES} ) +# CVS-55376 +set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/src/low_precision_transformations/layer_transformation.cpp" + PROPERTIES INCLUDE_DIRECTORIES + $) + ie_faster_build(${TARGET_NAME} PCH PRIVATE "src/precomp.hpp" ) if (TARGET MKLDNNPlugin) add_dependencies(${TARGET_NAME} MKLDNNPlugin) -endif() \ No newline at end of file +endif() diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/core_threading_tests.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/core_threading_tests.hpp index 1b255e6afbd..c91198bd2e9 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/core_threading_tests.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/core_threading_tests.hpp @@ -13,11 +13,9 @@ #include #include #include -#include #include #include #include -#include #include #include @@ -177,7 +175,7 @@ TEST_P(CoreThreadingTests, smoke_QueryNetwork) { } // -// Parametrized tests with numfer of parallel threads, iterations +// Parameterized tests with number of parallel threads, iterations // using Threads = unsigned int; diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/exec_graph_info.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/exec_graph_info.hpp index c4e0f4ee395..75e1507f112 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/exec_graph_info.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/exec_graph_info.hpp @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include "common_test_utils/common_utils.hpp" @@ -79,54 +78,35 @@ TEST_P(ExecGraphTests, CheckExecGraphInfoBeforeExecution) { originalLayersMap[layer->get_friendly_name()] = 0; } int IteratorForLayersConstant = 0; - if (auto function = execGraph.getFunction()) { - for (const auto & op : function->get_ops()) { - const auto & rtInfo = op->get_rt_info(); - auto getExecValue = [&rtInfo](const std::string & paramName) -> std::string { - auto it = rtInfo.find(paramName); - IE_ASSERT(rtInfo.end() != it); - auto value = std::dynamic_pointer_cast>(it->second); - IE_ASSERT(nullptr != value); + auto function = execGraph.getFunction(); + ASSERT_NE(function, nullptr); - return value->get(); - }; + for (const auto & op : function->get_ops()) { + const auto & rtInfo = op->get_rt_info(); - // Each layer from the execGraphInfo network must have PM data option set - ASSERT_EQ("not_executed", getExecValue(ExecGraphInfoSerialization::PERF_COUNTER)); - // Parse origin layer names (fused/merged layers) from the executable graph - // and compare with layers from the original model - auto origFromExecLayer = getExecValue(ExecGraphInfoSerialization::ORIGINAL_NAMES); - if (origFromExecLayer == "") - IteratorForLayersConstant++; - std::vector origFromExecLayerSep = separateStrToVec(origFromExecLayer, ','); - std::for_each(origFromExecLayerSep.begin(), origFromExecLayerSep.end(), [&](const std::string &layer) { - auto origLayer = originalLayersMap.find(layer); - ASSERT_NE(originalLayersMap.end(), origLayer) << layer; - origLayer->second++; - }); - } - } else { - IE_SUPPRESS_DEPRECATED_START - // Store all the layers from the executable graph information represented as CNNNetwork - const std::vector execGraphLayers = - InferenceEngine::details::CNNNetSortTopologically(execGraph); - for (const auto &execLayer : execGraphLayers) { - // Each layer from the execGraphInfo network must have PM data option set - ASSERT_EQ("not_executed", execLayer->params[ExecGraphInfoSerialization::PERF_COUNTER]); - // Parse origin layer names (fused/merged layers) from the executable graph - // and compare with layers from the original model - auto origFromExecLayer = execLayer->params[ExecGraphInfoSerialization::ORIGINAL_NAMES]; - if (origFromExecLayer == "") - IteratorForLayersConstant++; - std::vector origFromExecLayerSep = separateStrToVec(origFromExecLayer, ','); - std::for_each(origFromExecLayerSep.begin(), origFromExecLayerSep.end(), [&](const std::string &layer) { - auto origLayer = originalLayersMap.find(layer); - ASSERT_NE(originalLayersMap.end(), origLayer) << layer; - origLayer->second++; - }); - } - IE_SUPPRESS_DEPRECATED_END + auto getExecValue = [&rtInfo](const std::string & paramName) -> std::string { + auto it = rtInfo.find(paramName); + IE_ASSERT(rtInfo.end() != it); + auto value = std::dynamic_pointer_cast>(it->second); + IE_ASSERT(nullptr != value); + + return value->get(); + }; + + // Each layer from the execGraphInfo network must have PM data option set + ASSERT_EQ("not_executed", getExecValue(ExecGraphInfoSerialization::PERF_COUNTER)); + // Parse origin layer names (fused/merged layers) from the executable graph + // and compare with layers from the original model + auto origFromExecLayer = getExecValue(ExecGraphInfoSerialization::ORIGINAL_NAMES); + if (origFromExecLayer == "") + IteratorForLayersConstant++; + std::vector origFromExecLayerSep = separateStrToVec(origFromExecLayer, ','); + std::for_each(origFromExecLayerSep.begin(), origFromExecLayerSep.end(), [&](const std::string &layer) { + auto origLayer = originalLayersMap.find(layer); + ASSERT_NE(originalLayersMap.end(), origLayer) << layer; + origLayer->second++; + }); } // All layers from the original IR must be present with in ExecGraphInfo @@ -168,66 +148,40 @@ TEST_P(ExecGraphTests, CheckExecGraphInfoAfterExecution) { int IteratorForLayersConstant = 0; // Store all the layers from the executable graph information represented as CNNNetwork bool has_layer_with_valid_time = false; + auto function = execGraph.getFunction(); + ASSERT_NE(nullptr, function); - if (auto function = execGraph.getFunction()) { - for (const auto & op : function->get_ops()) { - const auto & rtInfo = op->get_rt_info(); + for (const auto & op : function->get_ops()) { + const auto & rtInfo = op->get_rt_info(); - auto getExecValue = [&rtInfo](const std::string & paramName) -> std::string { - auto it = rtInfo.find(paramName); - IE_ASSERT(rtInfo.end() != it); - auto value = std::dynamic_pointer_cast>(it->second); - IE_ASSERT(nullptr != value); + auto getExecValue = [&rtInfo](const std::string & paramName) -> std::string { + auto it = rtInfo.find(paramName); + IE_ASSERT(rtInfo.end() != it); + auto value = std::dynamic_pointer_cast>(it->second); + IE_ASSERT(nullptr != value); - return value->get(); - }; + return value->get(); + }; - // At least one layer in the topology should be executed and have valid perf counter value - try { - float x = static_cast(std::atof( - getExecValue(ExecGraphInfoSerialization::PERF_COUNTER).c_str())); - ASSERT_GE(x, 0.0f); - has_layer_with_valid_time = true; - } catch (std::exception &) {} + // At least one layer in the topology should be executed and have valid perf counter value + try { + float x = static_cast(std::atof( + getExecValue(ExecGraphInfoSerialization::PERF_COUNTER).c_str())); + ASSERT_GE(x, 0.0f); + has_layer_with_valid_time = true; + } catch (std::exception &) {} - // Parse origin layer names (fused/merged layers) from the executable graph - // and compare with layers from the original model - auto origFromExecLayer = getExecValue(ExecGraphInfoSerialization::ORIGINAL_NAMES); - std::vector origFromExecLayerSep = separateStrToVec(origFromExecLayer, ','); - if (origFromExecLayer == "") - IteratorForLayersConstant++; - std::for_each(origFromExecLayerSep.begin(), origFromExecLayerSep.end(), [&](const std::string &layer) { - auto origLayer = originalLayersMap.find(layer); - ASSERT_NE(originalLayersMap.end(), origLayer) << layer; - origLayer->second++; - }); - } - } else { - IE_SUPPRESS_DEPRECATED_START - const std::vector execGraphLayers = - InferenceEngine::details::CNNNetSortTopologically(execGraph); - for (const auto &execLayer : execGraphLayers) { - // At least one layer in the topology should be executed and have valid perf counter value - try { - float x = static_cast(std::atof( - execLayer->params[ExecGraphInfoSerialization::PERF_COUNTER].c_str())); - ASSERT_GE(x, 0.0f); - has_layer_with_valid_time = true; - } catch (std::exception &) {} - - // Parse origin layer names (fused/merged layers) from the executable graph - // and compare with layers from the original model - auto origFromExecLayer = execLayer->params[ExecGraphInfoSerialization::ORIGINAL_NAMES]; - std::vector origFromExecLayerSep = separateStrToVec(origFromExecLayer, ','); - if (origFromExecLayer == "") - IteratorForLayersConstant++; - std::for_each(origFromExecLayerSep.begin(), origFromExecLayerSep.end(), [&](const std::string &layer) { - auto origLayer = originalLayersMap.find(layer); - ASSERT_NE(originalLayersMap.end(), origLayer) << layer; - origLayer->second++; - }); - } - IE_SUPPRESS_DEPRECATED_END + // Parse origin layer names (fused/merged layers) from the executable graph + // and compare with layers from the original model + auto origFromExecLayer = getExecValue(ExecGraphInfoSerialization::ORIGINAL_NAMES); + std::vector origFromExecLayerSep = separateStrToVec(origFromExecLayer, ','); + if (origFromExecLayer == "") + IteratorForLayersConstant++; + std::for_each(origFromExecLayerSep.begin(), origFromExecLayerSep.end(), [&](const std::string &layer) { + auto origLayer = originalLayersMap.find(layer); + ASSERT_NE(originalLayersMap.end(), origLayer) << layer; + origLayer->second++; + }); } ASSERT_TRUE(has_layer_with_valid_time); diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/test_plugin.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/test_plugin.hpp index 2dba0810bc4..81f25912cf9 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/test_plugin.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/test_plugin.hpp @@ -10,10 +10,8 @@ #include #include "ie_extension.h" #include -#include #include #include -#include #include #include #include @@ -47,15 +45,6 @@ TEST_P(BehaviorTests, allocateNullBlob) { ASSERT_NO_THROW(blob.allocate()); } -TEST_P(BehaviorTests, canNotLoadNetworkWithoutWeights) { - // Skip test according to plugin specific disabledTestPatterns() (if any) - SKIP_IF_CURRENT_TEST_IS_DISABLED() - InferenceEngine::Core core; - auto model = FuncTestUtils::TestModel::convReluNormPoolFcModelFP32; - ASSERT_THROW(core.ReadNetwork(model.model_xml_str, InferenceEngine::Blob::CPtr()), - InferenceEngine::Exception); -} - TEST_P(BehaviorTests, pluginDoesNotChangeOriginalNetwork) { // Skip test according to plugin specific disabledTestPatterns() (if any) SKIP_IF_CURRENT_TEST_IS_DISABLED() diff --git a/inference-engine/tests/functional/plugin/shared/src/behavior/caching_tests.cpp b/inference-engine/tests/functional/plugin/shared/src/behavior/caching_tests.cpp index d64ce15bd82..0f8f97c6534 100644 --- a/inference-engine/tests/functional/plugin/shared/src/behavior/caching_tests.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/behavior/caching_tests.cpp @@ -180,7 +180,7 @@ void LoadNetworkCacheTestBase::Run() { executableNetwork = core->LoadNetwork(cnnNetwork, targetDevice, configuration); GenerateInputs(); Infer(); - } catch (InferenceEngineException &ex) { + } catch (const Exception &ex) { GTEST_COUT << "Can't loadNetwork without cache for " << m_functionName << " with precision " << m_precision.get_type_name() << std::endl; GTEST_COUT << "Exception [" << ex.what() << "]" << std::endl; SKIP(); diff --git a/inference-engine/tests/functional/plugin/shared/src/execution_graph_tests/network_serializer.cpp b/inference-engine/tests/functional/plugin/shared/src/execution_graph_tests/network_serializer.cpp deleted file mode 100644 index d68ea04d7dc..00000000000 --- a/inference-engine/tests/functional/plugin/shared/src/execution_graph_tests/network_serializer.cpp +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (C) 2018-2021 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include -#include -#include - -#include -#include - -using namespace InferenceEngine; - -IE_SUPPRESS_DEPRECATED_START - -std::vector TopologicalSort(const InferenceEngine::CNNNetwork& network) { - std::vector ordered; - std::unordered_set used; - - OutputsDataMap outputs = network.getOutputsInfo(); - InputsDataMap inputs = network.getInputsInfo(); - - auto get_consumers = [](const CNNLayerPtr& node) -> std::vector { - std::vector consumers; - for (const auto & output : node->outData) { - for (const auto &consumer : getInputTo(output)) { - consumers.push_back(consumer.second); - } - } - return consumers; - }; - auto bfs = [&used, &ordered, &get_consumers](const CNNLayerPtr& start_node, bool traverse_via_outputs = false) { - if (!start_node) return; - std::deque q; - q.push_front(start_node); - while (!q.empty()) { - auto node = q.front(); - q.pop_front(); - if (used.insert(node->name).second) { - ordered.push_back(node); - } - - // Traverse via inputs - for (const auto & input : node->insData) { - auto locked_input = input.lock(); - if (!locked_input) { - IE_THROW() << "insData for " << node->name << " is not valid."; - } - if (auto next_node = getCreatorLayer(locked_input).lock()) { - if (!used.count(next_node->name)) { - // Check that all consumers were used - bool all_consumers_used(true); - for (const auto & consumer : get_consumers(next_node)) { - if (!used.count(consumer->name)) all_consumers_used = false; - } - if (all_consumers_used) { - q.push_front(next_node); - } - } - } - } - - // Traverse via outputs - if (traverse_via_outputs) { - for (const auto &consumer : get_consumers(node)) { - if (!used.count(consumer->name)) { - q.push_front(consumer); - } - } - } - } - }; - - // First we run bfs starting from outputs that provides deterministic graph traverse - for (const auto & output : outputs) { - if (!used.count(output.first)) { - bfs(getCreatorLayer(output.second).lock()); - } - } - - // For cases when graph has no outputs we start bfs from inputs to ensure topological sort - for (const auto & input : inputs) { - const auto data_ptr = input.second->getInputData(); - for (const auto & consumer : getInputTo(data_ptr)) - if (!used.count(consumer.first)) { - bfs(consumer.second, true); - } - } - - std::reverse(ordered.begin(), ordered.end()); - return ordered; -} \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/src/execution_graph_tests/num_inputs_fusing_bin_conv.cpp b/inference-engine/tests/functional/plugin/shared/src/execution_graph_tests/num_inputs_fusing_bin_conv.cpp index 4c50b8e960b..4ebf3d78883 100644 --- a/inference-engine/tests/functional/plugin/shared/src/execution_graph_tests/num_inputs_fusing_bin_conv.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/execution_graph_tests/num_inputs_fusing_bin_conv.cpp @@ -17,8 +17,6 @@ #include "execution_graph_tests/num_inputs_fusing_bin_conv.hpp" -std::vector TopologicalSort(const InferenceEngine::CNNNetwork& network); - namespace ExecutionGraphTests { std::string ExecGraphInputsFusingBinConv::getTestCaseName(testing::TestParamInfo obj) { @@ -58,60 +56,26 @@ TEST_P(ExecGraphInputsFusingBinConv, CheckNumInputsInBinConvFusingWithConv) { auto execNet = ie->LoadNetwork(cnnNet, targetDevice); InferenceEngine::CNNNetwork execGraphInfo = execNet.GetExecGraphInfo(); + auto function = execGraphInfo.getFunction(); + ASSERT_NE(function, nullptr); - if (auto function = execGraphInfo.getFunction()) { - // try to convert to old representation and check that conversion passed well - std::shared_ptr convertedExecGraph; - ASSERT_NO_THROW(convertedExecGraph = std::make_shared(execGraphInfo)); + for (const auto & op : function->get_ops()) { + const auto & rtInfo = op->get_rt_info(); + auto getExecValue = [&rtInfo](const std::string & paramName) -> std::string { + auto it = rtInfo.find(paramName); + IE_ASSERT(rtInfo.end() != it); + auto value = std::dynamic_pointer_cast>(it->second); + IE_ASSERT(nullptr != value); - for (const auto & op : function->get_ops()) { - const auto & rtInfo = op->get_rt_info(); - auto getExecValue = [&rtInfo](const std::string & paramName) -> std::string { - auto it = rtInfo.find(paramName); - IE_ASSERT(rtInfo.end() != it); - auto value = std::dynamic_pointer_cast>(it->second); - IE_ASSERT(nullptr != value); + return value->get(); + }; - return value->get(); - }; - - auto layerType = getExecValue("layerType"); - if (layerType == "BinaryConvolution") { - auto originalLayersNames = getExecValue("originalLayersNames"); - ASSERT_TRUE(originalLayersNames.find("BinaryConvolution") != std::string::npos); - ASSERT_EQ(op->get_input_size(), 2); - } - - // IR v7 does not have output nodes - if (ngraph::op::is_output(op)) - continue; - - IE_SUPPRESS_DEPRECATED_START - InferenceEngine::CNNLayerPtr cnnLayer; - ASSERT_NO_THROW(cnnLayer = CommonTestUtils::getLayerByName(InferenceEngine::CNNNetwork(convertedExecGraph), op->get_friendly_name())); - ASSERT_EQ(cnnLayer->name, op->get_friendly_name()); - auto variantType = std::dynamic_pointer_cast>( - op->get_rt_info()[ExecGraphInfoSerialization::LAYER_TYPE]);; - ASSERT_EQ(cnnLayer->type, variantType->get()); - - for (const auto & kvp : cnnLayer->params) { - auto variant = std::dynamic_pointer_cast>(op->get_rt_info()[kvp.first]); - ASSERT_EQ(variant->get(), kvp.second); - } - IE_SUPPRESS_DEPRECATED_END + auto layerType = getExecValue("layerType"); + if (layerType == "BinaryConvolution") { + auto originalLayersNames = getExecValue("originalLayersNames"); + ASSERT_TRUE(originalLayersNames.find("BinaryConvolution") != std::string::npos); + ASSERT_EQ(op->get_input_size(), 2); } - } else { - IE_SUPPRESS_DEPRECATED_START - std::vector nodes; - ASSERT_NO_THROW(nodes = TopologicalSort(execGraphInfo)); - for (auto &node : nodes) { - if (node->type == "BinaryConvolution") { - std::string originalLayersNames = node->params["originalLayersNames"]; - ASSERT_TRUE(originalLayersNames.find("BinaryConvolution") != std::string::npos); - ASSERT_EQ(node->insData.size(), 2); - } - } - IE_SUPPRESS_DEPRECATED_END } fnPtr.reset(); diff --git a/inference-engine/tests/functional/plugin/shared/src/execution_graph_tests/unique_node_names.cpp b/inference-engine/tests/functional/plugin/shared/src/execution_graph_tests/unique_node_names.cpp index ebd8ae366b5..b51ed0a1e6c 100644 --- a/inference-engine/tests/functional/plugin/shared/src/execution_graph_tests/unique_node_names.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/execution_graph_tests/unique_node_names.cpp @@ -22,8 +22,6 @@ #include "execution_graph_tests/unique_node_names.hpp" -std::vector TopologicalSort(const InferenceEngine::CNNNetwork& network); - namespace ExecutionGraphTests { std::string ExecGraphUniqueNodeNames::getTestCaseName(testing::TestParamInfo obj) { @@ -46,11 +44,8 @@ void ExecGraphUniqueNodeNames::SetUp() { std::tie(netPrecision, inputShape, targetDevice) = this->GetParam(); auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision); - auto params = ngraph::builder::makeParams(ngPrc, {inputShape}); - auto split = ngraph::builder::makeSplit(params[0], ngPrc, 2, 1); - auto concat = std::make_shared(split->outputs(), 1); ngraph::ResultVector results{std::make_shared(concat)}; @@ -74,33 +69,22 @@ TEST_P(ExecGraphUniqueNodeNames, CheckUniqueNodeNames) { int expectedReorders = 2; std::unordered_set names; - if (auto function = execGraphInfo.getFunction()) { - for (const auto & op : function->get_ops()) { - ASSERT_TRUE(names.find(op->get_friendly_name()) == names.end()) << - "Node with name " << op->get_friendly_name() << "already exists"; - names.insert(op->get_friendly_name()); + auto function = execGraphInfo.getFunction(); + ASSERT_NE(function, nullptr); - const auto & rtInfo = op->get_rt_info(); - auto it = rtInfo.find(ExecGraphInfoSerialization::LAYER_TYPE); - ASSERT_NE(rtInfo.end(), it); - auto opType = std::dynamic_pointer_cast>(it->second); - ASSERT_NE(nullptr, opType); + for (const auto & op : function->get_ops()) { + ASSERT_TRUE(names.find(op->get_friendly_name()) == names.end()) << + "Node with name " << op->get_friendly_name() << "already exists"; + names.insert(op->get_friendly_name()); - if (opType->get() == "Reorder") { - numReorders++; - } - } - } else { - auto nodes = TopologicalSort(execGraphInfo); - for (auto &node : nodes) { - IE_SUPPRESS_DEPRECATED_START - ASSERT_TRUE(names.find(node->name) == names.end()) << - "Node with name " << node->name << "already exists"; - names.insert(node->name); - if (node->type == "Reorder") { - numReorders++; - } - IE_SUPPRESS_DEPRECATED_END + const auto & rtInfo = op->get_rt_info(); + auto it = rtInfo.find(ExecGraphInfoSerialization::LAYER_TYPE); + ASSERT_NE(rtInfo.end(), it); + auto opType = std::dynamic_pointer_cast>(it->second); + ASSERT_NE(nullptr, opType); + + if (opType->get() == "Reorder") { + numReorders++; } } diff --git a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/depth_to_space_transformation.cpp b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/depth_to_space_transformation.cpp index 7c4fb839ffa..f3169ba9c60 100644 --- a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/depth_to_space_transformation.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/depth_to_space_transformation.cpp @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/layer_transformation.cpp b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/layer_transformation.cpp index 1d7e14753d3..ff01c926baa 100644 --- a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/layer_transformation.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/layer_transformation.cpp @@ -43,6 +43,7 @@ namespace LayerTestsUtils { + ngraph::pass::low_precision::LowPrecisionTransformations LayerTransformation::getLowPrecisionTransformationsNGraph( const ngraph::pass::low_precision::LayerTransformation::Params& params) const { return ngraph::pass::low_precision::LowPrecisionTransformer::getAllTransformations(params). diff --git a/inference-engine/tests/functional/plugin/shared/src/ngraph_conversion_tests/conv_bias_fusion.cpp b/inference-engine/tests/functional/plugin/shared/src/ngraph_conversion_tests/conv_bias_fusion.cpp index 0df6eefa9cd..b168ae1a8f3 100644 --- a/inference-engine/tests/functional/plugin/shared/src/ngraph_conversion_tests/conv_bias_fusion.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/ngraph_conversion_tests/conv_bias_fusion.cpp @@ -43,24 +43,19 @@ TEST_P(ConvBiasFusion, ConvBiasFusion) { InferenceEngine::Core ie; InferenceEngine::ExecutableNetwork exeNetwork = ie.LoadNetwork(network, device); auto net = exeNetwork.GetExecGraphInfo(); + auto function = net.getFunction(); + ASSERT_NE(nullptr, function); - if (auto function = net.getFunction()) { - for (const auto & op : function->get_ops()) { - if (op->get_friendly_name() == getOutputName()) { - auto rtInfo = op->get_rt_info(); - auto it = rtInfo.find("originalLayersNames"); - ASSERT_NE(rtInfo.end(), it); - auto variant = std::dynamic_pointer_cast>(it->second); - ASSERT_NE(nullptr, variant); - ASSERT_EQ(variant->get(), "add,conv"); - break; - } + for (const auto & op : function->get_ops()) { + if (op->get_friendly_name() == getOutputName()) { + auto rtInfo = op->get_rt_info(); + auto it = rtInfo.find("originalLayersNames"); + ASSERT_NE(rtInfo.end(), it); + auto variant = std::dynamic_pointer_cast>(it->second); + ASSERT_NE(nullptr, variant); + ASSERT_EQ(variant->get(), "add,conv"); + break; } - } else { - IE_SUPPRESS_DEPRECATED_START - auto add_layer = CommonTestUtils::getLayerByName(net, getOutputName()); - ASSERT_EQ(add_layer->params["originalLayersNames"], "add,conv"); - IE_SUPPRESS_DEPRECATED_END } } diff --git a/inference-engine/tests/functional/shared_test_classes/CMakeLists.txt b/inference-engine/tests/functional/shared_test_classes/CMakeLists.txt index 1e231440d17..ed6d49e0ca2 100644 --- a/inference-engine/tests/functional/shared_test_classes/CMakeLists.txt +++ b/inference-engine/tests/functional/shared_test_classes/CMakeLists.txt @@ -28,7 +28,12 @@ addIeTarget( ${EXPORT_DEPENDENCIES} ) +# CVS-55373 +set_source_files_properties( + "${CMAKE_CURRENT_SOURCE_DIR}/src/subgraph/softsign.cpp" + PROPERTIES INCLUDE_DIRECTORIES + $) + ie_faster_build(${TARGET_NAME} PCH PRIVATE "src/precomp.hpp" ) - diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/base/low_precision_transformations/layer_transformation.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/base/low_precision_transformations/layer_transformation.hpp index f1d2fde5d3d..f5cef5abc3e 100644 --- a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/base/low_precision_transformations/layer_transformation.hpp +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/base/low_precision_transformations/layer_transformation.hpp @@ -8,8 +8,6 @@ #include #include -#include - #include "shared_test_classes/base/layer_test_utils.hpp" #include diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/eltwise.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/eltwise.hpp index 76439bc2d4b..b17b8891922 100644 --- a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/eltwise.hpp +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/eltwise.hpp @@ -11,7 +11,6 @@ #include "common_test_utils/common_utils.hpp" #include "common_test_utils/test_common.hpp" #include "common_test_utils/test_constants.hpp" -#include "common_test_utils/common_layers_params.hpp" #include "ie_core.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/reduce_ops.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/reduce_ops.hpp index ad8b12deb85..98029b6ebef 100644 --- a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/reduce_ops.hpp +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/reduce_ops.hpp @@ -11,7 +11,6 @@ #include "shared_test_classes/base/layer_test_utils.hpp" #include "ngraph_functions/builders.hpp" -#include "common_test_utils/common_layers_params.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/shared_test_classes/src/base/low_precision_transformations/layer_transformation.cpp b/inference-engine/tests/functional/shared_test_classes/src/base/low_precision_transformations/layer_transformation.cpp index 72c4c0cd1f5..3a6dd4dc4ea 100644 --- a/inference-engine/tests/functional/shared_test_classes/src/base/low_precision_transformations/layer_transformation.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/base/low_precision_transformations/layer_transformation.cpp @@ -13,8 +13,6 @@ #include "ngraph_functions/pass/convert_prc.hpp" -#include - using namespace InferenceEngine; using namespace ngraph; diff --git a/inference-engine/tests/functional/shared_test_classes/src/single_layer/gru_sequence.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/gru_sequence.cpp index f43cca3ca6d..b7c135eb0de 100644 --- a/inference-engine/tests/functional/shared_test_classes/src/single_layer/gru_sequence.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/gru_sequence.cpp @@ -99,6 +99,7 @@ namespace LayerTestsDefinitions { } void GRUSequenceTest::GenerateInputs() { + inputs.clear(); for (const auto &input : executableNetwork.GetInputsInfo()) { const auto &info = input.second; auto blob = GenerateInput(*info); diff --git a/inference-engine/tests/functional/shared_test_classes/src/single_layer/prior_box_clustered.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/prior_box_clustered.cpp index ce85bf79bd4..e13c754d5de 100644 --- a/inference-engine/tests/functional/shared_test_classes/src/single_layer/prior_box_clustered.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/prior_box_clustered.cpp @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "legacy/ngraph_ops/prior_box_clustered_ie.hpp" #include "shared_test_classes/single_layer/prior_box_clustered.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/shared_test_classes/src/subgraph/split_concat_memory.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/split_concat_memory.cpp index 828cc25b1a8..bfaf2e877d9 100644 --- a/inference-engine/tests/functional/shared_test_classes/src/subgraph/split_concat_memory.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/split_concat_memory.cpp @@ -4,7 +4,6 @@ #include "ngraph/opsets/opset5.hpp" #include "shared_test_classes/subgraph/split_concat_memory.hpp" -#include "common_test_utils/xml_net_builder/ir_net.hpp" namespace SubgraphTestsDefinitions { diff --git a/inference-engine/tests/ie_test_utils/common_test_utils/CMakeLists.txt b/inference-engine/tests/ie_test_utils/common_test_utils/CMakeLists.txt index 9d7a0286054..b4c18477cd2 100644 --- a/inference-engine/tests/ie_test_utils/common_test_utils/CMakeLists.txt +++ b/inference-engine/tests/ie_test_utils/common_test_utils/CMakeLists.txt @@ -75,8 +75,16 @@ function(add_common_utils ADD_TARGET_NAME) PUBLIC ${PUGI} ${NGRAPH_LIBRARIES} + ${EXPORT_DEPENDENCIES} ) + # USE_STATIC_IE is passed + if(ARGN) + target_link_libraries(${ADD_TARGET_NAME} PRIVATE inference_engine_s) + else() + target_link_libraries(${ADD_TARGET_NAME} PRIVATE inference_engine_legacy) + endif() + ie_faster_build(${ADD_TARGET_NAME} UNITY PCH PRIVATE "precomp.hpp" @@ -102,18 +110,13 @@ function(add_common_utils ADD_TARGET_NAME) PUBLIC ${IE_TESTS_ROOT}/ie_test_utils $ - $ $ PRIVATE + $ $ ) target_compile_definitions(${ADD_TARGET_NAME} PUBLIC ${ARGN}) - - target_link_libraries(${ADD_TARGET_NAME} - PUBLIC - ${EXPORT_DEPENDENCIES} - ) endfunction() add_common_utils(${TARGET_NAME}) diff --git a/inference-engine/tests/ie_test_utils/common_test_utils/common_layers_params.cpp b/inference-engine/tests/ie_test_utils/common_test_utils/common_layers_params.cpp index 0ccdbc182a0..081a8d389ff 100644 --- a/inference-engine/tests/ie_test_utils/common_test_utils/common_layers_params.cpp +++ b/inference-engine/tests/ie_test_utils/common_test_utils/common_layers_params.cpp @@ -209,18 +209,4 @@ void get_common_dims(const InferenceEngine::Blob &blob, } } -std::ostream& operator<<(std::ostream & os, OpType type) { - switch (type) { - case OpType::SCALAR: - os << "SCALAR"; - break; - case OpType::VECTOR: - os << "VECTOR"; - break; - default: - IE_THROW() << "NOT_SUPPORTED_OP_TYPE"; - } - return os; -} - } // namespace CommonTestUtils diff --git a/inference-engine/tests/ie_test_utils/common_test_utils/common_layers_params.hpp b/inference-engine/tests/ie_test_utils/common_test_utils/common_layers_params.hpp index b1d5ec5595e..a1e8bf06288 100644 --- a/inference-engine/tests/ie_test_utils/common_test_utils/common_layers_params.hpp +++ b/inference-engine/tests/ie_test_utils/common_test_utils/common_layers_params.hpp @@ -97,10 +97,5 @@ void get_common_dims(const InferenceEngine::Blob &blob, int32_t &dimz, int32_t &dimn); -enum class OpType { - SCALAR, - VECTOR -}; -std::ostream& operator<<(std::ostream & os, OpType type); } // namespace CommonTestUtils diff --git a/inference-engine/tests/ie_test_utils/common_test_utils/common_utils.cpp b/inference-engine/tests/ie_test_utils/common_test_utils/common_utils.cpp new file mode 100644 index 00000000000..738191890cf --- /dev/null +++ b/inference-engine/tests/ie_test_utils/common_test_utils/common_utils.cpp @@ -0,0 +1,40 @@ +// Copyright (C) 2018-2021 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "common_test_utils/common_utils.hpp" +#include + +namespace CommonTestUtils { + +IE_SUPPRESS_DEPRECATED_START + +std::shared_ptr +getLayerByName(const InferenceEngine::CNNNetwork & network, const std::string & layerName) { + InferenceEngine::details::CNNNetworkIterator i(network), end; + while (i != end) { + auto layer = *i; + if (layer->name == layerName) + return layer; + ++i; + } + IE_THROW(NotFound) << "Layer " << layerName << " not found in network"; +} + +IE_SUPPRESS_DEPRECATED_END + +std::ostream& operator<<(std::ostream & os, OpType type) { + switch (type) { + case OpType::SCALAR: + os << "SCALAR"; + break; + case OpType::VECTOR: + os << "VECTOR"; + break; + default: + IE_THROW() << "NOT_SUPPORTED_OP_TYPE"; + } + return os; +} + +} // namespace CommonTestUtils diff --git a/inference-engine/tests/ie_test_utils/common_test_utils/common_utils.hpp b/inference-engine/tests/ie_test_utils/common_test_utils/common_utils.hpp index 391ada9bf77..dc6aaf2e051 100644 --- a/inference-engine/tests/ie_test_utils/common_test_utils/common_utils.hpp +++ b/inference-engine/tests/ie_test_utils/common_test_utils/common_utils.hpp @@ -11,11 +11,29 @@ #include #include #include +#include +#include #include -#include + +namespace InferenceEngine { +class CNNLayer; +} namespace CommonTestUtils { + +enum class OpType { + SCALAR, + VECTOR +}; + +std::ostream& operator<<(std::ostream & os, OpType type); + +IE_SUPPRESS_DEPRECATED_START +std::shared_ptr +getLayerByName(const InferenceEngine::CNNNetwork & network, const std::string & layerName); +IE_SUPPRESS_DEPRECATED_END + template inline std::string vec2str(const std::vector &vec) { if (!vec.empty()) { @@ -49,19 +67,6 @@ inline std::string set2str(const std::set &set) { return std::string("()"); } -inline InferenceEngine::CNNLayerPtr getLayerByName(const InferenceEngine::CNNNetwork & network, - const std::string & layerName) { - IE_SUPPRESS_DEPRECATED_START - InferenceEngine::details::CNNNetworkIterator i(network), end; - while (i != end) { - auto layer = *i; - if (layer->name == layerName) - return layer; - ++i; - } - IE_THROW(NotFound) << "Layer " << layerName << " not found in network"; -} - template std::vector> combineParams( const std::map>& keyValueSets) { diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/CMakeLists.txt b/inference-engine/tests/ie_test_utils/functional_test_utils/CMakeLists.txt index 6ed92869536..7ddc4ed9d07 100644 --- a/inference-engine/tests/ie_test_utils/functional_test_utils/CMakeLists.txt +++ b/inference-engine/tests/ie_test_utils/functional_test_utils/CMakeLists.txt @@ -26,6 +26,9 @@ addIeTarget( inference_engine_transformations inference_engine_lp_transformations inference_engine + PRIVATE + # use this dependency as private in order to minimize + # its usage in 3rd party applications inference_engine_legacy INCLUDES PUBLIC diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/src/layer_test_utils/summary.cpp b/inference-engine/tests/ie_test_utils/functional_test_utils/src/layer_test_utils/summary.cpp index 522f882fb25..6d6a5243cba 100644 --- a/inference-engine/tests/ie_test_utils/functional_test_utils/src/layer_test_utils/summary.cpp +++ b/inference-engine/tests/ie_test_utils/functional_test_utils/src/layer_test_utils/summary.cpp @@ -7,6 +7,9 @@ using namespace LayerTestsUtils; +#ifdef _WIN32 +# define getpid _getpid +#endif Summary *Summary::p_instance = nullptr; bool Summary::extendReport = false; diff --git a/inference-engine/tests/ie_test_utils/unit_test_utils/CMakeLists.txt b/inference-engine/tests/ie_test_utils/unit_test_utils/CMakeLists.txt index 50836ed2fb9..7c1d89eabf5 100644 --- a/inference-engine/tests/ie_test_utils/unit_test_utils/CMakeLists.txt +++ b/inference-engine/tests/ie_test_utils/unit_test_utils/CMakeLists.txt @@ -18,6 +18,9 @@ addIeTarget( ADD_CPPLINT DEVELOPER_PACKAGE inference_engine_tests + INCLUDES + PRIVATE + $ EXPORT_DEPENDENCIES ${EXPORT_DEPENDENCIES} ) diff --git a/inference-engine/tests/ie_test_utils/unit_test_utils/empty.cpp b/inference-engine/tests/ie_test_utils/unit_test_utils/empty.cpp deleted file mode 100644 index 538e6b03942..00000000000 --- a/inference-engine/tests/ie_test_utils/unit_test_utils/empty.cpp +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (C) 2018-2021 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "unit_test_utils/mocks/mock_allocator.hpp" -#include "unit_test_utils/mocks/mock_icnn_network.hpp" -#include "unit_test_utils/mocks/mock_ie_ivariable_state.hpp" -#include "unit_test_utils/mocks/mock_iexecutable_network.hpp" -#include "unit_test_utils/mocks/mock_iinfer_request.hpp" -#include "unit_test_utils/mocks/mock_not_empty_icnn_network.hpp" - -#include "unit_test_utils/mocks/cpp_interfaces/mock_task_executor.hpp" - -#include "unit_test_utils/mocks/cpp_interfaces/impl/mock_async_infer_request_default.hpp" -#include "unit_test_utils/mocks/cpp_interfaces/impl/mock_executable_network_internal.hpp" -#include "unit_test_utils/mocks/cpp_interfaces/impl/mock_executable_thread_safe_default.hpp" -#include "unit_test_utils/mocks/cpp_interfaces/impl/mock_inference_plugin_internal.hpp" - -#include "unit_test_utils/mocks/cpp_interfaces/interface/mock_iexecutable_network_internal.hpp" -#include "unit_test_utils/mocks/cpp_interfaces/interface/mock_iinfer_request_internal.hpp" -#include "unit_test_utils/mocks/cpp_interfaces/interface/mock_ivariable_state_internal.hpp" -#include "unit_test_utils/mocks/cpp_interfaces/interface/mock_iinference_plugin.hpp" diff --git a/inference-engine/tests/ie_test_utils/unit_test_utils/mock.cpp b/inference-engine/tests/ie_test_utils/unit_test_utils/mock.cpp new file mode 100644 index 00000000000..d437fa536af --- /dev/null +++ b/inference-engine/tests/ie_test_utils/unit_test_utils/mock.cpp @@ -0,0 +1,65 @@ +// Copyright (C) 2018-2021 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "unit_test_utils/mocks/mock_allocator.hpp" +#include "unit_test_utils/mocks/mock_icnn_network.hpp" +#include "unit_test_utils/mocks/mock_ie_ivariable_state.hpp" +#include "unit_test_utils/mocks/mock_iexecutable_network.hpp" +#include "unit_test_utils/mocks/mock_iinfer_request.hpp" +#include "unit_test_utils/mocks/mock_not_empty_icnn_network.hpp" + +#include "unit_test_utils/mocks/cpp_interfaces/mock_task_executor.hpp" + +#include "unit_test_utils/mocks/cpp_interfaces/impl/mock_async_infer_request_default.hpp" +#include "unit_test_utils/mocks/cpp_interfaces/impl/mock_executable_network_internal.hpp" +#include "unit_test_utils/mocks/cpp_interfaces/impl/mock_executable_thread_safe_default.hpp" +#include "unit_test_utils/mocks/cpp_interfaces/impl/mock_inference_plugin_internal.hpp" + +#include "unit_test_utils/mocks/cpp_interfaces/interface/mock_iexecutable_network_internal.hpp" +#include "unit_test_utils/mocks/cpp_interfaces/interface/mock_iinfer_request_internal.hpp" +#include "unit_test_utils/mocks/cpp_interfaces/interface/mock_ivariable_state_internal.hpp" +#include "unit_test_utils/mocks/cpp_interfaces/interface/mock_iinference_plugin.hpp" + +#include + +using namespace InferenceEngine; + +void MockNotEmptyICNNNetwork::getOutputsInfo(OutputsDataMap& out) const noexcept { + IE_SUPPRESS_DEPRECATED_START + auto data = std::make_shared(MockNotEmptyICNNNetwork::OUTPUT_BLOB_NAME, Precision::UNSPECIFIED); + getInputTo(data)[""] = std::make_shared(LayerParams{ + MockNotEmptyICNNNetwork::OUTPUT_BLOB_NAME, + "FullyConnected", + Precision::FP32 }); + out[MockNotEmptyICNNNetwork::OUTPUT_BLOB_NAME] = data; + IE_SUPPRESS_DEPRECATED_END +} + +void MockNotEmptyICNNNetwork::getInputsInfo(InputsDataMap &inputs) const noexcept { + IE_SUPPRESS_DEPRECATED_START + auto inputInfo = std::make_shared(); + + auto inData = std::make_shared(MockNotEmptyICNNNetwork::INPUT_BLOB_NAME, Precision::UNSPECIFIED); + auto inputLayer = std::make_shared(LayerParams{ + MockNotEmptyICNNNetwork::INPUT_BLOB_NAME, + "Input", + Precision::FP32 }); + getInputTo(inData)[MockNotEmptyICNNNetwork::OUTPUT_BLOB_NAME] = inputLayer; + inData->setDims(MockNotEmptyICNNNetwork::INPUT_DIMENTIONS); + inData->setLayout(Layout::NCHW); + inputInfo->setInputData(inData); + + auto outData = std::make_shared(MockNotEmptyICNNNetwork::OUTPUT_BLOB_NAME, Precision::UNSPECIFIED); + outData->setDims(MockNotEmptyICNNNetwork::OUTPUT_DIMENTIONS); + outData->setLayout(Layout::NCHW); + getInputTo(outData)[""] = std::make_shared(LayerParams{ + MockNotEmptyICNNNetwork::OUTPUT_BLOB_NAME, + "FullyConnected", + Precision::FP32 }); + + inputLayer->outData.push_back(outData); + + inputs[MockNotEmptyICNNNetwork::INPUT_BLOB_NAME] = inputInfo; + IE_SUPPRESS_DEPRECATED_END +} diff --git a/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/mock_icnn_network.hpp b/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/mock_icnn_network.hpp index 164eba642ad..618122505a4 100644 --- a/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/mock_icnn_network.hpp +++ b/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/mock_icnn_network.hpp @@ -14,10 +14,13 @@ #include #include "ie_icnn_network.hpp" -#include IE_SUPPRESS_DEPRECATED_START +namespace InferenceEngine { +class CNNLayer; +} // namespace InferenceEngine + /** * @class MockICNNNetwork * @brief Main interface to describe the NN topology @@ -33,7 +36,7 @@ class MockICNNNetwork final : public InferenceEngine::ICNNNetwork { MOCK_QUALIFIED_METHOD0(getName, const noexcept, const std::string&()); MOCK_QUALIFIED_METHOD3(addOutput, noexcept, InferenceEngine::StatusCode(const std::string &, size_t, InferenceEngine::ResponseDesc*)); MOCK_QUALIFIED_METHOD3(getLayerByName, const noexcept, InferenceEngine::StatusCode(const char* , - InferenceEngine::CNNLayerPtr&, + std::shared_ptr&, InferenceEngine::ResponseDesc*)); MOCK_QUALIFIED_METHOD2(setBatchSize, noexcept, InferenceEngine::StatusCode(const size_t size, InferenceEngine::ResponseDesc*)); MOCK_QUALIFIED_METHOD0(getBatchSize, const noexcept, size_t()); diff --git a/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/mock_not_empty_icnn_network.hpp b/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/mock_not_empty_icnn_network.hpp index 5be19d7ae5b..b51065d7fd7 100644 --- a/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/mock_not_empty_icnn_network.hpp +++ b/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/mock_not_empty_icnn_network.hpp @@ -10,7 +10,6 @@ #include #include -#include #include "ie_icnn_network.hpp" namespace InferenceEngine { @@ -25,43 +24,8 @@ public: const std::string& getName() const noexcept override { return name; } - void getOutputsInfo(OutputsDataMap& out) const noexcept override { - IE_SUPPRESS_DEPRECATED_START - auto data = std::make_shared(MockNotEmptyICNNNetwork::OUTPUT_BLOB_NAME, Precision::UNSPECIFIED); - getInputTo(data)[""] = std::make_shared(LayerParams{ - MockNotEmptyICNNNetwork::OUTPUT_BLOB_NAME, - "FullyConnected", - Precision::FP32 }); - out[MockNotEmptyICNNNetwork::OUTPUT_BLOB_NAME] = data; - IE_SUPPRESS_DEPRECATED_END - }; - void getInputsInfo(InputsDataMap &inputs) const noexcept override { - IE_SUPPRESS_DEPRECATED_START - auto inputInfo = std::make_shared(); - - auto inData = std::make_shared(MockNotEmptyICNNNetwork::INPUT_BLOB_NAME, Precision::UNSPECIFIED); - auto inputLayer = std::make_shared(LayerParams{ - MockNotEmptyICNNNetwork::INPUT_BLOB_NAME, - "Input", - Precision::FP32 }); - getInputTo(inData)[MockNotEmptyICNNNetwork::OUTPUT_BLOB_NAME] = inputLayer; - inData->setDims(MockNotEmptyICNNNetwork::INPUT_DIMENTIONS); - inData->setLayout(Layout::NCHW); - inputInfo->setInputData(inData); - - auto outData = std::make_shared(MockNotEmptyICNNNetwork::OUTPUT_BLOB_NAME, Precision::UNSPECIFIED); - outData->setDims(MockNotEmptyICNNNetwork::OUTPUT_DIMENTIONS); - outData->setLayout(Layout::NCHW); - getInputTo(outData)[""] = std::make_shared(LayerParams{ - MockNotEmptyICNNNetwork::OUTPUT_BLOB_NAME, - "FullyConnected", - Precision::FP32 }); - - inputLayer->outData.push_back(outData); - - inputs[MockNotEmptyICNNNetwork::INPUT_BLOB_NAME] = inputInfo; - IE_SUPPRESS_DEPRECATED_END - }; + void getOutputsInfo(OutputsDataMap& out) const noexcept override; + void getInputsInfo(InputsDataMap &inputs) const noexcept override; std::shared_ptr getFunction() noexcept override { return nullptr; } diff --git a/inference-engine/tests/ngraph_helpers/lpt_ngraph_functions/src/reshape_fully_connected_function.cpp b/inference-engine/tests/ngraph_helpers/lpt_ngraph_functions/src/reshape_fully_connected_function.cpp index 72424d4cbee..d06f1d05496 100644 --- a/inference-engine/tests/ngraph_helpers/lpt_ngraph_functions/src/reshape_fully_connected_function.cpp +++ b/inference-engine/tests/ngraph_helpers/lpt_ngraph_functions/src/reshape_fully_connected_function.cpp @@ -11,7 +11,6 @@ #include #include -#include #include "ngraph_functions/subgraph_builders.hpp" #include "lpt_ngraph_functions/common/builders.hpp" #include "low_precision/network_helper.hpp" diff --git a/inference-engine/tests_deprecated/functional/CMakeLists.txt b/inference-engine/tests_deprecated/functional/CMakeLists.txt index d6bf3a0d281..e5da58a7236 100644 --- a/inference-engine/tests_deprecated/functional/CMakeLists.txt +++ b/inference-engine/tests_deprecated/functional/CMakeLists.txt @@ -10,14 +10,6 @@ if (ENABLE_MYRIAD) add_subdirectory(vpu) endif() -if (ENABLE_CLDNN) - add_subdirectory(cldnn) -endif() - if (ENABLE_GNA) add_subdirectory(gna) endif() - -if (ENABLE_MKL_DNN) - add_subdirectory(mkldnn) -endif() diff --git a/inference-engine/tests_deprecated/functional/cldnn/CMakeLists.txt b/inference-engine/tests_deprecated/functional/cldnn/CMakeLists.txt deleted file mode 100644 index 6c834d0723e..00000000000 --- a/inference-engine/tests_deprecated/functional/cldnn/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright (C) 2018-2021 Intel Corporation -# SPDX-License-Identifier: Apache-2.0 -# - -add_executable(ClDnnFunctionalTests dummy.cpp) - -target_link_libraries(ClDnnFunctionalTests PRIVATE gtest_main) diff --git a/inference-engine/tests_deprecated/functional/cldnn/dummy.cpp b/inference-engine/tests_deprecated/functional/cldnn/dummy.cpp deleted file mode 100644 index 936eaeb8151..00000000000 --- a/inference-engine/tests_deprecated/functional/cldnn/dummy.cpp +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (C) 2018-2021 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - diff --git a/inference-engine/tests_deprecated/functional/mkldnn/CMakeLists.txt b/inference-engine/tests_deprecated/functional/mkldnn/CMakeLists.txt deleted file mode 100644 index 9ef991ffee3..00000000000 --- a/inference-engine/tests_deprecated/functional/mkldnn/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright (C) 2018-2021 Intel Corporation -# SPDX-License-Identifier: Apache-2.0 -# - -add_executable(MklDnnFunctionalTests dummy.cpp) - -target_link_libraries(MklDnnFunctionalTests PRIVATE gtest_main) diff --git a/inference-engine/tests_deprecated/functional/mkldnn/dummy.cpp b/inference-engine/tests_deprecated/functional/mkldnn/dummy.cpp deleted file mode 100644 index ace1c25a6d1..00000000000 --- a/inference-engine/tests_deprecated/functional/mkldnn/dummy.cpp +++ /dev/null @@ -1,3 +0,0 @@ -// Copyright (C) 2021 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// diff --git a/inference-engine/tests_deprecated/functional/shared_tests/common_single_layer_tests/single_layer_tests.hpp b/inference-engine/tests_deprecated/functional/shared_tests/common_single_layer_tests/single_layer_tests.hpp index 6cc9b0abc6c..f76f4f498c7 100644 --- a/inference-engine/tests_deprecated/functional/shared_tests/common_single_layer_tests/single_layer_tests.hpp +++ b/inference-engine/tests_deprecated/functional/shared_tests/common_single_layer_tests/single_layer_tests.hpp @@ -10,6 +10,7 @@ #include #include #include +#include "single_layer_common.hpp" #include "conv_ref.hpp" #include "deconv_ref.hpp"