From 26bfa6f0acddc18f7d666de671c8b7a504fc4dad Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Wed, 26 May 2021 18:07:08 +0300 Subject: [PATCH] Tests for dynamic preprocessing in SetBlob (#5798) * Corrected tests to match CVS-53713 * Fixed tests configs * Skip tests on GPU * Commented condition inside main SetBlob because of MYRIAD * Adopted tests --- .../tests/functional/CMakeLists.txt | 2 +- .../tests/functional/core_config.cpp | 3 +- .../behavior/caching_tests.cpp | 23 ++- .../behavior/config.cpp | 39 ++-- .../behavior/core_integration.cpp | 122 ++++++++---- .../behavior/cpp_holders.cpp | 28 ++- .../behavior/exec_graph_info.cpp | 19 +- .../behavior/infer_request.cpp | 19 +- .../behavior/infer_request_callback.cpp | 21 +- .../behavior/infer_request_config.cpp | 19 +- .../behavior/infer_request_input.cpp | 19 +- .../behavior/infer_request_output.cpp | 19 +- .../behavior/layout.cpp | 27 ++- .../behavior/preprocessing.cpp | 33 ++-- .../behavior/set_preprocess.cpp | 77 ++++++-- .../behavior/test_plugin.cpp | 27 ++- .../behavior/version.cpp | 10 +- .../hetero/query_network.cpp | 8 +- .../hetero/synthetic.cpp | 13 +- .../single_layer_tests/convolution.cpp | 141 ++++++++----- .../single_layer_tests/reshape.cpp | 43 ++-- .../single_layer_tests/softmax.cpp | 51 +++-- .../single_layer_tests/split.cpp | 19 +- .../tests/functional/skip_tests_config.cpp | 7 +- .../transformations/preprocessing.cpp | 2 + .../template_transformations_test.cpp | 20 +- .../interface/ie_iinfer_request_internal.cpp | 7 + .../behavior/set_preprocess.cpp | 56 ++++++ .../skip_tests_config.cpp | 2 + .../behavior/set_preprocess.cpp | 14 ++ .../skip_tests_config.cpp | 1 + .../behavior/set_preprocess.cpp | 15 ++ .../include/behavior/set_preprocess.hpp | 185 ++++++++++++++++-- 33 files changed, 808 insertions(+), 283 deletions(-) diff --git a/docs/template_plugin/tests/functional/CMakeLists.txt b/docs/template_plugin/tests/functional/CMakeLists.txt index 96ab3fdcbe4..a2962cea0ae 100644 --- a/docs/template_plugin/tests/functional/CMakeLists.txt +++ b/docs/template_plugin/tests/functional/CMakeLists.txt @@ -14,7 +14,7 @@ addIeTargetTest( IE::funcSharedTests INCLUDES "${IE_MAIN_TEMPLATE_PLUGIN_SOURCE_DIR}/include" - ADD_CLANG_FORMAT + ADD_CPPLINT LABELS TEMPLATE ) diff --git a/docs/template_plugin/tests/functional/core_config.cpp b/docs/template_plugin/tests/functional/core_config.cpp index 6c70d61d35a..e75091f571f 100644 --- a/docs/template_plugin/tests/functional/core_config.cpp +++ b/docs/template_plugin/tests/functional/core_config.cpp @@ -4,4 +4,5 @@ #include "functional_test_utils/core_config.hpp" -void CoreConfiguration(LayerTestsUtils::LayerTestsCommon* test) {} +void CoreConfiguration(LayerTestsUtils::LayerTestsCommon* test) { +} diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/caching_tests.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/caching_tests.cpp index 547c073ddbc..f61e4c54d7e 100644 --- a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/caching_tests.cpp +++ b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/caching_tests.cpp @@ -7,14 +7,19 @@ using namespace LayerTestsDefinitions; namespace { -static const std::vector precisionsTemplate = { - ngraph::element::f32, -}; + static const std::vector precisionsTemplate = { + ngraph::element::f32, + }; -static const std::vector batchSizesTemplate = {1, 2}; + static const std::vector batchSizesTemplate = { + 1, 2 + }; -INSTANTIATE_TEST_CASE_P(smoke_CachingSupportCase_Template, LoadNetworkCacheTestBase, - ::testing::Combine(::testing::ValuesIn(LoadNetworkCacheTestBase::getStandardFunctions()), ::testing::ValuesIn(precisionsTemplate), - ::testing::ValuesIn(batchSizesTemplate), ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)), - LoadNetworkCacheTestBase::getTestCaseName); -} // namespace + INSTANTIATE_TEST_CASE_P(smoke_CachingSupportCase_Template, LoadNetworkCacheTestBase, + ::testing::Combine( + ::testing::ValuesIn(LoadNetworkCacheTestBase::getStandardFunctions()), + ::testing::ValuesIn(precisionsTemplate), + ::testing::ValuesIn(batchSizesTemplate), + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)), + LoadNetworkCacheTestBase::getTestCaseName); +} // namespace diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/config.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/config.cpp index 3a832a5dd04..e10f8d64c68 100644 --- a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/config.cpp +++ b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/config.cpp @@ -2,17 +2,19 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "behavior/config.hpp" - -#include