From 34de4640275616b4a76275229b377193f188eed9 Mon Sep 17 00:00:00 2001 From: Anton Zaytsev Date: Tue, 23 Jun 2020 21:43:13 +0300 Subject: [PATCH] [IE TESTS] move BehaviorTestPlugin to the new IE tests infra & small refactoring for Behavior tests (#784) * [ci-skip][IE TESTS] move beh_test_plugin * [ci-skip][IE TESTS] move BehaviorHolderTest * [ci-skip][IE TESTS] fix GNA layout test * [ci-skip][IE TESTS] fix cmake * [ci-skip][IE TESTS] fix lib in IEBehaviorTest * [ci-skip][IE TESTS] separate layout and cpp_wrapers test and fix namespace * [ci-skip][IE TESTS] fix holders test * [ci-skip][IE TESTS] fix namespace * [ci-skip][IE TESTS] fix codestyle * [ci-skip][IE TESTS] fix test_plugin * [ci-skip][IE TESTS] fix test_plugin v2 * [ci-skip][IE TESTS] disabled gpu instance for test_plugin * [ci-skip][IE TESTS] fix --- docs/template_plugin/CMakeLists.txt | 3 - .../behavior/config.cpp | 2 +- .../behavior/cpp_holders.cpp | 27 + .../behavior/exec_graph_info.cpp | 1 + .../behavior/infer_request.cpp | 2 + .../behavior/infer_request_callback.cpp | 1 + .../behavior/infer_request_config.cpp | 1 + .../behavior/infer_request_input.cpp | 1 + .../behavior/infer_request_output.cpp | 2 +- .../behavior/layout.cpp | 36 + .../behavior/set_preprocess.cpp | 1 + .../behavior/test_plugin.cpp | 39 + .../behavior/version.cpp | 20 + .../tests_deprecated/behavior/CMakeLists.txt | 33 - .../cpp_wrappers/holders_tests.cpp | 19 - .../behavior_test_plugin_layers.cpp | 93 -- .../behavior_test_plugin_layout.cpp | 36 - .../behavior_test_plugin_unsupported.cpp | 14 - .../behavior_test_plugin_version.cpp | 8 - .../plugin_tests/behavior_test_plugin_x.cpp | 12 - .../plugin_tests/template_test_data.hpp | 71 -- .../skip_tests_config.cpp | 13 - .../inference_engine/task_executor_tests.cpp | 4 +- .../behavior/config.cpp | 2 + .../behavior/cpp_holders.cpp | 27 + .../behavior/exec_graph_info.cpp | 1 + .../behavior/infer_request.cpp | 3 +- .../behavior/infer_request_callback.cpp | 1 + .../behavior/infer_request_config.cpp | 1 + .../behavior/infer_request_input.cpp | 2 +- .../behavior/infer_request_output.cpp | 2 +- .../behavior/layout.cpp | 36 + .../behavior/perf_counters.cpp | 32 + .../behavior/set_preprocess.cpp | 1 + .../behavior/test_plugin.cpp | 84 ++ .../behavior/version.cpp | 45 + .../single_layer_tests/activation.cpp | 2 +- .../behavior/config.cpp | 3 +- .../behavior/cpp_holders.cpp | 27 + .../behavior/exec_graph_info.cpp | 2 + .../behavior/infer_request.cpp | 3 +- .../behavior/infer_request_callback.cpp | 1 + .../behavior/infer_request_config.cpp | 1 + .../behavior/infer_request_input.cpp | 2 +- .../behavior/infer_request_output.cpp | 2 +- .../behavior/layout.cpp | 34 + .../behavior/test_plugin.cpp | 40 + .../behavior/version.cpp | 33 + .../behavior/config.cpp | 1 + .../behavior/cpp_holders.cpp | 27 + .../behavior/exec_graph_info.cpp | 1 + .../behavior/infer_request.cpp | 1 + .../behavior/infer_request_callback.cpp | 1 + .../behavior/infer_request_config.cpp | 2 +- .../behavior/infer_request_input.cpp | 1 + .../behavior/infer_request_output.cpp | 1 + .../behavior/layout.cpp | 32 + .../behavior/perf_counters.cpp | 32 + .../behavior/set_preprocess.cpp | 1 + .../behavior/test_plugin.cpp | 85 ++ .../behavior/version.cpp | 45 + .../skip_tests_config.cpp | 2 + .../behavior/config.cpp | 2 +- .../behavior/cpp_holders.cpp | 27 + .../behavior/exec_graph_info.cpp | 1 + .../behavior/infer_request.cpp | 2 + .../behavior/infer_request_callback.cpp | 1 + .../behavior/infer_request_config.cpp | 1 + .../behavior/infer_request_input.cpp | 1 + .../behavior/infer_request_output.cpp | 1 + .../behavior/layout.cpp | 36 + .../behavior/set_preprocess.cpp | 1 + .../behavior/test_plugin.cpp | 76 ++ .../behavior/version.cpp | 45 + .../plugin/shared/include/behavior/config.hpp | 250 ++--- .../shared/include/behavior/cpp_holders.hpp | 43 + .../include/behavior/exec_graph_info.hpp | 4 +- .../shared/include/behavior/infer_request.hpp | 4 +- .../behavior/infer_request_callback.hpp | 4 +- .../include/behavior/infer_request_config.hpp | 4 +- .../include/behavior/infer_request_input.hpp | 4 +- .../include/behavior/infer_request_output.hpp | 4 +- .../plugin/shared/include/behavior/layout.hpp | 54 + .../shared/include/behavior/perf_counters.hpp | 39 + .../include/behavior/set_preprocess.hpp | 2 + .../shared/include/behavior/test_plugin.hpp | 160 +++ .../shared/include/behavior/version.hpp | 35 + .../shared/src/behavior/cpp_holders.cpp | 74 ++ .../plugin/shared/src/behavior/layout.cpp | 93 ++ .../ngraph_functions/subgraph_builders.hpp | 5 +- .../tests_deprecated/behavior/CMakeLists.txt | 2 +- .../tests_deprecated/behavior/cldnn/dummy.cpp | 3 + .../cpp_wrappers/holders_tests.cpp | 17 - .../plugin_tests/behavior_test_plugin.cpp | 14 - .../behavior_test_plugin_layers.cpp | 16 - .../behavior_test_plugin_layout.cpp | 21 - .../behavior_test_plugin_perf_counters.cpp | 14 - .../behavior_test_plugin_unsupported.cpp | 12 - .../behavior_test_plugin_version.cpp | 8 - .../plugin_tests/cldnn_test_data.hpp | 146 --- .../skip_tests_config.cpp | 13 - .../tests_deprecated/behavior/gna/dummy.cpp | 3 + .../cpp_wrappers/holders_tests.cpp | 17 - .../plugin_tests/behavior_test_plugin.cpp | 14 - .../behavior_test_plugin_layers.cpp | 35 - .../behavior_test_plugin_layout.cpp | 15 - .../behavior_test_plugin_unsupported.cpp | 14 - .../behavior_test_plugin_version.cpp | 8 - .../plugin_tests/gna_test_data.cpp | 305 ------ .../plugin_tests/gna_test_data.hpp | 99 -- .../skip_tests_config.cpp | 36 - .../behavior/mkldnn/CMakeLists.txt | 2 +- .../behavior/mkldnn/dummy.cpp | 3 + .../cpp_wrappers/holders_tests.cpp | 17 - .../plugin_tests/behavior_test_plugin.cpp | 14 - .../behavior_test_plugin_layers.cpp | 33 - .../behavior_test_plugin_layout.cpp | 29 - .../behavior_test_plugin_unsupported.cpp | 12 - .../behavior_test_plugin_version.cpp | 8 - .../plugin_tests/mkldnn_test_data.hpp | 146 --- .../skip_tests_config.cpp | 13 - .../behavior/shared_tests/CMakeLists.txt | 5 +- .../cpp_wrappers/holders_tests.hpp | 80 -- .../plugin_tests/behavior_test_plugin.cpp | 3 + .../plugin_tests/behavior_test_plugin.h | 126 +-- ...vior_test_plugin_infer_request_fixture.cpp | 105 -- .../behavior_test_plugin_layers.hpp | 931 ------------------ .../behavior_test_plugin_layout.hpp | 271 ----- .../behavior_test_plugin_perf_counters.hpp | 42 - .../behavior_test_plugin_unsupported.hpp | 42 - .../behavior_test_plugin_version.hpp | 43 - .../plugin_tests/behavior_test_plugins.hpp | 217 ---- .../vpu/myriad_tests/vpu_boot_tests.cpp | 2 +- .../cpp_wrappers/holders_tests.cpp | 17 - .../plugin_tests/behavior_test_plugin.cpp | 14 - .../behavior_test_plugin_layers.cpp | 25 - .../behavior_test_plugin_layout.cpp | 29 - .../behavior_test_plugin_unsupported.cpp | 14 - .../behavior_test_plugin_version.cpp | 8 - .../plugin_tests/vpu_test_data.hpp | 2 +- .../skip_tests_config.cpp | 13 - .../transformations/common/validation.cpp | 3 +- .../layers/myriad_layers_pool_nd_test.cpp | 8 +- .../myriad_layers_psroipooling_test.hpp | 2 +- .../unit/engines/gna/gna_graph_aot_test.cpp | 2 +- 145 files changed, 1607 insertions(+), 3517 deletions(-) create mode 100644 docs/template_plugin/tests/functional/shared_tests_instances/behavior/cpp_holders.cpp create mode 100644 docs/template_plugin/tests/functional/shared_tests_instances/behavior/layout.cpp create mode 100644 docs/template_plugin/tests/functional/shared_tests_instances/behavior/test_plugin.cpp create mode 100644 docs/template_plugin/tests/functional/shared_tests_instances/behavior/version.cpp delete mode 100644 docs/template_plugin/tests_deprecated/behavior/CMakeLists.txt delete mode 100644 docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/cpp_wrappers/holders_tests.cpp delete mode 100644 docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/plugin_tests/behavior_test_plugin_layers.cpp delete mode 100644 docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/plugin_tests/behavior_test_plugin_layout.cpp delete mode 100644 docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/plugin_tests/behavior_test_plugin_unsupported.cpp delete mode 100644 docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/plugin_tests/behavior_test_plugin_version.cpp delete mode 100644 docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/plugin_tests/behavior_test_plugin_x.cpp delete mode 100644 docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/plugin_tests/template_test_data.hpp delete mode 100644 docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/skip_tests_config.cpp create mode 100644 inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/cpp_holders.cpp create mode 100644 inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/layout.cpp create mode 100644 inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/perf_counters.cpp create mode 100644 inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/test_plugin.cpp create mode 100644 inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/version.cpp create mode 100644 inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/cpp_holders.cpp create mode 100644 inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/layout.cpp create mode 100644 inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/test_plugin.cpp create mode 100644 inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/version.cpp create mode 100644 inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/cpp_holders.cpp create mode 100644 inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/layout.cpp create mode 100644 inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/perf_counters.cpp create mode 100644 inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/test_plugin.cpp create mode 100644 inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/version.cpp create mode 100644 inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/cpp_holders.cpp create mode 100644 inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/layout.cpp create mode 100644 inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/test_plugin.cpp create mode 100644 inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/version.cpp create mode 100644 inference-engine/tests/functional/plugin/shared/include/behavior/cpp_holders.hpp create mode 100644 inference-engine/tests/functional/plugin/shared/include/behavior/layout.hpp create mode 100644 inference-engine/tests/functional/plugin/shared/include/behavior/perf_counters.hpp create mode 100644 inference-engine/tests/functional/plugin/shared/include/behavior/test_plugin.hpp create mode 100644 inference-engine/tests/functional/plugin/shared/include/behavior/version.hpp create mode 100644 inference-engine/tests/functional/plugin/shared/src/behavior/cpp_holders.cpp create mode 100644 inference-engine/tests/functional/plugin/shared/src/behavior/layout.cpp create mode 100644 inference-engine/tests_deprecated/behavior/cldnn/dummy.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/cpp_wrappers/holders_tests.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/plugin_tests/behavior_test_plugin.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_layers.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_layout.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_perf_counters.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_unsupported.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_version.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/plugin_tests/cldnn_test_data.hpp delete mode 100644 inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/skip_tests_config.cpp create mode 100644 inference-engine/tests_deprecated/behavior/gna/dummy.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/cpp_wrappers/holders_tests.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/plugin_tests/behavior_test_plugin.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/plugin_tests/behavior_test_plugin_layers.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/plugin_tests/behavior_test_plugin_layout.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/plugin_tests/behavior_test_plugin_unsupported.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/plugin_tests/behavior_test_plugin_version.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/plugin_tests/gna_test_data.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/plugin_tests/gna_test_data.hpp delete mode 100644 inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/skip_tests_config.cpp create mode 100644 inference-engine/tests_deprecated/behavior/mkldnn/dummy.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/mkldnn/shared_tests_instances/cpp_wrappers/holders_tests.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/mkldnn/shared_tests_instances/plugin_tests/behavior_test_plugin.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/mkldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_layers.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/mkldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_layout.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/mkldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_unsupported.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/mkldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_version.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/mkldnn/shared_tests_instances/plugin_tests/mkldnn_test_data.hpp delete mode 100644 inference-engine/tests_deprecated/behavior/mkldnn/shared_tests_instances/skip_tests_config.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/shared_tests/cpp_wrappers/holders_tests.hpp create mode 100644 inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin_infer_request_fixture.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin_layers.hpp delete mode 100644 inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin_layout.hpp delete mode 100644 inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin_perf_counters.hpp delete mode 100644 inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin_unsupported.hpp delete mode 100644 inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin_version.hpp delete mode 100644 inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugins.hpp delete mode 100644 inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/cpp_wrappers/holders_tests.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/plugin_tests/behavior_test_plugin.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/plugin_tests/behavior_test_plugin_layers.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/plugin_tests/behavior_test_plugin_layout.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/plugin_tests/behavior_test_plugin_unsupported.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/plugin_tests/behavior_test_plugin_version.cpp delete mode 100644 inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/skip_tests_config.cpp diff --git a/docs/template_plugin/CMakeLists.txt b/docs/template_plugin/CMakeLists.txt index e1f8da38624..2f960b639f9 100644 --- a/docs/template_plugin/CMakeLists.txt +++ b/docs/template_plugin/CMakeLists.txt @@ -27,9 +27,6 @@ if(ENABLE_TESTS) add_subdirectory(tests/functional) endif() - if(ENABLE_BEH_TESTS) - add_subdirectory(tests_deprecated/behavior) - endif() endif() # [cmake:main] 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 96b58cdd54d..2dbe896cc15 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 @@ -6,8 +6,8 @@ #include "behavior/config.hpp" +using namespace BehaviorTestsDefinitions; namespace { - const std::vector netPrecisions = { InferenceEngine::Precision::FP32, InferenceEngine::Precision::FP16 diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/cpp_holders.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/cpp_holders.cpp new file mode 100644 index 00000000000..e575e4e9764 --- /dev/null +++ b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/cpp_holders.cpp @@ -0,0 +1,27 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "behavior/cpp_holders.hpp" + +using namespace BehaviorTestsDefinitions; +namespace { + const std::vector> orders = { + // 0 - plugin + // 1 - executable_network + // 2 - infer_request + {0, 1, 2}, + {0, 2, 1}, + {1, 0, 2}, + {1, 2, 0}, + {2, 0, 1}, + {2, 1, 0} + }; + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, HoldersTest, + ::testing::Combine( + ::testing::Values("TEMPLATE"), + ::testing::ValuesIn(orders)), + HoldersTest::getTestCaseName); + +} // namespace \ No newline at end of file diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/exec_graph_info.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/exec_graph_info.cpp index 4859bb2a1ef..aaa279b476b 100644 --- a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/exec_graph_info.cpp +++ b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/exec_graph_info.cpp @@ -6,6 +6,7 @@ #include "behavior/exec_graph_info.hpp" +using namespace BehaviorTestsDefinitions; namespace { const std::vector netPrecisions = { InferenceEngine::Precision::FP32, diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request.cpp index cfb38e09778..ff858ac4ae9 100644 --- a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request.cpp +++ b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request.cpp @@ -5,6 +5,8 @@ #include #include "behavior/infer_request.hpp" + +using namespace BehaviorTestsDefinitions; namespace { const std::vector netPrecisions = { InferenceEngine::Precision::FP32, diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_callback.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_callback.cpp index 6cfa8033026..48f9e096f4f 100644 --- a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_callback.cpp +++ b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_callback.cpp @@ -6,6 +6,7 @@ #include "behavior/infer_request_callback.hpp" +using namespace BehaviorTestsDefinitions; namespace { const std::vector netPrecisions = { InferenceEngine::Precision::FP32, diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_config.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_config.cpp index 2daf91daca7..b0054fcdb55 100644 --- a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_config.cpp +++ b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_config.cpp @@ -6,6 +6,7 @@ #include "behavior/infer_request_config.hpp" +using namespace BehaviorTestsDefinitions; namespace { const std::vector netPrecisions = { InferenceEngine::Precision::FP32, diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_input.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_input.cpp index 09d88af9c39..371f01a3b2f 100644 --- a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_input.cpp +++ b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_input.cpp @@ -6,6 +6,7 @@ #include "behavior/infer_request_input.hpp" +using namespace BehaviorTestsDefinitions; namespace { const std::vector netPrecisions = { diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_output.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_output.cpp index 9c639531cf2..ceb069e71cc 100644 --- a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_output.cpp +++ b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_output.cpp @@ -6,8 +6,8 @@ #include "behavior/infer_request_output.hpp" +using namespace BehaviorTestsDefinitions; namespace { - const std::vector netPrecisions = { InferenceEngine::Precision::FP32, InferenceEngine::Precision::FP16 diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/layout.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/layout.cpp new file mode 100644 index 00000000000..4a80067b510 --- /dev/null +++ b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/layout.cpp @@ -0,0 +1,36 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "behavior/layout.hpp" + +using namespace BehaviorTestsDefinitions; +namespace { + const std::vector> configs = { + {} + }; + + const std::vector Layout = { + InferenceEngine::Layout::NCHW, + InferenceEngine::Layout::CHW, + InferenceEngine::Layout::NC, + InferenceEngine::Layout::C + }; + + const std::vector> inputShapes = { + { 1, 3, 16, 16 }, + { 3, 32, 16 }, + { 1, 3 }, + { 3 } + }; + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, LayoutTest, + ::testing::Combine( + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values("TEMPLATE"), + ::testing::ValuesIn(configs), + ::testing::ValuesIn(Layout), + ::testing::ValuesIn(inputShapes)), + LayoutTest::getTestCaseName); + +} // namespace \ No newline at end of file diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/set_preprocess.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/set_preprocess.cpp index 2c0082daace..6353f625364 100644 --- a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/set_preprocess.cpp +++ b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/set_preprocess.cpp @@ -6,6 +6,7 @@ #include "behavior/set_preprocess.hpp" +using namespace BehaviorTestsDefinitions; namespace { const std::vector netPrecisions = { InferenceEngine::Precision::FP32, diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/test_plugin.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/test_plugin.cpp new file mode 100644 index 00000000000..c3d9745521d --- /dev/null +++ b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/test_plugin.cpp @@ -0,0 +1,39 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "behavior/test_plugin.hpp" + +using namespace BehaviorTestsDefinitions; +namespace { + const std::vector netPrecisions = { + InferenceEngine::Precision::FP32, + InferenceEngine::Precision::FP16 + }; + + const std::vector> configs = { + {} + }; + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, BehaviorTests, + ::testing::Combine( + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values("TEMPLATE"), + ::testing::ValuesIn(configs)), + BehaviorTests::getTestCaseName); + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, BehaviorTestInput, + ::testing::Combine( + ::testing::ValuesIn(netPrecisions), + ::testing::Values("TEMPLATE"), + ::testing::ValuesIn(configs)), + BehaviorTestInput::getTestCaseName); + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, BehaviorTestOutput, + ::testing::Combine( + ::testing::ValuesIn(netPrecisions), + ::testing::Values("TEMPLATE"), + ::testing::ValuesIn(configs)), + BehaviorTestOutput::getTestCaseName); + +} // namespace diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/version.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/version.cpp new file mode 100644 index 00000000000..315700cb8b3 --- /dev/null +++ b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/version.cpp @@ -0,0 +1,20 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "behavior/version.hpp" + +using namespace BehaviorTestsDefinitions; +namespace { + const std::vector> configs = { + {} + }; + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, VersionTest, + ::testing::Combine( + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values("TEMPLATE"), + ::testing::ValuesIn(configs)), + VersionTest::getTestCaseName); + +} // namespace diff --git a/docs/template_plugin/tests_deprecated/behavior/CMakeLists.txt b/docs/template_plugin/tests_deprecated/behavior/CMakeLists.txt deleted file mode 100644 index 81089650fa9..00000000000 --- a/docs/template_plugin/tests_deprecated/behavior/CMakeLists.txt +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (C) 2020 Intel Corporation -# SPDX-License-Identifier: Apache-2.0 -# - -disable_deprecated_warnings() - -set(TARGET_NAME TemplateBehaviorTests) - -file(GLOB_RECURSE TEST_INCLUDE - ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp) - -file(GLOB_RECURSE TEST_SRC - ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp - ) - -list(APPEND DEPENDENCIES - templatePlugin) - -source_group("src" FILES ${TEST_SRC}) -source_group("include" FILES ${TEST_INCLUDE}) - -add_executable(${TARGET_NAME} - ${TEST_SRC} - ${TEST_INCLUDE}) - -target_link_libraries(${TARGET_NAME} PRIVATE IE::IEBehaviorSharedTests) - -add_test(NAME ${TARGET_NAME} - COMMAND ${TARGET_NAME}) - -add_dependencies(${TARGET_NAME} ${DEPENDENCIES}) - -add_cpplint_target(${TARGET_NAME}_cpplint FOR_TARGETS ${TARGET_NAME}) diff --git a/docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/cpp_wrappers/holders_tests.cpp b/docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/cpp_wrappers/holders_tests.cpp deleted file mode 100644 index 766bfddb67e..00000000000 --- a/docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/cpp_wrappers/holders_tests.cpp +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (C) 2018-2019 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "holders_tests.hpp" - -#include - -INSTANTIATE_TEST_CASE_P(ReleaseOrderTests, CPP_HoldersTests, testing::Combine(testing::ValuesIn(std::vector> { - // 0 - plugin - // 1 - executable_network - // 2 - infer_request - {0, 1, 2}, - {0, 2, 1}, - {1, 0, 2}, - {1, 2, 0}, - {2, 0, 1}, - {2, 1, 0}, -}), testing::Values("TEMPLATE"))); diff --git a/docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/plugin_tests/behavior_test_plugin_layers.cpp b/docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/plugin_tests/behavior_test_plugin_layers.cpp deleted file mode 100644 index 9fa38f95094..00000000000 --- a/docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/plugin_tests/behavior_test_plugin_layers.cpp +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (C) 2018-2019 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin_layers.hpp" - - -conv_test_params deconv_test_cases[] = { - conv_test_params("TEMPLATE", conv_case), -}; - -conv_test_params conv_test_cases[] = { - conv_test_params("TEMPLATE", conv_dw_case), -}; - - -INSTANTIATE_TEST_CASE_P(BehaviorTest, DeconvolutionLayerTest, - ::testing::ValuesIn(deconv_test_cases), - getTestName); - -INSTANTIATE_TEST_CASE_P(BehaviorTest, ConvolutionLayerTest, - ::testing::ValuesIn(conv_test_cases), - getTestName); - - -pool_test_params roi_pool_test_cases[] = { - pool_test_params("TEMPLATE", "FP32", pool_case), -}; - -INSTANTIATE_TEST_CASE_P(BehaviorTest, ROIPoolingLayerTest, - ::testing::ValuesIn(roi_pool_test_cases), - getTestName); - -activ_test_params activ_test_cases[] = { - activ_test_params("TEMPLATE", "FP16", activation_case), -}; - -activ_test_params clamp_test_cases[] = { - activ_test_params("TEMPLATE", "FP16", clamp_case), -}; - -INSTANTIATE_TEST_CASE_P(BehaviorTest, ActivationLayerTest, - ::testing::ValuesIn(activ_test_cases), - getTestName); -INSTANTIATE_TEST_CASE_P(BehaviorTest, ReLULayerTest, - ::testing::Values(activ_test_params("TEMPLATE", "FP32", activation_case)), - getTestName); -INSTANTIATE_TEST_CASE_P(BehaviorTest, ClampLayerTest, - ::testing::ValuesIn(clamp_test_cases), - getTestName); - -norm_test_params norm_test_cases[] = { - norm_test_params("TEMPLATE", "FP32", norm_case), -}; - -INSTANTIATE_TEST_CASE_P(BehaviorTest, NormalizeLayerTest, - ::testing::ValuesIn(norm_test_cases), - getTestName); - -scale_test_params scale_test_cases[] = { - scale_test_params("TEMPLATE", "FP32", scale_case), -}; - -INSTANTIATE_TEST_CASE_P(BehaviorTest, ScalingLayerTest, - ::testing::ValuesIn(scale_test_cases), - getTestName); - -INSTANTIATE_TEST_CASE_P(BehaviorTest, ShapingLayerTest, - ::testing::Values(shaping_test_params("TEMPLATE", "FP32", shape_case)), - getTestName); - -INSTANTIATE_TEST_CASE_P(BehaviorTest, ElementWiseLayerTest, - ::testing::Values(element_test_params("TEMPLATE", "FP32", shape_case)), - getTestName); - -object_test_params object_test_cases[] = { - object_test_params("TEMPLATE", "FP32", object_case), -}; - -INSTANTIATE_TEST_CASE_P(BehaviorTest, ObjectDetectionLayerTest, - ::testing::ValuesIn(object_test_cases), - getTestName); - -memory_test_params memory_test_cases[] = { - memory_test_params("TEMPLATE", "FP32", memory_case), -}; - -// FIXME -// #if (defined INSTANTIATE_TESTS) -// INSTANTIATE_TEST_CASE_P(BehaviorTest, MemoryLayerTest, -// ::testing::ValuesIn(memory_test_cases), -// getTestName); -// #endif diff --git a/docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/plugin_tests/behavior_test_plugin_layout.cpp b/docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/plugin_tests/behavior_test_plugin_layout.cpp deleted file mode 100644 index 1d5fb0b3b41..00000000000 --- a/docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/plugin_tests/behavior_test_plugin_layout.cpp +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (C) 2018-2019 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin_layout.hpp" - -layout_test_params power_test_cases[] = { - layout_test_params("TEMPLATE", "FP16", Layout::NCHW, power_params({ { 1, 3, 16, 16 } }, 1, 2, 2)), -}; - -layout_test_params conv_test_cases_1[] = { - layout_test_params("TEMPLATE", "FP16", Layout::NCHW, power_params({ { 1, 3, 16, 16 } }, 1, 2, 2)), -}; - -layout_test_params power_neg_test_cases[] = { - // Graph Error Description: Error: Tensor size should not be 0. - layout_test_params("TEMPLATE", "FP16", Layout::NC, power_params({ { 1, 3 } }, 1, 2, 2)), - layout_test_params("TEMPLATE", "FP16", Layout::CHW, power_params({ { 3, 32, 16 } }, 1, 2, 2)), -}; - -layout_test_params conv_neg_test_cases[] = { - // LoadNetwork hangs if Network has 1 dims format: CVS-8508 - layout_test_params("TEMPLATE", "FP16", Layout::C, power_params({ { 3 } }, 1, 2, 2)), - layout_test_params("TEMPLATE", "FP16", Layout::NC, power_params({ { 1, 3 } }, 1, 2, 2)), - layout_test_params("TEMPLATE", "FP16", Layout::CHW, power_params({ { 3, 32, 16 } }, 1, 2, 2)), -}; - -INSTANTIATE_TEST_CASE_P(BehaviorTest, LayoutTestCanLoadPower, - ::testing::ValuesIn(power_test_cases), getTestName); -INSTANTIATE_TEST_CASE_P(BehaviorTest, LayoutTestCanLoadConv, - ::testing::ValuesIn(conv_test_cases_1), getTestName); - - INSTANTIATE_TEST_CASE_P(BehaviorTest, LayoutTestCanNotLoadPower, - ::testing::ValuesIn(power_neg_test_cases), getTestName); -INSTANTIATE_TEST_CASE_P(BehaviorTest, LayoutTestCanNotLoadConv, - ::testing::ValuesIn(conv_neg_test_cases), getTestName); diff --git a/docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/plugin_tests/behavior_test_plugin_unsupported.cpp b/docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/plugin_tests/behavior_test_plugin_unsupported.cpp deleted file mode 100644 index 3e21df9eb74..00000000000 --- a/docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/plugin_tests/behavior_test_plugin_unsupported.cpp +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (C) 2018-2019 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin_unsupported.hpp" -#include "template_test_data.hpp" - -// INSTANTIATE_TEST_CASE_P(BehaviorTest, BehaviorPluginTestAllUnsupported, ValuesIn(allUnSupportedValues), -// getTestCaseName); - -INSTANTIATE_TEST_CASE_P(BehaviorTest, BehaviorPluginTestTypeUnsupported, ValuesIn(typeUnSupportedValues), - getTestCaseName); -INSTANTIATE_TEST_CASE_P(BehaviorTest, BehaviorPluginTestBatchUnsupported, ValuesIn(batchUnSupportedValues), - getTestCaseName); diff --git a/docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/plugin_tests/behavior_test_plugin_version.cpp b/docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/plugin_tests/behavior_test_plugin_version.cpp deleted file mode 100644 index 09630bbfd4a..00000000000 --- a/docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/plugin_tests/behavior_test_plugin_version.cpp +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (C) 2018-2019 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin_version.hpp" -#include "template_test_data.hpp" - -INSTANTIATE_TEST_CASE_P(BehaviorTest, BehaviorPluginTestVersion, ValuesIn(add_element_into_array(supportedValues, BEH_HETERO)), getTestCaseName); diff --git a/docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/plugin_tests/behavior_test_plugin_x.cpp b/docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/plugin_tests/behavior_test_plugin_x.cpp deleted file mode 100644 index 2a4ea99183a..00000000000 --- a/docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/plugin_tests/behavior_test_plugin_x.cpp +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (C) 2018-2019 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin.h" -#include "behavior_test_plugins.hpp" -#include "template_test_data.hpp" - -INSTANTIATE_TEST_CASE_P(BehaviorTest, BehaviorPluginTestInput, ValuesIn(allInputSupportedValues), - getTestCaseName); -INSTANTIATE_TEST_CASE_P(BehaviorTest, BehaviorPluginTestOutput, ValuesIn(allOutputSupportedValues), - getOutputTestCaseName); diff --git a/docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/plugin_tests/template_test_data.hpp b/docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/plugin_tests/template_test_data.hpp deleted file mode 100644 index c60f3faaddd..00000000000 --- a/docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/plugin_tests/template_test_data.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (C) 2018-2019 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include - -#include "behavior_test_plugin.h" - -// correct params -#define BEH_HETERO BehTestParams("HETERO", \ - FuncTestUtils::TestModel::convReluNormPoolFcModelFP32.model_xml_str, \ - FuncTestUtils::TestModel::convReluNormPoolFcModelFP32.weights_blob, \ - Precision::FP32) - -#define BEH_TEMPLATE BehTestParams("TEMPLATE", \ - FuncTestUtils::TestModel::convReluNormPoolFcModelFP16.model_xml_str, \ - FuncTestUtils::TestModel::convReluNormPoolFcModelFP16.weights_blob, \ - Precision::FP32) - -// all parameters are unsupported - reversed -#define BEH_US_ALL_TEMPLATE BehTestParams("TEMPLATE", \ - FuncTestUtils::TestModel::convReluNormPoolFcModelQ78.model_xml_str, \ - FuncTestUtils::TestModel::convReluNormPoolFcModelQ78.weights_blob, \ - Precision::Q78) - -const BehTestParams supportedValues[] = { - BEH_TEMPLATE, -}; - -const BehTestParams requestsSupportedValues[] = { - BEH_TEMPLATE, -}; - -const BehTestParams allInputSupportedValues[] = { - BEH_TEMPLATE, - BEH_TEMPLATE.withIn(Precision::FP16), - BEH_TEMPLATE.withIn(Precision::U8), - BEH_TEMPLATE.withIn(Precision::I16), -}; - -const BehTestParams allOutputSupportedValues[] = { - BEH_TEMPLATE, - BEH_TEMPLATE.withOut(Precision::FP16), -}; - -const BehTestParams typeUnSupportedValues[] = { - BEH_TEMPLATE.withIn(Precision::Q78), - BEH_TEMPLATE.withIn(Precision::U16), - BEH_TEMPLATE.withIn(Precision::I8), - BEH_TEMPLATE.withIn(Precision::I32), -}; - -const BehTestParams batchUnSupportedValues[] = { - BEH_TEMPLATE.withBatchSize(0), -}; - -const BehTestParams allUnSupportedValues[] = { - BEH_US_ALL_TEMPLATE, -}; - -const std::vector withCorrectConfValuesNetworkOnly = { - BEH_TEMPLATE.withConfig({ { KEY_DEVICE_ID, "0" } }), -}; - -const BehTestParams withIncorrectConfValues[] = { - BEH_TEMPLATE.withConfig({ { KEY_CPU_BIND_THREAD, "ON" } }), -}; - -const std::vector withCorrectConfValues = { - BEH_TEMPLATE.withConfig({}), -}; diff --git a/docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/skip_tests_config.cpp b/docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/skip_tests_config.cpp deleted file mode 100644 index 8db78c156dc..00000000000 --- a/docs/template_plugin/tests_deprecated/behavior/shared_tests_instances/skip_tests_config.cpp +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (C) 2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include -#include - -#include "functional_test_utils/skip_tests_config.hpp" - -std::vector disabledTestPatterns() { - return { - }; -} \ No newline at end of file diff --git a/inference-engine/tests/functional/inference_engine/task_executor_tests.cpp b/inference-engine/tests/functional/inference_engine/task_executor_tests.cpp index 692cb4f5015..645a6abcde4 100644 --- a/inference-engine/tests/functional/inference_engine/task_executor_tests.cpp +++ b/inference-engine/tests/functional/inference_engine/task_executor_tests.cpp @@ -80,7 +80,7 @@ TEST_P(TaskExecutorTests, canRunMultipleTasksWithExceptionInside) { } } -// TODO: CVS-11695 +// TODO: Issue-11695 TEST_P(TaskExecutorTests, canRunMultipleTasksFromMultipleThreads) { auto taskExecutor = GetParam()(); std::atomic_int sharedVar = {0}; @@ -140,7 +140,7 @@ TEST_P(TaskExecutorTests, executorNotReleasedUntilTasksAreDone) { class ASyncTaskExecutorTests : public TaskExecutorTests {}; -// TODO: CVS-11695 +// TODO: Issue-11695 TEST_P(ASyncTaskExecutorTests, startAsyncIsNotBlockedByAnotherTask) { std::mutex mutex_block_emulation; std::condition_variable cv_block_emulation; diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/config.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/config.cpp index ed8434d4d31..8054011bc0b 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/config.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/config.cpp @@ -5,6 +5,8 @@ #include "multi-device/multi_device_config.hpp" #include "behavior/config.hpp" + +using namespace BehaviorTestsDefinitions; namespace { const std::vector netPrecisions = { InferenceEngine::Precision::FP32, diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/cpp_holders.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/cpp_holders.cpp new file mode 100644 index 00000000000..17de549f2f0 --- /dev/null +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/cpp_holders.cpp @@ -0,0 +1,27 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "behavior/cpp_holders.hpp" + +using namespace BehaviorTestsDefinitions; +namespace { + const std::vector> orders = { + // 0 - plugin + // 1 - executable_network + // 2 - infer_request + {0, 1, 2}, + {0, 2, 1}, + {1, 0, 2}, + {1, 2, 0}, + {2, 0, 1}, + {2, 1, 0} + }; + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, HoldersTest, + ::testing::Combine( + ::testing::Values(CommonTestUtils::DEVICE_CPU), + ::testing::ValuesIn(orders)), + HoldersTest::getTestCaseName); + +} // namespace \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/exec_graph_info.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/exec_graph_info.cpp index f834ffced84..e8d5ea58f93 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/exec_graph_info.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/exec_graph_info.cpp @@ -5,6 +5,7 @@ #include "multi-device/multi_device_config.hpp" #include "behavior/exec_graph_info.hpp" +using namespace BehaviorTestsDefinitions; namespace { const std::vector netPrecisions = { InferenceEngine::Precision::FP32, diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request.cpp index 83dbf91a4fa..28ac4210268 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request.cpp @@ -6,8 +6,9 @@ #include "behavior/infer_request.hpp" #include "ie_plugin_config.hpp" -namespace { +using namespace BehaviorTestsDefinitions; +namespace { const std::vector netPrecisions = { InferenceEngine::Precision::FP32, InferenceEngine::Precision::FP16 diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request_callback.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request_callback.cpp index a081f1dfbd1..d147be3aa82 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request_callback.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request_callback.cpp @@ -6,6 +6,7 @@ #include "behavior/infer_request_callback.hpp" +using namespace BehaviorTestsDefinitions; namespace { const std::vector netPrecisions = { InferenceEngine::Precision::FP32, diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request_config.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request_config.cpp index a1c88276f14..eafbb32c7d9 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request_config.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request_config.cpp @@ -6,6 +6,7 @@ #include "behavior/infer_request_config.hpp" +using namespace BehaviorTestsDefinitions; namespace { const std::vector netPrecisions = { InferenceEngine::Precision::FP32, diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request_input.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request_input.cpp index 67ed72814b6..8357803b620 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request_input.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request_input.cpp @@ -6,8 +6,8 @@ #include "behavior/infer_request_input.hpp" +using namespace BehaviorTestsDefinitions; namespace { - const std::vector netPrecisions = { InferenceEngine::Precision::FP32, InferenceEngine::Precision::FP16, diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request_output.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request_output.cpp index 32680a86e70..0197b14b358 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request_output.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request_output.cpp @@ -6,8 +6,8 @@ #include "behavior/infer_request_output.hpp" +using namespace BehaviorTestsDefinitions; namespace { - const std::vector netPrecisions = { InferenceEngine::Precision::FP32 }; diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/layout.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/layout.cpp new file mode 100644 index 00000000000..d7df4a38738 --- /dev/null +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/layout.cpp @@ -0,0 +1,36 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "behavior/layout.hpp" + +using namespace BehaviorTestsDefinitions; +namespace { + const std::vector> configs = { + {} + }; + + const std::vector Layout = { + InferenceEngine::Layout::NCHW, + InferenceEngine::Layout::CHW, + InferenceEngine::Layout::NC, + InferenceEngine::Layout::C + }; + + const std::vector> inputShapes = { + { 1, 3, 16, 16 }, + { 3, 32, 16 }, + { 1, 3 }, + { 3 } + }; + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, LayoutTest, + ::testing::Combine( + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values(CommonTestUtils::DEVICE_CPU), + ::testing::ValuesIn(configs), + ::testing::ValuesIn(Layout), + ::testing::ValuesIn(inputShapes)), + LayoutTest::getTestCaseName); + +} // namespace \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/perf_counters.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/perf_counters.cpp new file mode 100644 index 00000000000..79acae75929 --- /dev/null +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/perf_counters.cpp @@ -0,0 +1,32 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "multi-device/multi_device_config.hpp" +#include "behavior/perf_counters.hpp" + +using namespace BehaviorTestsDefinitions; +namespace { + const std::vector> configs = { + {} + }; + + const std::vector> Multiconfigs = { + {{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_CPU}} + }; + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, PerfCountersTest, + ::testing::Combine( + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values(CommonTestUtils::DEVICE_CPU), + ::testing::ValuesIn(configs)), + PerfCountersTest::getTestCaseName); + + INSTANTIATE_TEST_CASE_P(smoke_Multi_BehaviorTests, PerfCountersTest, + ::testing::Combine( + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values(CommonTestUtils::DEVICE_MULTI), + ::testing::ValuesIn(Multiconfigs)), + PerfCountersTest::getTestCaseName); + +} // namespace diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/set_preprocess.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/set_preprocess.cpp index 05a5c899dde..14b59c4ef72 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/set_preprocess.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/set_preprocess.cpp @@ -7,6 +7,7 @@ #include "behavior/set_preprocess.hpp" +using namespace BehaviorTestsDefinitions; namespace { const std::vector netPrecisions = { InferenceEngine::Precision::FP32, diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/test_plugin.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/test_plugin.cpp new file mode 100644 index 00000000000..6c955e3c0f1 --- /dev/null +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/test_plugin.cpp @@ -0,0 +1,84 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "multi-device/multi_device_config.hpp" + +#include "behavior/test_plugin.hpp" + +using namespace BehaviorTestsDefinitions; +namespace { + const std::vector netPrecisions = { + InferenceEngine::Precision::FP32, + InferenceEngine::Precision::U8, + InferenceEngine::Precision::I16, + InferenceEngine::Precision::U16 + }; + + const std::vector> configs = { + {} + }; + + const std::vector> MultiConfigs = { + {{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_CPU}} + }; + + const std::vector> configsInput = { + {}, + {{InferenceEngine::PluginConfigParams::KEY_CPU_THROUGHPUT_STREAMS, InferenceEngine::PluginConfigParams::CPU_THROUGHPUT_AUTO}} + }; + + const std::vector> MultiConfigsInputOutput = { + {{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_CPU}}, + {{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_CPU}, + {InferenceEngine::PluginConfigParams::KEY_CPU_THROUGHPUT_STREAMS, InferenceEngine::PluginConfigParams::CPU_THROUGHPUT_AUTO}} + }; + + const std::vector> configsOutput = { + {}, + {{InferenceEngine::PluginConfigParams::KEY_CPU_THROUGHPUT_STREAMS, InferenceEngine::PluginConfigParams::CPU_THROUGHPUT_AUTO}} + }; + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, BehaviorTestOutput, + ::testing::Combine( + ::testing::ValuesIn(netPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_CPU), + ::testing::ValuesIn(configsOutput)), + BehaviorTestOutput::getTestCaseName); + + INSTANTIATE_TEST_CASE_P(smoke_Multi_BehaviorTests, BehaviorTestOutput, + ::testing::Combine( + ::testing::ValuesIn(netPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_MULTI), + ::testing::ValuesIn(MultiConfigsInputOutput)), + BehaviorTestOutput::getTestCaseName); + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, BehaviorTests, + ::testing::Combine( + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values(CommonTestUtils::DEVICE_CPU), + ::testing::ValuesIn(configs)), + BehaviorTests::getTestCaseName); + + INSTANTIATE_TEST_CASE_P(smoke_Multi_BehaviorTests, BehaviorTests, + ::testing::Combine( + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values(CommonTestUtils::DEVICE_MULTI), + ::testing::ValuesIn(MultiConfigs)), + BehaviorTests::getTestCaseName); + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, BehaviorTestInput, + ::testing::Combine( + ::testing::ValuesIn(netPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_CPU), + ::testing::ValuesIn(configsInput)), + BehaviorTestInput::getTestCaseName); + + INSTANTIATE_TEST_CASE_P(smoke_Multi_BehaviorTests, BehaviorTestInput, + ::testing::Combine( + ::testing::ValuesIn(netPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_MULTI), + ::testing::ValuesIn(MultiConfigsInputOutput)), + BehaviorTestInput::getTestCaseName); + +} // namespace diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/version.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/version.cpp new file mode 100644 index 00000000000..222ce2e359d --- /dev/null +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/version.cpp @@ -0,0 +1,45 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "multi-device/multi_device_config.hpp" +#include "hetero/hetero_plugin_config.hpp" +#include "behavior/version.hpp" + +using namespace BehaviorTestsDefinitions; +namespace { + const std::vector> configs = { + {} + }; + + const std::vector> Multiconfigs = { + {{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_CPU}} + }; + + const std::vector> Heteroconfigs = { + {{ HETERO_CONFIG_KEY(DUMP_GRAPH_DOT) , CommonTestUtils::DEVICE_CPU}} + }; + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, VersionTest, + ::testing::Combine( + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values(CommonTestUtils::DEVICE_CPU), + ::testing::ValuesIn(configs)), + VersionTest::getTestCaseName); + + INSTANTIATE_TEST_CASE_P(smoke_Multi_BehaviorTests, VersionTest, + ::testing::Combine( + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values(CommonTestUtils::DEVICE_MULTI), + ::testing::ValuesIn(Multiconfigs)), + VersionTest::getTestCaseName); + + INSTANTIATE_TEST_CASE_P(smoke_Hetero_BehaviorTests, VersionTest, + ::testing::Combine( + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values(CommonTestUtils::DEVICE_HETERO), + ::testing::ValuesIn(Heteroconfigs)), + VersionTest::getTestCaseName); + + +} // namespace diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/activation.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/activation.cpp index c92a40aaddd..567b9aec4ef 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/activation.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/activation.cpp @@ -12,7 +12,7 @@ namespace { // Common params const std::vector inputPrecisions = { InferenceEngine::Precision::FP32 - // TODO: Fix CVS-27390 + // TODO: Fix Issue-27390 // InferenceEngine::Precision::I16, // InferenceEngine::Precision::U8 }; diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/config.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/config.cpp index 35237f6e16b..f896a7b7a05 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/config.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/config.cpp @@ -2,12 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "multi-device/multi_device_config.hpp" #include "gna/gna_config.hpp" #include "behavior/config.hpp" +using namespace BehaviorTestsDefinitions; namespace { - const std::vector netPrecisions = { InferenceEngine::Precision::FP32, InferenceEngine::Precision::FP16 diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/cpp_holders.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/cpp_holders.cpp new file mode 100644 index 00000000000..2c27cccaffd --- /dev/null +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/cpp_holders.cpp @@ -0,0 +1,27 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "behavior/cpp_holders.hpp" + +using namespace BehaviorTestsDefinitions; +namespace { + const std::vector> orders = { + // 0 - plugin + // 1 - executable_network + // 2 - infer_request + {0, 1, 2}, + {0, 2, 1}, + {1, 0, 2}, + {1, 2, 0}, + {2, 0, 1}, + {2, 1, 0} + }; + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, HoldersTest, + ::testing::Combine( + ::testing::Values(CommonTestUtils::DEVICE_GNA), + ::testing::ValuesIn(orders)), + HoldersTest::getTestCaseName); + +} // namespace \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/exec_graph_info.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/exec_graph_info.cpp index 3c1655b3534..4f8ee553ffd 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/exec_graph_info.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/exec_graph_info.cpp @@ -3,6 +3,8 @@ // #include "behavior/exec_graph_info.hpp" + +using namespace BehaviorTestsDefinitions; namespace { const std::vector netPrecisions = { InferenceEngine::Precision::FP32, diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/infer_request.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/infer_request.cpp index 4438be676ff..952b093b423 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/infer_request.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/infer_request.cpp @@ -3,7 +3,8 @@ // #include "behavior/infer_request.hpp" -#include "ie_plugin_config.hpp" + +using namespace BehaviorTestsDefinitions; namespace { const std::vector netPrecisions = { InferenceEngine::Precision::FP32 diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/infer_request_callback.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/infer_request_callback.cpp index 69bf5dfaac6..ddc4616a73c 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/infer_request_callback.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/infer_request_callback.cpp @@ -6,6 +6,7 @@ #include "behavior/infer_request_callback.hpp" +using namespace BehaviorTestsDefinitions; namespace { const std::vector netPrecisions = { InferenceEngine::Precision::FP32, diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/infer_request_config.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/infer_request_config.cpp index 503c07cb3c4..85f83c8039e 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/infer_request_config.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/infer_request_config.cpp @@ -5,6 +5,7 @@ #include "gna/gna_config.hpp" #include "behavior/infer_request_config.hpp" +using namespace BehaviorTestsDefinitions; namespace { const std::vector netPrecisions = { InferenceEngine::Precision::FP32, diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/infer_request_input.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/infer_request_input.cpp index c120a91ac3e..d9912f706a8 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/infer_request_input.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/infer_request_input.cpp @@ -4,8 +4,8 @@ #include "behavior/infer_request_input.hpp" +using namespace BehaviorTestsDefinitions; namespace { - const std::vector netPrecisions = { InferenceEngine::Precision::U8, InferenceEngine::Precision::I16 diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/infer_request_output.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/infer_request_output.cpp index fefc6d4c61f..47c836c0872 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/infer_request_output.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/infer_request_output.cpp @@ -4,8 +4,8 @@ #include "behavior/infer_request_output.hpp" +using namespace BehaviorTestsDefinitions; namespace { - const std::vector netPrecisions = { InferenceEngine::Precision::FP32 }; diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/layout.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/layout.cpp new file mode 100644 index 00000000000..86675a90737 --- /dev/null +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/layout.cpp @@ -0,0 +1,34 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "behavior/layout.hpp" + +using namespace BehaviorTestsDefinitions; +namespace { + const std::vector> configs = { + {{"GNA_SCALE_FACTOR_0", "1638.4"}, {"GNA_SCALE_FACTOR_1", "1638.4"}} + }; + + const std::vector Layout = { + InferenceEngine::Layout::NCHW, + InferenceEngine::Layout::CHW, + InferenceEngine::Layout::NC + }; + + const std::vector> inputShapes = { + { 1, 3, 16, 16 }, + { 3, 32, 16 }, + { 1, 3 } + }; + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, LayoutTest, + ::testing::Combine( + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values(CommonTestUtils::DEVICE_GNA), + ::testing::ValuesIn(configs), + ::testing::ValuesIn(Layout), + ::testing::ValuesIn(inputShapes)), + LayoutTest::getTestCaseName); + +} // namespace \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/test_plugin.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/test_plugin.cpp new file mode 100644 index 00000000000..410a2d0444e --- /dev/null +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/test_plugin.cpp @@ -0,0 +1,40 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "behavior/test_plugin.hpp" + +using namespace BehaviorTestsDefinitions; +namespace { + const std::vector netPrecisions = { + InferenceEngine::Precision::FP32, + InferenceEngine::Precision::U8, + InferenceEngine::Precision::I16 + }; + + const std::vector> configs = { + {} + }; + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, BehaviorTests, + ::testing::Combine( + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values(CommonTestUtils::DEVICE_GNA), + ::testing::ValuesIn(configs)), + BehaviorTests::getTestCaseName); + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, BehaviorTestInput, + ::testing::Combine( + ::testing::ValuesIn(netPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_GNA), + ::testing::ValuesIn(configs)), + BehaviorTestInput::getTestCaseName); + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, BehaviorTestOutput, + ::testing::Combine( + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values(CommonTestUtils::DEVICE_GNA), + ::testing::ValuesIn(configs)), + BehaviorTestOutput::getTestCaseName); + +} // namespace diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/version.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/version.cpp new file mode 100644 index 00000000000..bb5c62855c9 --- /dev/null +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/version.cpp @@ -0,0 +1,33 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "hetero/hetero_plugin_config.hpp" +#include "behavior/version.hpp" + +using namespace BehaviorTestsDefinitions; +namespace { + const std::vector> configs = { + {} + }; + + const std::vector> Heteroconfigs = { + {{ HETERO_CONFIG_KEY(DUMP_GRAPH_DOT) , CommonTestUtils::DEVICE_GNA}} + }; + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, VersionTest, + ::testing::Combine( + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values(CommonTestUtils::DEVICE_GNA), + ::testing::ValuesIn(configs)), + VersionTest::getTestCaseName); + + INSTANTIATE_TEST_CASE_P(smoke_Hetero_BehaviorTests, VersionTest, + ::testing::Combine( + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values(CommonTestUtils::DEVICE_HETERO), + ::testing::ValuesIn(Heteroconfigs)), + VersionTest::getTestCaseName); + + +} // namespace diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/config.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/config.cpp index 5d826a4ecf5..0cea147b8ec 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/config.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/config.cpp @@ -6,6 +6,7 @@ #include "behavior/config.hpp" +using namespace BehaviorTestsDefinitions; namespace { const std::vector netPrecisions = { InferenceEngine::Precision::FP32, diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/cpp_holders.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/cpp_holders.cpp new file mode 100644 index 00000000000..9c97fa5d689 --- /dev/null +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/cpp_holders.cpp @@ -0,0 +1,27 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "behavior/cpp_holders.hpp" + +using namespace BehaviorTestsDefinitions; +namespace { + const std::vector> orders = { + // 0 - plugin + // 1 - executable_network + // 2 - infer_request + {0, 1, 2}, + {0, 2, 1}, + {1, 0, 2}, + {1, 2, 0}, + {2, 0, 1}, + {2, 1, 0} + }; + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, HoldersTest, + ::testing::Combine( + ::testing::Values(CommonTestUtils::DEVICE_GPU), + ::testing::ValuesIn(orders)), + HoldersTest::getTestCaseName); + +} // namespace \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/exec_graph_info.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/exec_graph_info.cpp index 7f549534d6f..6354bbe7605 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/exec_graph_info.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/exec_graph_info.cpp @@ -5,6 +5,7 @@ #include "multi-device/multi_device_config.hpp" #include "behavior/exec_graph_info.hpp" +using namespace BehaviorTestsDefinitions; namespace { const std::vector netPrecisions = { InferenceEngine::Precision::FP32, diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/infer_request.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/infer_request.cpp index 90a9088f044..918191cc7f2 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/infer_request.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/infer_request.cpp @@ -7,6 +7,7 @@ #include "behavior/infer_request.hpp" #include "ie_plugin_config.hpp" +using namespace BehaviorTestsDefinitions; namespace { const std::vector netPrecisions = { InferenceEngine::Precision::FP32, diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/infer_request_callback.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/infer_request_callback.cpp index 34d0284b09b..836eaabd5f1 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/infer_request_callback.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/infer_request_callback.cpp @@ -6,6 +6,7 @@ #include "behavior/infer_request_callback.hpp" +using namespace BehaviorTestsDefinitions; namespace { const std::vector netPrecisions = { InferenceEngine::Precision::FP32, diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/infer_request_config.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/infer_request_config.cpp index 77fd8d90083..7daa91d5f70 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/infer_request_config.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/infer_request_config.cpp @@ -6,8 +6,8 @@ #include "behavior/infer_request_config.hpp" +using namespace BehaviorTestsDefinitions; namespace { - const std::vector netPrecisions = { InferenceEngine::Precision::FP32, InferenceEngine::Precision::FP16 diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/infer_request_input.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/infer_request_input.cpp index f3f9ce08f1c..04eac211623 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/infer_request_input.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/infer_request_input.cpp @@ -6,6 +6,7 @@ #include "behavior/infer_request_input.hpp" +using namespace BehaviorTestsDefinitions; namespace { const std::vector netPrecisions = { InferenceEngine::Precision::FP16, diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/infer_request_output.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/infer_request_output.cpp index 8fcb6f8e1a6..3c2da8a0a8b 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/infer_request_output.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/infer_request_output.cpp @@ -6,6 +6,7 @@ #include "behavior/infer_request_output.hpp" +using namespace BehaviorTestsDefinitions; namespace { const std::vector netPrecisions = { InferenceEngine::Precision::FP32 diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/layout.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/layout.cpp new file mode 100644 index 00000000000..d40930354cf --- /dev/null +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/layout.cpp @@ -0,0 +1,32 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "behavior/layout.hpp" + +using namespace BehaviorTestsDefinitions; +namespace { + const std::vector> configs = { + {} + }; + + const std::vector Layout = { + InferenceEngine::Layout::NCHW, + InferenceEngine::Layout::NC, + }; + + const std::vector> inputShapes = { + { 1, 3, 16, 16 }, + { 1, 3 }, + }; + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, LayoutTest, + ::testing::Combine( + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values(CommonTestUtils::DEVICE_GPU), + ::testing::ValuesIn(configs), + ::testing::ValuesIn(Layout), + ::testing::ValuesIn(inputShapes)), + LayoutTest::getTestCaseName); + +} // namespace \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/perf_counters.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/perf_counters.cpp new file mode 100644 index 00000000000..dd7f0b3d1e2 --- /dev/null +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/perf_counters.cpp @@ -0,0 +1,32 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "multi-device/multi_device_config.hpp" +#include "behavior/perf_counters.hpp" + +using namespace BehaviorTestsDefinitions; +namespace { + const std::vector> configs = { + {} + }; + + const std::vector> Multiconfigs = { + {{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_GPU}} + }; + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, PerfCountersTest, + ::testing::Combine( + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values(CommonTestUtils::DEVICE_GPU), + ::testing::ValuesIn(configs)), + PerfCountersTest::getTestCaseName); + + INSTANTIATE_TEST_CASE_P(smoke_Multi_BehaviorTests, PerfCountersTest, + ::testing::Combine( + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values(CommonTestUtils::DEVICE_MULTI), + ::testing::ValuesIn(Multiconfigs)), + PerfCountersTest::getTestCaseName); + +} // namespace diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/set_preprocess.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/set_preprocess.cpp index 996962c30c5..97d69dbb659 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/set_preprocess.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/set_preprocess.cpp @@ -6,6 +6,7 @@ #include #include "behavior/set_preprocess.hpp" +using namespace BehaviorTestsDefinitions; namespace { using PreprocessBehTest = BehaviorTestsUtils::BehaviorTestsBasic; diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/test_plugin.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/test_plugin.cpp new file mode 100644 index 00000000000..ca63da13200 --- /dev/null +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/test_plugin.cpp @@ -0,0 +1,85 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "multi-device/multi_device_config.hpp" + +#include "behavior/test_plugin.hpp" + +using namespace BehaviorTestsDefinitions; +namespace { + const std::vector netPrecisions = { + InferenceEngine::Precision::FP32, + InferenceEngine::Precision::U8, + InferenceEngine::Precision::I16, + InferenceEngine::Precision::I32, + InferenceEngine::Precision::FP16 + }; + + const std::vector> configs = { + {} + }; + + const std::vector> MultiConfigs = { + {{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_GPU}} + }; + + const std::vector> configsInput = { + {}, + {{InferenceEngine::PluginConfigParams::KEY_GPU_THROUGHPUT_STREAMS, InferenceEngine::PluginConfigParams::GPU_THROUGHPUT_AUTO}} + }; + + const std::vector> MultiConfigsInputOutput = { + {{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_GPU}}, + {{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_GPU}, + {InferenceEngine::PluginConfigParams::KEY_GPU_THROUGHPUT_STREAMS, InferenceEngine::PluginConfigParams::GPU_THROUGHPUT_AUTO}} + }; + + const std::vector> configsOutput = { + {}, + {{InferenceEngine::PluginConfigParams::KEY_GPU_THROUGHPUT_STREAMS, InferenceEngine::PluginConfigParams::GPU_THROUGHPUT_AUTO}} + }; + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, BehaviorTestOutput, + ::testing::Combine( + ::testing::ValuesIn(netPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_GPU), + ::testing::ValuesIn(configsOutput)), + BehaviorTestOutput::getTestCaseName); + + INSTANTIATE_TEST_CASE_P(smoke_Multi_BehaviorTests, BehaviorTestOutput, + ::testing::Combine( + ::testing::ValuesIn(netPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_MULTI), + ::testing::ValuesIn(MultiConfigsInputOutput)), + BehaviorTestOutput::getTestCaseName); + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, BehaviorTests, + ::testing::Combine( + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values(CommonTestUtils::DEVICE_GPU), + ::testing::ValuesIn(configs)), + BehaviorTests::getTestCaseName); + + INSTANTIATE_TEST_CASE_P(smoke_Multi_BehaviorTests, BehaviorTests, + ::testing::Combine( + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values(CommonTestUtils::DEVICE_MULTI), + ::testing::ValuesIn(MultiConfigs)), + BehaviorTests::getTestCaseName); + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, BehaviorTestInput, + ::testing::Combine( + ::testing::ValuesIn(netPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_GPU), + ::testing::ValuesIn(configsInput)), + BehaviorTestInput::getTestCaseName); + + INSTANTIATE_TEST_CASE_P(smoke_Multi_BehaviorTests, BehaviorTestInput, + ::testing::Combine( + ::testing::ValuesIn(netPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_MULTI), + ::testing::ValuesIn(MultiConfigsInputOutput)), + BehaviorTestInput::getTestCaseName); + +} // namespace diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/version.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/version.cpp new file mode 100644 index 00000000000..c5623c33855 --- /dev/null +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/version.cpp @@ -0,0 +1,45 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "multi-device/multi_device_config.hpp" +#include "hetero/hetero_plugin_config.hpp" +#include "behavior/version.hpp" + +using namespace BehaviorTestsDefinitions; +namespace { + const std::vector> configs = { + {} + }; + + const std::vector> Multiconfigs = { + {{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_GPU}} + }; + + const std::vector> Heteroconfigs = { + {{ HETERO_CONFIG_KEY(DUMP_GRAPH_DOT) , CommonTestUtils::DEVICE_GPU}} + }; + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, VersionTest, + ::testing::Combine( + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values(CommonTestUtils::DEVICE_GPU), + ::testing::ValuesIn(configs)), + VersionTest::getTestCaseName); + + INSTANTIATE_TEST_CASE_P(smoke_Multi_BehaviorTests, VersionTest, + ::testing::Combine( + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values(CommonTestUtils::DEVICE_MULTI), + ::testing::ValuesIn(Multiconfigs)), + VersionTest::getTestCaseName); + + INSTANTIATE_TEST_CASE_P(smoke_Hetero_BehaviorTests, VersionTest, + ::testing::Combine( + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values(CommonTestUtils::DEVICE_HETERO), + ::testing::ValuesIn(Heteroconfigs)), + VersionTest::getTestCaseName); + + +} // namespace diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/skip_tests_config.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/skip_tests_config.cpp index ab4610b087b..0744cece21c 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/skip_tests_config.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/skip_tests_config.cpp @@ -12,5 +12,7 @@ std::vector disabledTestPatterns() { // cldnn treats 1d constant as [1, f, 1, 1] tensor instead of [b, 1, 1, 1] which leads to fails of these tests R"(.*(EltwiseLayerTest).*IS=\(.*\..*\..*\..*\..*\).*secondaryInputType=CONSTANT.*opType=SCALAR.*)", R"(.*(EltwiseLayerTest).*IS=\(.*\).*secondaryInputType=CONSTANT.*)", + // Issues - 34059 + ".*BehaviorTests\\.pluginDoesNotChangeOriginalNetwork.*" }; } \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/config.cpp b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/config.cpp index de90651afb6..82bba1cbce1 100644 --- a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/config.cpp +++ b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/config.cpp @@ -6,8 +6,8 @@ #include "vpu/vpu_plugin_config.hpp" #include "behavior/config.hpp" +using namespace BehaviorTestsDefinitions; namespace { - const std::vector netPrecisions = { InferenceEngine::Precision::FP32, InferenceEngine::Precision::FP16 diff --git a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/cpp_holders.cpp b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/cpp_holders.cpp new file mode 100644 index 00000000000..936d630bd5f --- /dev/null +++ b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/cpp_holders.cpp @@ -0,0 +1,27 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "behavior/cpp_holders.hpp" + +using namespace BehaviorTestsDefinitions; +namespace { + const std::vector> orders = { + // 0 - plugin + // 1 - executable_network + // 2 - infer_request + {0, 1, 2}, + {0, 2, 1}, + {1, 0, 2}, + {1, 2, 0}, + {2, 0, 1}, + {2, 1, 0} + }; + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, HoldersTest, + ::testing::Combine( + ::testing::Values(CommonTestUtils::DEVICE_MYRIAD), + ::testing::ValuesIn(orders)), + HoldersTest::getTestCaseName); + +} // namespace \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/exec_graph_info.cpp b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/exec_graph_info.cpp index b2f89bac2a8..b0d8bc4c514 100644 --- a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/exec_graph_info.cpp +++ b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/exec_graph_info.cpp @@ -4,6 +4,7 @@ #include "behavior/exec_graph_info.hpp" +using namespace BehaviorTestsDefinitions; namespace { const std::vector netPrecisions = { InferenceEngine::Precision::FP16 diff --git a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/infer_request.cpp b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/infer_request.cpp index ef44a9de56c..a3f3b6ee5d6 100644 --- a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/infer_request.cpp +++ b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/infer_request.cpp @@ -6,6 +6,8 @@ #include "behavior/infer_request.hpp" #include "ie_plugin_config.hpp" + +using namespace BehaviorTestsDefinitions; namespace { const std::vector netPrecisions = { InferenceEngine::Precision::FP16 diff --git a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/infer_request_callback.cpp b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/infer_request_callback.cpp index 7eca4ff5bb9..70fd54abadc 100644 --- a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/infer_request_callback.cpp +++ b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/infer_request_callback.cpp @@ -6,6 +6,7 @@ #include "behavior/infer_request_callback.hpp" +using namespace BehaviorTestsDefinitions; namespace { const std::vector netPrecisions = { InferenceEngine::Precision::FP16 diff --git a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/infer_request_config.cpp b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/infer_request_config.cpp index c31a35bbd84..55f4b1267ee 100644 --- a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/infer_request_config.cpp +++ b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/infer_request_config.cpp @@ -6,6 +6,7 @@ #include "vpu/vpu_plugin_config.hpp" #include "behavior/infer_request_config.hpp" +using namespace BehaviorTestsDefinitions; namespace { const std::vector netPrecisions = { InferenceEngine::Precision::FP16 diff --git a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/infer_request_input.cpp b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/infer_request_input.cpp index 5296373ab84..13f007575ae 100644 --- a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/infer_request_input.cpp +++ b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/infer_request_input.cpp @@ -6,6 +6,7 @@ #include "behavior/infer_request_input.hpp" +using namespace BehaviorTestsDefinitions; namespace { const std::vector netPrecisions = { InferenceEngine::Precision::FP16, diff --git a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/infer_request_output.cpp b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/infer_request_output.cpp index 5adc4ba991b..c61af11ce4c 100644 --- a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/infer_request_output.cpp +++ b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/infer_request_output.cpp @@ -6,6 +6,7 @@ #include "behavior/infer_request_output.hpp" +using namespace BehaviorTestsDefinitions; namespace { const std::vector netPrecisions = { InferenceEngine::Precision::FP16, diff --git a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/layout.cpp b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/layout.cpp new file mode 100644 index 00000000000..4629cceefc6 --- /dev/null +++ b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/layout.cpp @@ -0,0 +1,36 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "behavior/layout.hpp" + +using namespace BehaviorTestsDefinitions; +namespace { + const std::vector> configs = { + {} + }; + + const std::vector Layout = { + InferenceEngine::Layout::NCHW, + InferenceEngine::Layout::CHW, + InferenceEngine::Layout::NC, + InferenceEngine::Layout::C + }; + + const std::vector> inputShapes = { + { 1, 3, 16, 16 }, + { 3, 32, 16 }, + { 1, 3 }, + { 3 } + }; + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, LayoutTest, + ::testing::Combine( + ::testing::Values(InferenceEngine::Precision::FP16), + ::testing::Values(CommonTestUtils::DEVICE_MYRIAD), + ::testing::ValuesIn(configs), + ::testing::ValuesIn(Layout), + ::testing::ValuesIn(inputShapes)), + LayoutTest::getTestCaseName); + +} // namespace \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/set_preprocess.cpp b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/set_preprocess.cpp index ec1d26dc816..0193450bdea 100644 --- a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/set_preprocess.cpp +++ b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/set_preprocess.cpp @@ -6,6 +6,7 @@ #include #include "behavior/set_preprocess.hpp" +using namespace BehaviorTestsDefinitions; namespace { using PreprocessBehTest = BehaviorTestsUtils::BehaviorTestsBasic; const std::vector netPrecisions = { diff --git a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/test_plugin.cpp b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/test_plugin.cpp new file mode 100644 index 00000000000..56dbdff4def --- /dev/null +++ b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/test_plugin.cpp @@ -0,0 +1,76 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "multi-device/multi_device_config.hpp" + +#include "behavior/test_plugin.hpp" + +using namespace BehaviorTestsDefinitions; +namespace { + const std::vector netPrecisions = { + InferenceEngine::Precision::FP32, + InferenceEngine::Precision::U8, + InferenceEngine::Precision::FP16 + }; + + const std::vector> configs = { + {} + }; + + const std::vector> MultiConfigs = { + {{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_MYRIAD}} + }; + + const std::vector> MultiConfigsInputOutput = { + {{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_MYRIAD}} + }; + + const std::vector netPrecision = { + InferenceEngine::Precision::FP32, + InferenceEngine::Precision::FP16 + }; + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, BehaviorTestOutput, + ::testing::Combine( + ::testing::ValuesIn(netPrecision), + ::testing::Values(CommonTestUtils::DEVICE_MYRIAD), + ::testing::ValuesIn(configs)), + BehaviorTestOutput::getTestCaseName); + + INSTANTIATE_TEST_CASE_P(smoke_Multi_BehaviorTests, BehaviorTestOutput, + ::testing::Combine( + ::testing::ValuesIn(netPrecision), + ::testing::Values(CommonTestUtils::DEVICE_MULTI), + ::testing::ValuesIn(MultiConfigsInputOutput)), + BehaviorTestOutput::getTestCaseName); + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, BehaviorTests, + ::testing::Combine( + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values(CommonTestUtils::DEVICE_MYRIAD), + ::testing::ValuesIn(configs)), + BehaviorTests::getTestCaseName); + + INSTANTIATE_TEST_CASE_P(smoke_Multi_BehaviorTests, BehaviorTests, + ::testing::Combine( + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values(CommonTestUtils::DEVICE_MULTI), + ::testing::ValuesIn(MultiConfigs)), + BehaviorTests::getTestCaseName); + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, BehaviorTestInput, + ::testing::Combine( + ::testing::ValuesIn(netPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_MYRIAD), + ::testing::ValuesIn(configs)), + BehaviorTestInput::getTestCaseName); + + INSTANTIATE_TEST_CASE_P(smoke_Multi_BehaviorTests, BehaviorTestInput, + ::testing::Combine( + ::testing::ValuesIn(netPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_MULTI), + ::testing::ValuesIn(MultiConfigsInputOutput)), + BehaviorTestInput::getTestCaseName); + +} // namespace diff --git a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/version.cpp b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/version.cpp new file mode 100644 index 00000000000..df519f7f05a --- /dev/null +++ b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/version.cpp @@ -0,0 +1,45 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "multi-device/multi_device_config.hpp" +#include "hetero/hetero_plugin_config.hpp" +#include "behavior/version.hpp" + +using namespace BehaviorTestsDefinitions; +namespace { + const std::vector> configs = { + {} + }; + + const std::vector> Multiconfigs = { + {{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_MYRIAD}} + }; + + const std::vector> Heteroconfigs = { + {{ HETERO_CONFIG_KEY(DUMP_GRAPH_DOT) , CommonTestUtils::DEVICE_MYRIAD}} + }; + + INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, VersionTest, + ::testing::Combine( + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values(CommonTestUtils::DEVICE_MYRIAD), + ::testing::ValuesIn(configs)), + VersionTest::getTestCaseName); + + INSTANTIATE_TEST_CASE_P(smoke_Multi_BehaviorTests, VersionTest, + ::testing::Combine( + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values(CommonTestUtils::DEVICE_MULTI), + ::testing::ValuesIn(Multiconfigs)), + VersionTest::getTestCaseName); + + INSTANTIATE_TEST_CASE_P(smoke_Hetero_BehaviorTests, VersionTest, + ::testing::Combine( + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values(CommonTestUtils::DEVICE_HETERO), + ::testing::ValuesIn(Heteroconfigs)), + VersionTest::getTestCaseName); + + +} // namespace diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/config.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/config.hpp index e4bc36c67a3..e1a83e58d66 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/config.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/config.hpp @@ -28,141 +28,113 @@ #include "ngraph_functions/pass/convert_prc.hpp" #include "ngraph_functions/subgraph_builders.hpp" -using CorrectConfigTests = BehaviorTestsUtils::BehaviorTestsBasic; - -// Setting empty config doesn't throw -TEST_P(CorrectConfigTests, SetEmptyConfig) { - // Skip test according to plugin specific disabledTestPatterns() (if any) - SKIP_IF_CURRENT_TEST_IS_DISABLED() - // Create CNNNetwork from ngrpah::Function - InferenceEngine::CNNNetwork cnnNet(function); - std::map config; - ASSERT_NO_THROW(ie->GetMetric(targetDevice, METRIC_KEY(SUPPORTED_CONFIG_KEYS))); - ASSERT_NO_THROW(ie->SetConfig(config, targetDevice)); -} - -// Setting correct config doesn't throw -TEST_P(CorrectConfigTests, SetCorrectConfig) { - // Skip test according to plugin specific disabledTestPatterns() (if any) - SKIP_IF_CURRENT_TEST_IS_DISABLED() - // Create CNNNetwork from ngrpah::Function - InferenceEngine::CNNNetwork cnnNet(function); - ASSERT_NO_THROW(ie->GetMetric(targetDevice, METRIC_KEY(SUPPORTED_CONFIG_KEYS))); - ASSERT_NO_THROW(ie->SetConfig(configuration, targetDevice)); -} - -using IncorrectConfigTests = BehaviorTestsUtils::BehaviorTestsBasic; - -TEST_P(IncorrectConfigTests, SetConfigWithIncorrectKey) { - // Skip test according to plugin specific disabledTestPatterns() (if any) - SKIP_IF_CURRENT_TEST_IS_DISABLED() - // Create CNNNetwork from ngrpah::Function - InferenceEngine::CNNNetwork cnnNet(function); - if (targetDevice.find(CommonTestUtils::DEVICE_MULTI) == std::string::npos && - targetDevice.find(CommonTestUtils::DEVICE_HETERO) == std::string::npos) { +namespace BehaviorTestsDefinitions { + using CorrectConfigTests = BehaviorTestsUtils::BehaviorTestsBasic; + // Setting empty config doesn't throw + TEST_P(CorrectConfigTests, SetEmptyConfig) { + // Skip test according to plugin specific disabledTestPatterns() (if any) + SKIP_IF_CURRENT_TEST_IS_DISABLED() + // Create CNNNetwork from ngrpah::Function + InferenceEngine::CNNNetwork cnnNet(function); + std::map config; ASSERT_NO_THROW(ie->GetMetric(targetDevice, METRIC_KEY(SUPPORTED_CONFIG_KEYS))); - ASSERT_THROW(ie->SetConfig(configuration, targetDevice), - InferenceEngine::details::InferenceEngineException); - } else { + ASSERT_NO_THROW(ie->SetConfig(config, targetDevice)); + } + + // Setting correct config doesn't throw + TEST_P(CorrectConfigTests, SetCorrectConfig) { + // Skip test according to plugin specific disabledTestPatterns() (if any) + SKIP_IF_CURRENT_TEST_IS_DISABLED() + // Create CNNNetwork from ngrpah::Function + InferenceEngine::CNNNetwork cnnNet(function); ASSERT_NO_THROW(ie->GetMetric(targetDevice, METRIC_KEY(SUPPORTED_CONFIG_KEYS))); ASSERT_NO_THROW(ie->SetConfig(configuration, targetDevice)); } -} -TEST_P(IncorrectConfigTests, canNotLoadNetworkWithIncorrectConfig) { - // Skip test according to plugin specific disabledTestPatterns() (if any) - SKIP_IF_CURRENT_TEST_IS_DISABLED() - // Create CNNNetwork from ngrpah::Function - InferenceEngine::CNNNetwork cnnNet(function); - ASSERT_THROW(auto execNet = ie->LoadNetwork(cnnNet, targetDevice, configuration), - InferenceEngine::details::InferenceEngineException); -} + using IncorrectConfigTests = BehaviorTestsUtils::BehaviorTestsBasic; -using IncorrectConfigAPITests = BehaviorTestsUtils::BehaviorTestsBasic; - -TEST_P(IncorrectConfigAPITests, SetConfigWithNoExistingKey) { - // Skip test according to plugin specific disabledTestPatterns() (if any) - SKIP_IF_CURRENT_TEST_IS_DISABLED() - // Create CNNNetwork from ngrpah::Function - InferenceEngine::CNNNetwork cnnNet(function); - ASSERT_NO_THROW(ie->GetMetric(targetDevice, METRIC_KEY(SUPPORTED_CONFIG_KEYS))); - if (targetDevice.find(CommonTestUtils::DEVICE_GNA) != std::string::npos) { - ASSERT_THROW(ie->SetConfig(configuration, targetDevice), InferenceEngine::NotFound); - } else { - try { - ie->SetConfig(configuration, targetDevice); - } catch (InferenceEngine::details::InferenceEngineException ex) {} + TEST_P(IncorrectConfigTests, SetConfigWithIncorrectKey) { + // Skip test according to plugin specific disabledTestPatterns() (if any) + SKIP_IF_CURRENT_TEST_IS_DISABLED() + // Create CNNNetwork from ngrpah::Function + InferenceEngine::CNNNetwork cnnNet(function); + if (targetDevice.find(CommonTestUtils::DEVICE_MULTI) == std::string::npos && + targetDevice.find(CommonTestUtils::DEVICE_HETERO) == std::string::npos) { + ASSERT_NO_THROW(ie->GetMetric(targetDevice, METRIC_KEY(SUPPORTED_CONFIG_KEYS))); + ASSERT_THROW(ie->SetConfig(configuration, targetDevice), + InferenceEngine::details::InferenceEngineException); + } else { + ASSERT_NO_THROW(ie->GetMetric(targetDevice, METRIC_KEY(SUPPORTED_CONFIG_KEYS))); + ASSERT_NO_THROW(ie->SetConfig(configuration, targetDevice)); + } } -} -using CorrectConfigAPITests = BehaviorTestsUtils::BehaviorTestsBasic; - -TEST_P(CorrectConfigAPITests, canSetExclusiveAsyncRequests) { - // Skip test according to plugin specific disabledTestPatterns() (if any) - SKIP_IF_CURRENT_TEST_IS_DISABLED() - // Create CNNNetwork from ngrpah::Function - InferenceEngine::CNNNetwork cnnNet(function); - // Load config - std::map config = {{CONFIG_KEY(EXCLUSIVE_ASYNC_REQUESTS), CONFIG_VALUE(YES)}}; - config.insert(configuration.begin(), configuration.end()); - if (targetDevice.find(CommonTestUtils::DEVICE_MULTI) == std::string::npos && - targetDevice.find(CommonTestUtils::DEVICE_HETERO) == std::string::npos) { - ASSERT_NO_THROW(ie->SetConfig(config, targetDevice)); + TEST_P(IncorrectConfigTests, canNotLoadNetworkWithIncorrectConfig) { + // Skip test according to plugin specific disabledTestPatterns() (if any) + SKIP_IF_CURRENT_TEST_IS_DISABLED() + // Create CNNNetwork from ngrpah::Function + InferenceEngine::CNNNetwork cnnNet(function); + ASSERT_THROW(auto execNet = ie->LoadNetwork(cnnNet, targetDevice, configuration), + InferenceEngine::details::InferenceEngineException); } - // Load CNNNetwork to target plugins - auto execNet = ie->LoadNetwork(cnnNet, targetDevice, config); - execNet.CreateInferRequest(); - if ((targetDevice == CommonTestUtils::DEVICE_HDDL) || (targetDevice == CommonTestUtils::DEVICE_GNA)) { - ASSERT_EQ(0u, InferenceEngine::ExecutorManager::getInstance()->getExecutorsNumber()); - } else if ((targetDevice == CommonTestUtils::DEVICE_FPGA) || - (targetDevice == CommonTestUtils::DEVICE_KEEMBAY) || (targetDevice == CommonTestUtils::DEVICE_MYRIAD)) { - ASSERT_EQ(2u, InferenceEngine::ExecutorManager::getInstance()->getExecutorsNumber()); - } else if (targetDevice == CommonTestUtils::DEVICE_MULTI) { - } else { - ASSERT_EQ(1u, InferenceEngine::ExecutorManager::getInstance()->getExecutorsNumber()); + using IncorrectConfigAPITests = BehaviorTestsUtils::BehaviorTestsBasic; + + TEST_P(IncorrectConfigAPITests, SetConfigWithNoExistingKey) { + // Skip test according to plugin specific disabledTestPatterns() (if any) + SKIP_IF_CURRENT_TEST_IS_DISABLED() + // Create CNNNetwork from ngrpah::Function + InferenceEngine::CNNNetwork cnnNet(function); + ASSERT_NO_THROW(ie->GetMetric(targetDevice, METRIC_KEY(SUPPORTED_CONFIG_KEYS))); + if (targetDevice.find(CommonTestUtils::DEVICE_GNA) != std::string::npos) { + ASSERT_THROW(ie->SetConfig(configuration, targetDevice), InferenceEngine::NotFound); + } else { + try { + ie->SetConfig(configuration, targetDevice); + } catch (InferenceEngine::details::InferenceEngineException ex) {} + } } -} -TEST_P(CorrectConfigAPITests, withoutExclusiveAsyncRequests) { - // Skip test according to plugin specific disabledTestPatterns() (if any) - SKIP_IF_CURRENT_TEST_IS_DISABLED() - // Create CNNNetwork from ngrpah::Function - InferenceEngine::CNNNetwork cnnNet(function); - // Load config - std::map config = {{CONFIG_KEY(EXCLUSIVE_ASYNC_REQUESTS), CONFIG_VALUE(NO)}}; - config.insert(configuration.begin(), configuration.end()); - if (targetDevice.find(CommonTestUtils::DEVICE_MULTI) == std::string::npos && - targetDevice.find(CommonTestUtils::DEVICE_HETERO) == std::string::npos) { - ASSERT_NO_THROW(ie->SetConfig(config, targetDevice)); + using CorrectConfigAPITests = BehaviorTestsUtils::BehaviorTestsBasic; + + TEST_P(CorrectConfigAPITests, canSetExclusiveAsyncRequests) { + // Skip test according to plugin specific disabledTestPatterns() (if any) + SKIP_IF_CURRENT_TEST_IS_DISABLED() + // Create CNNNetwork from ngrpah::Function + InferenceEngine::CNNNetwork cnnNet(function); + // Load config + std::map config = {{CONFIG_KEY(EXCLUSIVE_ASYNC_REQUESTS), CONFIG_VALUE(YES)}}; + config.insert(configuration.begin(), configuration.end()); + if (targetDevice.find(CommonTestUtils::DEVICE_MULTI) == std::string::npos && + targetDevice.find(CommonTestUtils::DEVICE_HETERO) == std::string::npos) { + ASSERT_NO_THROW(ie->SetConfig(config, targetDevice)); + } + // Load CNNNetwork to target plugins + auto execNet = ie->LoadNetwork(cnnNet, targetDevice, config); + execNet.CreateInferRequest(); + + if ((targetDevice == CommonTestUtils::DEVICE_HDDL) || (targetDevice == CommonTestUtils::DEVICE_GNA)) { + ASSERT_EQ(0u, InferenceEngine::ExecutorManager::getInstance()->getExecutorsNumber()); + } else if ((targetDevice == CommonTestUtils::DEVICE_FPGA) || + (targetDevice == CommonTestUtils::DEVICE_KEEMBAY) || + (targetDevice == CommonTestUtils::DEVICE_MYRIAD)) { + ASSERT_EQ(2u, InferenceEngine::ExecutorManager::getInstance()->getExecutorsNumber()); + } else if (targetDevice == CommonTestUtils::DEVICE_MULTI) { + } else { + ASSERT_EQ(1u, InferenceEngine::ExecutorManager::getInstance()->getExecutorsNumber()); + } } - // Load CNNNetwork to target plugins - auto execNet = ie->LoadNetwork(cnnNet, targetDevice, config); - execNet.CreateInferRequest(); - if ((targetDevice == CommonTestUtils::DEVICE_FPGA) || (targetDevice == CommonTestUtils::DEVICE_MYRIAD) || - (targetDevice == CommonTestUtils::DEVICE_KEEMBAY)) { - ASSERT_EQ(1u, InferenceEngine::ExecutorManager::getInstance()->getExecutorsNumber()); - } else if (targetDevice == CommonTestUtils::DEVICE_MULTI) { - } else { - ASSERT_EQ(0u, InferenceEngine::ExecutorManager::getInstance()->getExecutorsNumber()); - } -} - -TEST_P(CorrectConfigAPITests, reusableCPUStreamsExecutor) { - // Skip test according to plugin specific disabledTestPatterns() (if any) - SKIP_IF_CURRENT_TEST_IS_DISABLED() - ASSERT_EQ(0u, InferenceEngine::ExecutorManager::getInstance()->getExecutorsNumber()); - ASSERT_EQ(0u, InferenceEngine::ExecutorManager::getInstance()->getIdleCPUStreamsExecutorsNumber()); - - // Create CNNNetwork from ngrpah::Function - InferenceEngine::CNNNetwork cnnNet(function); - { + TEST_P(CorrectConfigAPITests, withoutExclusiveAsyncRequests) { + // Skip test according to plugin specific disabledTestPatterns() (if any) + SKIP_IF_CURRENT_TEST_IS_DISABLED() + // Create CNNNetwork from ngrpah::Function + InferenceEngine::CNNNetwork cnnNet(function); // Load config std::map config = {{CONFIG_KEY(EXCLUSIVE_ASYNC_REQUESTS), CONFIG_VALUE(NO)}}; config.insert(configuration.begin(), configuration.end()); if (targetDevice.find(CommonTestUtils::DEVICE_MULTI) == std::string::npos && - targetDevice.find(CommonTestUtils::DEVICE_HETERO) == std::string::npos) { + targetDevice.find(CommonTestUtils::DEVICE_HETERO) == std::string::npos) { ASSERT_NO_THROW(ie->SetConfig(config, targetDevice)); } // Load CNNNetwork to target plugins @@ -170,19 +142,49 @@ TEST_P(CorrectConfigAPITests, reusableCPUStreamsExecutor) { execNet.CreateInferRequest(); if ((targetDevice == CommonTestUtils::DEVICE_FPGA) || (targetDevice == CommonTestUtils::DEVICE_MYRIAD) || - (targetDevice == CommonTestUtils::DEVICE_KEEMBAY)) { + (targetDevice == CommonTestUtils::DEVICE_KEEMBAY)) { ASSERT_EQ(1u, InferenceEngine::ExecutorManager::getInstance()->getExecutorsNumber()); - ASSERT_EQ(0u, InferenceEngine::ExecutorManager::getInstance()->getIdleCPUStreamsExecutorsNumber()); } else if (targetDevice == CommonTestUtils::DEVICE_MULTI) { } else { ASSERT_EQ(0u, InferenceEngine::ExecutorManager::getInstance()->getExecutorsNumber()); - ASSERT_GE(2u, InferenceEngine::ExecutorManager::getInstance()->getIdleCPUStreamsExecutorsNumber()); } } - if (targetDevice == CommonTestUtils::DEVICE_CPU) { - ASSERT_NE(0u, InferenceEngine::ExecutorManager::getInstance()->getIdleCPUStreamsExecutorsNumber()); - ASSERT_NO_THROW(ie->UnregisterPlugin("CPU")); + + TEST_P(CorrectConfigAPITests, reusableCPUStreamsExecutor) { + // Skip test according to plugin specific disabledTestPatterns() (if any) + SKIP_IF_CURRENT_TEST_IS_DISABLED() ASSERT_EQ(0u, InferenceEngine::ExecutorManager::getInstance()->getExecutorsNumber()); ASSERT_EQ(0u, InferenceEngine::ExecutorManager::getInstance()->getIdleCPUStreamsExecutorsNumber()); + + // Create CNNNetwork from ngrpah::Function + InferenceEngine::CNNNetwork cnnNet(function); + { + // Load config + std::map config = {{CONFIG_KEY(EXCLUSIVE_ASYNC_REQUESTS), CONFIG_VALUE(NO)}}; + config.insert(configuration.begin(), configuration.end()); + if (targetDevice.find(CommonTestUtils::DEVICE_MULTI) == std::string::npos && + targetDevice.find(CommonTestUtils::DEVICE_HETERO) == std::string::npos) { + ASSERT_NO_THROW(ie->SetConfig(config, targetDevice)); + } + // Load CNNNetwork to target plugins + auto execNet = ie->LoadNetwork(cnnNet, targetDevice, config); + execNet.CreateInferRequest(); + + if ((targetDevice == CommonTestUtils::DEVICE_FPGA) || (targetDevice == CommonTestUtils::DEVICE_MYRIAD) || + (targetDevice == CommonTestUtils::DEVICE_KEEMBAY)) { + ASSERT_EQ(1u, InferenceEngine::ExecutorManager::getInstance()->getExecutorsNumber()); + ASSERT_EQ(0u, InferenceEngine::ExecutorManager::getInstance()->getIdleCPUStreamsExecutorsNumber()); + } else if (targetDevice == CommonTestUtils::DEVICE_MULTI) { + } else { + ASSERT_EQ(0u, InferenceEngine::ExecutorManager::getInstance()->getExecutorsNumber()); + ASSERT_GE(2u, InferenceEngine::ExecutorManager::getInstance()->getIdleCPUStreamsExecutorsNumber()); + } + } + if (targetDevice == CommonTestUtils::DEVICE_CPU) { + ASSERT_NE(0u, InferenceEngine::ExecutorManager::getInstance()->getIdleCPUStreamsExecutorsNumber()); + ASSERT_NO_THROW(ie->UnregisterPlugin("CPU")); + ASSERT_EQ(0u, InferenceEngine::ExecutorManager::getInstance()->getExecutorsNumber()); + ASSERT_EQ(0u, InferenceEngine::ExecutorManager::getInstance()->getIdleCPUStreamsExecutorsNumber()); + } } -} \ No newline at end of file +} // namespace BehaviorTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/cpp_holders.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/cpp_holders.hpp new file mode 100644 index 00000000000..8a681a3be33 --- /dev/null +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/cpp_holders.hpp @@ -0,0 +1,43 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gtest/gtest.h" +#include "common_test_utils/common_utils.hpp" +#include "common_test_utils/test_common.hpp" +#include "functional_test_utils/skip_tests_config.hpp" +#include "functional_test_utils/precision_utils.hpp" +#include + +namespace BehaviorTestsDefinitions { +typedef std::tuple< + std::string, // Target device name + std::vector> // Order +HoldersParams; + +class HoldersTest : public CommonTestUtils::TestsCommon, + public ::testing::WithParamInterface { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + + void SetUp() override; + + void TearDown() override; + + std::string deathTestStyle; + std::vector order; + std::shared_ptr function; + std::string targetDevice; +}; +} // namespace BehaviorTestsDefinitions \ No newline at end of file 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 7d377f4c951..c0d73e0ff5c 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 @@ -20,6 +20,7 @@ #include "functional_test_utils/plugin_cache.hpp" #include "functional_test_utils/blob_utils.hpp" +namespace BehaviorTestsDefinitions { using ExecGraphTests = BehaviorTestsUtils::BehaviorTestsBasic; inline std::vector separateStrToVec(std::string str, const char sep) { @@ -240,4 +241,5 @@ TEST_P(ExecGraphTests, CheckExecGraphInfoSerialization) { ASSERT_THROW(ie->LoadNetwork(cnnNet, targetDevice).GetExecGraphInfo(), InferenceEngine::details::InferenceEngineException); } -} \ No newline at end of file +} +} // namespace BehaviorTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request.hpp index 8c3a7a6921d..ac5c1b5e680 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request.hpp @@ -24,6 +24,7 @@ #include "functional_test_utils/blob_utils.hpp" #include "ngraph_functions/subgraph_builders.hpp" +namespace BehaviorTestsDefinitions { using InferRequestTests = BehaviorTestsUtils::BehaviorTestsBasic; // Setting empty config to LoadNetwork doesn't throw @@ -621,4 +622,5 @@ TEST_P(InferRequestTests, returnDeviceBusyOnGetPerformanceCountAfterAsyncInfer) catch (const std::exception &e) { std::cout << "Exception" << e.what() << std::endl; } -} \ No newline at end of file +} +} // namespace BehaviorTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_callback.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_callback.hpp index fe99e1afaa5..e5d80916e54 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_callback.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_callback.hpp @@ -22,6 +22,7 @@ #include "ngraph_functions/subgraph_builders.hpp" #include "behavior/infer_request_callback.hpp" +namespace BehaviorTestsDefinitions { using CallbackTests = BehaviorTestsUtils::BehaviorTestsBasic; TEST_P(CallbackTests, canCallSyncAndAsyncWithCompletionCallback) { @@ -294,4 +295,5 @@ TEST_P(CallbackTests, returnGeneralErrorIfCallbackThrowException) { } ASSERT_EQ(InferenceEngine::StatusCode::GENERAL_ERROR, waitStatus); ASSERT_NE(std::string(resp.msg).find("returnGeneralErrorIfCallbackThrowException"), std::string::npos); -} \ No newline at end of file +} +} // namespace BehaviorTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_config.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_config.hpp index 45ef5cda56e..592783bf665 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_config.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_config.hpp @@ -25,6 +25,7 @@ #include "functional_test_utils/blob_utils.hpp" #include "ngraph_functions/subgraph_builders.hpp" +namespace BehaviorTestsDefinitions { using InferConfigTests = BehaviorTestsUtils::BehaviorTestsBasic; TEST_P(InferConfigTests, canSetExclusiveAsyncRequests) { @@ -93,4 +94,5 @@ TEST_P(InferConfigInTests, CanInferWithConfig) { auto execNet = ie->LoadNetwork(cnnNet, targetDevice, configuration); auto req = execNet.CreateInferRequest(); ASSERT_NO_THROW(req.Infer()); -} \ No newline at end of file +} +} // namespace BehaviorTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_input.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_input.hpp index 2c86b8fea9e..d91c022cdd8 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_input.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_input.hpp @@ -23,6 +23,7 @@ #include "ngraph_functions/subgraph_builders.hpp" #include "behavior/infer_request_input.hpp" +namespace BehaviorTestsDefinitions { using InferRequestInputTests = BehaviorTestsUtils::BehaviorTestsBasic; TEST_P(InferRequestInputTests, canSetInputBlobForSyncRequest) { @@ -136,4 +137,5 @@ TEST_P(InferRequestInputTests, canStartAsyncInferWithGetInOut) { sts = req.Wait(500); ASSERT_EQ(InferenceEngine::StatusCode::OK, sts); InferenceEngine::Blob::Ptr outputBlob = req.GetBlob(cnnNet.getOutputsInfo().begin()->first); -} \ No newline at end of file +} +} // namespace BehaviorTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_output.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_output.hpp index 6b5310c0f69..5f06c664b13 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_output.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_output.hpp @@ -23,6 +23,7 @@ #include "ngraph_functions/subgraph_builders.hpp" #include "behavior/infer_request_output.hpp" +namespace BehaviorTestsDefinitions { using InferRequestOutputTests = BehaviorTestsUtils::BehaviorTestsBasic; TEST_P(InferRequestOutputTests, canGetInputBlobForSyncRequest) { @@ -136,4 +137,5 @@ TEST_P(InferRequestOutputTests, canStartAsyncInferWithGetInOut) { sts = req.Wait(500); ASSERT_EQ(InferenceEngine::StatusCode::OK, sts); InferenceEngine::Blob::Ptr outputBlob = req.GetBlob(cnnNet.getOutputsInfo().begin()->first); -} \ No newline at end of file +} +} // namespace BehaviorTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/layout.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/layout.hpp new file mode 100644 index 00000000000..9a18a5cbfc7 --- /dev/null +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/layout.hpp @@ -0,0 +1,54 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gtest/gtest.h" +#include "common_test_utils/common_utils.hpp" +#include "common_test_utils/test_common.hpp" + +#include "functional_test_utils/skip_tests_config.hpp" +#include "functional_test_utils/plugin_cache.hpp" +#include "functional_test_utils/blob_utils.hpp" +#include "functional_test_utils/precision_utils.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "ngraph_functions/pass/convert_prc.hpp" + +namespace BehaviorTestsDefinitions { + typedef std::tuple< + InferenceEngine::Precision, // Network precision + std::string, // Target device name + std::map, // Target config + InferenceEngine::Layout, // Layout + std::vector> // InputShapes + LayoutParams; + +class LayoutTest : public CommonTestUtils::TestsCommon, + public ::testing::WithParamInterface { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + + void SetUp() override; + + void TearDown() override; + + std::shared_ptr ie = PluginCache::get().ie(); + InferenceEngine::Layout layout; + std::vector inputShapes; + std::shared_ptr function; + InferenceEngine::Precision netPrecision; + std::string targetDevice; + std::map configuration; +}; +} // namespace BehaviorTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/perf_counters.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/perf_counters.hpp new file mode 100644 index 00000000000..15859049ec2 --- /dev/null +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/perf_counters.hpp @@ -0,0 +1,39 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include + +#include +#include "common_test_utils/test_assertions.hpp" +#include "common_test_utils/common_utils.hpp" +#include "functional_test_utils/plugin_cache.hpp" +#include "functional_test_utils/layer_test_utils.hpp" +#include "functional_test_utils/blob_utils.hpp" +#include "ie_preprocess.hpp" +#include "functional_test_utils/behavior_test_utils.hpp" + +namespace BehaviorTestsDefinitions { +using PerfCountersTest = BehaviorTestsUtils::BehaviorTestsBasic; + +TEST_P(PerfCountersTest, NotEmptyWhenExecuted) { + // Skip test according to plugin specific disabledTestPatterns() (if any) + SKIP_IF_CURRENT_TEST_IS_DISABLED() + // Create CNNNetwork from ngrpah::Function + InferenceEngine::CNNNetwork cnnNet(function); + std::map config = {{ InferenceEngine::PluginConfigParams::KEY_PERF_COUNT, + InferenceEngine::PluginConfigParams::YES }}; + config.insert(configuration.begin(), configuration.end()); + // Load CNNNetwork to target plugins + auto execNet = ie->LoadNetwork(cnnNet, targetDevice, config); + // Create InferRequest + InferenceEngine::InferRequest req; + InferenceEngine::ResponseDesc response; + ASSERT_NO_FATAL_FAILURE(req = execNet.CreateInferRequest()); + ASSERT_NO_THROW(req.Infer()) << response.msg; + + std::map perfMap; + perfMap = req.GetPerformanceCounts(); + ASSERT_NE(perfMap.size(), 0); +} +} // namespace BehaviorTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/set_preprocess.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/set_preprocess.hpp index 866e31f599d..8d6c67d9023 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/set_preprocess.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/set_preprocess.hpp @@ -13,6 +13,7 @@ #include "ie_preprocess.hpp" #include "functional_test_utils/behavior_test_utils.hpp" +namespace BehaviorTestsDefinitions { using PreprocessTest = BehaviorTestsUtils::BehaviorTestsBasic; TEST_P(PreprocessTest, SetPreProcessToInputInfo) { @@ -59,3 +60,4 @@ TEST_P(PreprocessTest, SetPreProcessToInferRequest) { info->getResizeAlgorithm()); } } +} // namespace BehaviorTestsDefinitions \ No newline at end of file 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 new file mode 100644 index 00000000000..bc1c3a724b9 --- /dev/null +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/test_plugin.hpp @@ -0,0 +1,160 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include +#include "ie_extension.h" +#include +#include +#include +#include +#include +#include +#include "functional_test_utils/layer_test_utils.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "ngraph_functions/builders.hpp" + +namespace BehaviorTestsDefinitions { +using BehaviorTests = BehaviorTestsUtils::BehaviorTestsBasic; + +bool static compare_two_files_lexicographically(const std::string &name_a, const std::string &name_b) { + std::ifstream a(name_a), b(name_b); + + std::string line_a, line_b; + while (std::getline(a, line_a)) { + std::string str_a, str_b; + std::istringstream(line_a) >> str_a; + + if (!std::getline(b, line_b)) + throw std::logic_error("Second file is shorter than first"); + else + std::istringstream(line_b) >> str_b; + + if (line_a != line_b) { + std::cout << "Line A: " << line_a << std::endl; + std::cout << "Line B: " << line_b << std::endl; + throw std::logic_error("Files are different"); + } + } + + if (std::getline(b, line_b)) + throw std::logic_error("First file is shorter than second"); + else + return true; +} + +void setInputNetworkPrecision(InferenceEngine::CNNNetwork &network, InferenceEngine::InputsDataMap &inputs_info, + InferenceEngine::Precision input_precision) { + inputs_info = network.getInputsInfo(); + ASSERT_EQ(1u, inputs_info.size()); + inputs_info.begin()->second->setPrecision(input_precision); +} + +void setOutputNetworkPrecision(InferenceEngine::CNNNetwork &network, InferenceEngine::OutputsDataMap &outputs_info, + InferenceEngine::Precision output_precision) { + outputs_info = network.getOutputsInfo(); + ASSERT_EQ(outputs_info.size(), 1u); + outputs_info.begin()->second->setPrecision(output_precision); +} + +TEST_P(BehaviorTests, allocateNullBlob) { + // Skip test according to plugin specific disabledTestPatterns() (if any) + SKIP_IF_CURRENT_TEST_IS_DISABLED() + InferenceEngine::TensorDesc tdesc = InferenceEngine::TensorDesc(InferenceEngine::Precision::FP32, + InferenceEngine::NCHW); + InferenceEngine::TBlob blob(tdesc); + 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::details::InferenceEngineException); +} + +TEST_P(BehaviorTests, pluginDoesNotChangeOriginalNetwork) { + // Skip test according to plugin specific disabledTestPatterns() (if any) + SKIP_IF_CURRENT_TEST_IS_DISABLED() + const std::string name_a = "a.xml"; + const std::string name_b = "b.xml"; + auto param = GetParam(); + + InferenceEngine::CNNNetwork cnnNet(function); + InferenceEngine::CNNNetwork execGraph; + cnnNet.serialize(name_a); + + ASSERT_NO_THROW(ie->LoadNetwork(cnnNet, targetDevice, configuration)); + cnnNet.serialize(name_b); + + compare_two_files_lexicographically(name_a, name_b); + EXPECT_EQ(0, std::remove(name_a.c_str())); + EXPECT_EQ(0, std::remove(name_b.c_str())); +} + +using BehaviorTestInput = BehaviorTestsUtils::BehaviorTestsBasic; + +TEST_P(BehaviorTestInput, canSetInputPrecisionForNetwork) { + // Skip test according to plugin specific disabledTestPatterns() (if any) + SKIP_IF_CURRENT_TEST_IS_DISABLED() + InferenceEngine::InputsDataMap inputs_info; + InferenceEngine::CNNNetwork cnnNet(function); + setInputNetworkPrecision(cnnNet, inputs_info, netPrecision); + + // Input image format I16 is not supported yet. + if (( targetDevice == CommonTestUtils::DEVICE_MYRIAD + || targetDevice == CommonTestUtils::DEVICE_HDDL + || targetDevice == CommonTestUtils::DEVICE_KEEMBAY) + && netPrecision == InferenceEngine::Precision::I16) { + std::string msg; + InferenceEngine::StatusCode sts = InferenceEngine::StatusCode::OK; + try { + ie->LoadNetwork(cnnNet, targetDevice, configuration); + } catch (InferenceEngine::details::InferenceEngineException ex) { + msg = ex.what(); + sts = ex.getStatus(); + } + ASSERT_EQ(InferenceEngine::StatusCode::GENERAL_ERROR, sts) << msg; + std::string refError = "Input image format I16 is not supported yet."; + ASSERT_EQ(refError, msg); + } else { + ASSERT_NO_THROW(ie->LoadNetwork(cnnNet, targetDevice, configuration)); + } +} + +using BehaviorTestOutput = BehaviorTestsUtils::BehaviorTestsBasic; + +TEST_P(BehaviorTestOutput, canSetOutputPrecisionForNetwork) { + // Skip test according to plugin specific disabledTestPatterns() (if any) + SKIP_IF_CURRENT_TEST_IS_DISABLED() + InferenceEngine::OutputsDataMap output_info; + InferenceEngine::CNNNetwork cnnNet(function); + setOutputNetworkPrecision(cnnNet, output_info, netPrecision); + + std::string msg; + InferenceEngine::StatusCode sts = InferenceEngine::StatusCode::OK; + + try { + InferenceEngine::ExecutableNetwork exeNetwork = ie->LoadNetwork(cnnNet, targetDevice, configuration); + } catch (InferenceEngine::details::InferenceEngineException ex) { + sts = ex.getStatus(); + msg = ex.what(); + std::cout << "LoadNetwork() threw InferenceEngineException. Status: " << sts << ", message: " << msg << std::endl; + } + + if ((netPrecision == InferenceEngine::Precision::I16 || netPrecision == InferenceEngine::Precision::U8)) { + if ((targetDevice == "CPU") || (targetDevice == "GPU")) { + ASSERT_EQ(InferenceEngine::StatusCode::OK, sts); + } + } else { + ASSERT_EQ(InferenceEngine::StatusCode::OK, sts); + } +} +} // namespace BehaviorTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/version.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/version.hpp new file mode 100644 index 00000000000..095147b690f --- /dev/null +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/version.hpp @@ -0,0 +1,35 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include + +#include +#include "common_test_utils/test_assertions.hpp" +#include "common_test_utils/common_utils.hpp" +#include "functional_test_utils/plugin_cache.hpp" +#include "functional_test_utils/layer_test_utils.hpp" +#include "functional_test_utils/blob_utils.hpp" +#include "ie_preprocess.hpp" +#include "functional_test_utils/behavior_test_utils.hpp" + +namespace BehaviorTestsDefinitions { +using VersionTest = BehaviorTestsUtils::BehaviorTestsBasic; + +// Load unsupported network type to the Plugin +TEST_P(VersionTest, pluginCurrentVersionIsCorrect) { + // Skip test according to plugin specific disabledTestPatterns() (if any) + SKIP_IF_CURRENT_TEST_IS_DISABLED() + // Create CNNNetwork from ngrpah::Function + InferenceEngine::CNNNetwork cnnNet(function); + std::string refError = "The plugin does not support"; + if (targetDevice.find(CommonTestUtils::DEVICE_MULTI) == std::string::npos && + targetDevice.find(CommonTestUtils::DEVICE_HETERO) == std::string::npos) { + std::map versions = ie->GetVersions(targetDevice); + ASSERT_EQ(versions.size(), 1); + auto version = versions.begin()->second; + ASSERT_EQ(version.apiVersion.major, 2); + ASSERT_EQ(version.apiVersion.minor, 1); + } +} +} // namespace BehaviorTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/src/behavior/cpp_holders.cpp b/inference-engine/tests/functional/plugin/shared/src/behavior/cpp_holders.cpp new file mode 100644 index 00000000000..116e55db98d --- /dev/null +++ b/inference-engine/tests/functional/plugin/shared/src/behavior/cpp_holders.cpp @@ -0,0 +1,74 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// +#include +#include "behavior/cpp_holders.hpp" + +namespace BehaviorTestsDefinitions { + std::string HoldersTest::getTestCaseName(testing::TestParamInfo obj) { + std::string targetDevice; + std::vector order; + std::tie(targetDevice, order) = obj.param; + std::ostringstream result; + result << "targetDevice=" << targetDevice << "_"; + if (!order.empty()) { + for (auto &Item : order) { + result << "order=" << Item << "_"; + } + } + return result.str(); + } + + void HoldersTest::SetUp() { + std::tie(targetDevice, order) = this->GetParam(); + deathTestStyle = ::testing::GTEST_FLAG(death_test_style); + if ((deathTestStyle == "fast" && targetDevice == CommonTestUtils::DEVICE_MYRIAD) || + targetDevice == CommonTestUtils::DEVICE_GPU) { + // Default death test mode "fast" must be used in single-threaded context only. + // "MyriadBehaviorTests" links "XLink" library that statically initializes "libusb". + // Which in turn creates a thread. + ::testing::GTEST_FLAG(death_test_style) = "threadsafe"; + } + function = ngraph::builder::subgraph::makeConvPoolRelu(); + } + + void HoldersTest::TearDown() { + ::testing::GTEST_FLAG(death_test_style) = deathTestStyle; + function.reset(); + } + +#define EXPECT_NO_CRASH(_statement) \ +EXPECT_EXIT(_statement; exit(0), testing::ExitedWithCode(0), "") + + void release_order_test(std::vector order, const std::string &deviceName, + std::shared_ptr function) { + InferenceEngine::CNNNetwork cnnNet(function); + InferenceEngine::Core core; + auto exe_net = core.LoadNetwork(cnnNet, deviceName); + auto request = exe_net.CreateInferRequest(); + + auto release = [&](int i) { + switch (i) { + case 0: + core = InferenceEngine::Core{}; + break; + case 1: + exe_net = {}; + break; + case 2: + request = {}; + break; + default: + break; + } + }; + + for (auto i : order) + release(i); + } + + TEST_P(HoldersTest, Orders) { + // Test failed if crash happens + EXPECT_NO_CRASH(release_order_test(order, targetDevice, function)); + } +} // namespace BehaviorTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/src/behavior/layout.cpp b/inference-engine/tests/functional/plugin/shared/src/behavior/layout.cpp new file mode 100644 index 00000000000..7057af5ee94 --- /dev/null +++ b/inference-engine/tests/functional/plugin/shared/src/behavior/layout.cpp @@ -0,0 +1,93 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "behavior/layout.hpp" + +namespace BehaviorTestsDefinitions { +std::string LayoutTest::getTestCaseName(testing::TestParamInfo obj) { + InferenceEngine::Precision netPrecision; + std::string targetDevice; + InferenceEngine::Layout layout; + std::vector inputShapes; + std::map configuration; + std::tie(netPrecision, targetDevice, configuration, layout, inputShapes) = obj.param; + std::ostringstream result; + result << "netPRC=" << netPrecision.name() << "_"; + result << "targetDevice=" << targetDevice << "_"; + result << "layout=" << layout << "_"; + if (!inputShapes.empty()) { + for (auto &Item : inputShapes) { + result << "inputShapes=" << Item << "_"; + } + } + return result.str(); +} + +void LayoutTest::SetUp() { + std::tie(netPrecision, targetDevice, configuration, layout, inputShapes) = this->GetParam(); + function = ngraph::builder::subgraph::make2InputSubtract(inputShapes, netPrecision); +} + +void LayoutTest::TearDown() { + if ((targetDevice == CommonTestUtils::DEVICE_GPU) || (!configuration.empty())) { + PluginCache::get().reset(); + } + function.reset(); +} + +inline bool checkLayout(InferenceEngine::Layout layout, std::vector &inputShapes) { + bool check = false; + switch (layout) { + case InferenceEngine::Layout::C: + check = 1 == inputShapes.size(); + break; + case InferenceEngine::Layout::BLOCKED: + case InferenceEngine::Layout::ANY: + check = true; + break; + case InferenceEngine::Layout::GOIDHW: + check = 6 == inputShapes.size(); + break; + case InferenceEngine::Layout::NCDHW: + case InferenceEngine::Layout::NDHWC: + case InferenceEngine::Layout::OIDHW: + case InferenceEngine::Layout::GOIHW: + check = 5 == inputShapes.size(); + break; + case InferenceEngine::Layout::OIHW: + case InferenceEngine::Layout::NCHW: + case InferenceEngine::Layout::NHWC: + check = 4 == inputShapes.size(); + break; + case InferenceEngine::Layout::CHW: + check = 3 == inputShapes.size(); + break; + case InferenceEngine::Layout::CN: + case InferenceEngine::Layout::NC: + case InferenceEngine::Layout::HW: + check = 2 == inputShapes.size(); + break; + default: + break; + } + return check; +} + +TEST_P(LayoutTest, NetWithLayout) { + // Skip test according to plugin specific disabledTestPatterns() (if any) + SKIP_IF_CURRENT_TEST_IS_DISABLED(); + // Create CNNNetwork from ngrpah::Function + InferenceEngine::CNNNetwork cnnNet(function); + if (checkLayout(layout, inputShapes)) { + ASSERT_NO_THROW(cnnNet.getInputsInfo().begin()->second->setLayout(layout)); + } else { + ASSERT_THROW(cnnNet.getInputsInfo().begin()->second->setLayout(layout), + InferenceEngine::details::InferenceEngineException); + } + if (targetDevice != CommonTestUtils::DEVICE_GNA) { + ASSERT_NO_THROW(InferenceEngine::ExecutableNetwork exeNetwork = + ie->LoadNetwork(cnnNet, targetDevice, configuration)); + } +} +} // namespace BehaviorTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/ngraph_functions/include/ngraph_functions/subgraph_builders.hpp b/inference-engine/tests/ngraph_functions/include/ngraph_functions/subgraph_builders.hpp index 1c8db9c99b6..b65f24047ab 100644 --- a/inference-engine/tests/ngraph_functions/include/ngraph_functions/subgraph_builders.hpp +++ b/inference-engine/tests/ngraph_functions/include/ngraph_functions/subgraph_builders.hpp @@ -104,8 +104,7 @@ static std::shared_ptr makeSplitMultiConvConcat(std::vector -makeTIwithLSTMcell(InferenceEngine::Precision prc = InferenceEngine::Precision::FP32) { +static std::shared_ptr makeTIwithLSTMcell(InferenceEngine::Precision prc = InferenceEngine::Precision::FP32) { auto ngPRC = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(prc); // That which we iterate over const size_t N = 32; // Batch size @@ -467,4 +466,4 @@ static std::shared_ptr makeConvBias(std::vector inputS } } // namespace subgraph } // namespace builder -} // namespace ngraph \ No newline at end of file +} // namespace ngraph diff --git a/inference-engine/tests_deprecated/behavior/CMakeLists.txt b/inference-engine/tests_deprecated/behavior/CMakeLists.txt index 581e056652a..5731c531cca 100644 --- a/inference-engine/tests_deprecated/behavior/CMakeLists.txt +++ b/inference-engine/tests_deprecated/behavior/CMakeLists.txt @@ -20,4 +20,4 @@ endif() if (ENABLE_HDDL OR ENABLE_MYRIAD) add_subdirectory(vpu) -endif() +endif() \ No newline at end of file diff --git a/inference-engine/tests_deprecated/behavior/cldnn/dummy.cpp b/inference-engine/tests_deprecated/behavior/cldnn/dummy.cpp new file mode 100644 index 00000000000..3f70c7a4cb9 --- /dev/null +++ b/inference-engine/tests_deprecated/behavior/cldnn/dummy.cpp @@ -0,0 +1,3 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// diff --git a/inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/cpp_wrappers/holders_tests.cpp b/inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/cpp_wrappers/holders_tests.cpp deleted file mode 100644 index 4c8ff9a2f59..00000000000 --- a/inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/cpp_wrappers/holders_tests.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "holders_tests.hpp" - -INSTANTIATE_TEST_CASE_P(smoke_ReleaseOrderTests, CPP_HoldersTests, testing::Combine(testing::ValuesIn(std::vector> { - // 0 - plugin - // 1 - executable_network - // 2 - infer_request - {0,1,2}, - {0,2,1}, - {1,0,2}, - {1,2,0}, - {2,0,1}, - {2,1,0}, -}), testing::Values(std::string("GPU")))); diff --git a/inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/plugin_tests/behavior_test_plugin.cpp b/inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/plugin_tests/behavior_test_plugin.cpp deleted file mode 100644 index 3cf345d3755..00000000000 --- a/inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/plugin_tests/behavior_test_plugin.cpp +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin.h" -#include "behavior_test_plugins.hpp" -#include "cldnn_test_data.hpp" - -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, BehaviorPluginTest, ValuesIn(supportedValues), - getTestCaseName); -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, BehaviorPluginTestInput, ValuesIn(allInputSupportedValues), - getTestCaseName); -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, BehaviorPluginTestOutput, ValuesIn(allOutputSupportedValues), - getOutputTestCaseName); diff --git a/inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_layers.cpp b/inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_layers.cpp deleted file mode 100644 index ad2113ffe08..00000000000 --- a/inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_layers.cpp +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin_layers.hpp" - -memory_test_params memory_test_cases[] = { - memory_test_params("GPU", "FP32", memory_case), -}; - -// FIXME -//#if (defined INSTANTIATE_TESTS) -//INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, MemoryLayerTest, -// ::testing::ValuesIn(memory_test_cases), -// getTestName); -//#endif diff --git a/inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_layout.cpp b/inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_layout.cpp deleted file mode 100644 index ce4f8653524..00000000000 --- a/inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_layout.cpp +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin_layout.hpp" - -layout_test_params power_test_cases[] = { - layout_test_params("GPU", "FP32", Layout::NC, power_params({ { 1, 3 } }, 1, 2, 2)), - layout_test_params("GPU", "FP32", Layout::NCHW, power_params({ { 1, 3, 16, 16 } }, 1, 2, 2)), -}; - -layout_test_params conv_test_cases[] = { - layout_test_params("GPU", "FP32", Layout::NC, power_params({ { 1, 3 } }, 1, 2, 2)), - layout_test_params("GPU", "FP32", Layout::NCHW, power_params({ { 1, 3, 16, 16 } }, 1, 2, 2)), -}; - -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, LayoutTestCanLoadPower, - ::testing::ValuesIn(power_test_cases), getTestName); - -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, LayoutTestCanLoadConv, - ::testing::ValuesIn(conv_test_cases), getTestName); diff --git a/inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_perf_counters.cpp b/inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_perf_counters.cpp deleted file mode 100644 index 1ac533a2576..00000000000 --- a/inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_perf_counters.cpp +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin_perf_counters.hpp" -#include "cldnn_test_data.hpp" - -// Disabled due to a bug on CentOS that leads to segmentation fault of application on exit -// when perf counters are enabled -//INSTANTIATE_TEST_CASE_P(smoke_ -// BehaviorTest, -// BehaviorPluginTestPerfCounters, -// ValuesIn(supportedValues), -// getTestCaseName); diff --git a/inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_unsupported.cpp b/inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_unsupported.cpp deleted file mode 100644 index 51b6f824c86..00000000000 --- a/inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_unsupported.cpp +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin_unsupported.hpp" -#include "cldnn_test_data.hpp" - -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, BehaviorPluginTestAllUnsupported, ValuesIn(allUnSupportedValues), - getTestCaseName); - -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, BehaviorPluginTestTypeUnsupported, ValuesIn(typeUnSupportedValues), - getTestCaseName); diff --git a/inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_version.cpp b/inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_version.cpp deleted file mode 100644 index a9857f629ed..00000000000 --- a/inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_version.cpp +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin_version.hpp" -#include "cldnn_test_data.hpp" - -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, BehaviorPluginTestVersion, ValuesIn(add_element_into_array(supportedValues, BEH_HETERO)), getTestCaseName); diff --git a/inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/plugin_tests/cldnn_test_data.hpp b/inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/plugin_tests/cldnn_test_data.hpp deleted file mode 100644 index 81df192fdda..00000000000 --- a/inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/plugin_tests/cldnn_test_data.hpp +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin.h" -#include - -// correct params -#define BEH_CLDNN BehTestParams("GPU", \ - FuncTestUtils::TestModel::convReluNormPoolFcModelFP32.model_xml_str, \ - FuncTestUtils::TestModel::convReluNormPoolFcModelFP32.weights_blob, \ - Precision::FP32) -#define BEH_HETERO BehTestParams("HETERO", \ - FuncTestUtils::TestModel::convReluNormPoolFcModelFP32.model_xml_str, \ - FuncTestUtils::TestModel::convReluNormPoolFcModelFP32.weights_blob, \ - Precision::FP32) -// for multi-device we are testing the fp16 (as it is supported by all device combos we are considering for testing -// e.g. GPU and VPU, for CPU the network is automatically (internally) converted to fp32. -const std::map multi_device_conf = {{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "GPU"}}; -#define BEH_MULTI BehTestParams("MULTI", \ - FuncTestUtils::TestModel::convReluNormPoolFcModelFP16.model_xml_str, \ - FuncTestUtils::TestModel::convReluNormPoolFcModelFP16.weights_blob, \ - Precision::FP32, \ - multi_device_conf) - -// all parameters are unsupported - reversed -#define BEH_US_ALL_CLDNN BehTestParams("GPU", \ - FuncTestUtils::TestModel::convReluNormPoolFcModelQ78.model_xml_str, \ - FuncTestUtils::TestModel::convReluNormPoolFcModelQ78.weights_blob, \ - Precision::Q78) -#define BEH_US_ALL_MULTI BehTestParams("MULTI", \ - FuncTestUtils::TestModel::convReluNormPoolFcModelQ78.model_xml_str, \ - FuncTestUtils::TestModel::convReluNormPoolFcModelQ78.weights_blob, \ - Precision::Q78, \ - multi_device_conf) - -const BehTestParams supportedValues[] = { - BEH_CLDNN, - BEH_MULTI, -}; - -const BehTestParams requestsSupportedValues[] = { - BEH_CLDNN, - BEH_MULTI, -}; - -const BehTestParams allInputSupportedValues[] = { - BEH_CLDNN, BEH_CLDNN.withIn(Precision::FP16), BEH_CLDNN.withIn(Precision::U8), BEH_CLDNN.withIn(Precision::I16), - BEH_CLDNN.withIn(Precision::I32), - BEH_CLDNN.withIn(Precision::U8).withConfig({{KEY_GPU_THROUGHPUT_STREAMS, GPU_THROUGHPUT_AUTO}}), - BEH_CLDNN.withIn(Precision::FP16).withConfig({{KEY_GPU_THROUGHPUT_STREAMS, GPU_THROUGHPUT_AUTO}}), - BEH_CLDNN.withIn(Precision::I16).withConfig({{KEY_GPU_THROUGHPUT_STREAMS, GPU_THROUGHPUT_AUTO}}), - BEH_CLDNN.withIn(Precision::I32).withConfig({{KEY_GPU_THROUGHPUT_STREAMS, GPU_THROUGHPUT_AUTO}}), - BEH_MULTI, BEH_MULTI.withIn(Precision::FP16), BEH_MULTI.withIn(Precision::U8), BEH_MULTI.withIn(Precision::I16), - BEH_MULTI.withIn(Precision::I32), - BEH_MULTI.withIn(Precision::U8).withConfig({{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "GPU"}, - {KEY_GPU_THROUGHPUT_STREAMS, GPU_THROUGHPUT_AUTO}}), - BEH_MULTI.withIn(Precision::FP16).withConfig({{KEY_GPU_THROUGHPUT_STREAMS, GPU_THROUGHPUT_AUTO}, - {MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "GPU"}}), - BEH_MULTI.withIn(Precision::I16).withConfig({{KEY_GPU_THROUGHPUT_STREAMS, GPU_THROUGHPUT_AUTO}, - {MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "GPU"}}), - BEH_MULTI.withIn(Precision::I32).withConfig({{KEY_GPU_THROUGHPUT_STREAMS, GPU_THROUGHPUT_AUTO}, - {MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "GPU"}}), -}; - -const BehTestParams allOutputSupportedValues[] = { - BEH_CLDNN, BEH_CLDNN.withOut(Precision::FP16), - BEH_CLDNN.withIn(Precision::FP16).withConfig({{KEY_GPU_THROUGHPUT_STREAMS, GPU_THROUGHPUT_AUTO}}), - BEH_MULTI, BEH_MULTI.withOut(Precision::FP16), - BEH_MULTI.withIn(Precision::FP16).withConfig({{KEY_GPU_THROUGHPUT_STREAMS, GPU_THROUGHPUT_AUTO}, - {MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "GPU"}}), -}; - -const BehTestParams typeUnSupportedValues[] = { - BEH_CLDNN.withIn(Precision::Q78), BEH_CLDNN.withIn(Precision::I8), - BEH_MULTI.withIn(Precision::Q78), BEH_MULTI.withIn(Precision::I8), -}; - -const BehTestParams allUnSupportedValues[] = { - BEH_US_ALL_CLDNN, - BEH_US_ALL_MULTI, -}; - -const std::vector withCorrectConfValues = { - BEH_CLDNN.withConfig({{KEY_GPU_THROUGHPUT_STREAMS, GPU_THROUGHPUT_AUTO}}), - BEH_CLDNN.withConfig({{KEY_GPU_THROUGHPUT_STREAMS, "2"}}), - BEH_CLDNN.withConfig({{KEY_PERF_COUNT, NO}}), - /*BEH_CLDNN.withConfig({ { KEY_PERF_COUNT, YES } }),*/ - BEH_CLDNN.withConfig({{KEY_DUMP_KERNELS, NO}}), - BEH_CLDNN.withConfig({{KEY_DUMP_KERNELS, YES}}), - BEH_CLDNN.withConfig({{KEY_TUNING_MODE, TUNING_DISABLED}}), -// Too long inference of AlexNet (980 secs) - BEH_CLDNN.withConfig({{KEY_TUNING_MODE, TUNING_CREATE}, - {KEY_TUNING_FILE, "tfile"}}), - BEH_CLDNN.withConfig({{KEY_DEVICE_ID, "0"}}), - BEH_MULTI.withConfig({{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "GPU"}, - {KEY_GPU_THROUGHPUT_STREAMS, GPU_THROUGHPUT_AUTO}}), - BEH_MULTI.withConfig({{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "GPU"}, - {KEY_GPU_THROUGHPUT_STREAMS, "2"}}), - BEH_MULTI.withConfig({{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "GPU"}, - {KEY_PERF_COUNT, NO}}), - BEH_MULTI.withConfig({{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "GPU"}, - {KEY_DUMP_KERNELS, NO}}), - BEH_MULTI.withConfig({{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "GPU"}, - {KEY_DUMP_KERNELS, YES}}), - BEH_MULTI.withConfig({{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "GPU"}, - {KEY_TUNING_MODE, TUNING_DISABLED}}), - BEH_MULTI.withConfig({{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "GPU"}, - {KEY_TUNING_MODE, TUNING_CREATE}, - {KEY_TUNING_FILE, "tfile"}}), - BEH_MULTI.withConfig({{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "GPU"}, - {KEY_DEVICE_ID, "0"}}), -}; - -const BehTestParams withIncorrectConfValues[] = { - BEH_CLDNN.withConfig({{KEY_GPU_THROUGHPUT_STREAMS, "OFF"}}), - BEH_CLDNN.withConfig({{KEY_PERF_COUNT, "ON"}}), - BEH_CLDNN.withConfig({{KEY_CONFIG_FILE, "unknown_file"}}), - BEH_CLDNN.withConfig({{KEY_DUMP_KERNELS, "ON"}}), - BEH_CLDNN.withConfig({{KEY_TUNING_MODE, "TUNING_UNKNOWN_MODE"}}), - BEH_CLDNN.withConfig({{KEY_DEVICE_ID, "DEVICE_UNKNOWN"}}), - // FIXME: [IE clDNN] The plugin doesn't throw GENERAL_ERROR if use non-exist tuning file. CVS-8593 - //BEH_CLDNN.withConfig({ { KEY_TUNING_MODE, TUNING_USE_EXISTING }, - // { KEY_TUNING_FILE, "unknown_file" } }), - BEH_MULTI.withConfig({{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "GPU"}, - {KEY_GPU_THROUGHPUT_STREAMS, "OFF"}}), - BEH_MULTI.withConfig({{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "GPU"}, - {KEY_PERF_COUNT, "ON"}}), - BEH_MULTI.withConfig({{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "GPU"}, - {KEY_CONFIG_FILE, "unknown_file"}}), - BEH_MULTI.withConfig({{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "GPU"}, - {KEY_DUMP_KERNELS, "ON"}}), - BEH_MULTI.withConfig({{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "GPU"}, - {KEY_TUNING_MODE, "TUNING_UNKNOWN_MODE"}}), - BEH_MULTI.withConfig({{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "GPU"}, - {KEY_DEVICE_ID, "DEVICE_UNKNOWN"}}) -}; - -const std::vector withCorrectConfValuesNetworkOnly = { - BEH_CLDNN.withConfig({{}}), -}; - -const BehTestParams withIncorrectConfKeys[] = { - BEH_CLDNN.withIncorrectConfigItem(), - BEH_MULTI.withIncorrectConfigItem(), -}; diff --git a/inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/skip_tests_config.cpp b/inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/skip_tests_config.cpp deleted file mode 100644 index 8db78c156dc..00000000000 --- a/inference-engine/tests_deprecated/behavior/cldnn/shared_tests_instances/skip_tests_config.cpp +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (C) 2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include -#include - -#include "functional_test_utils/skip_tests_config.hpp" - -std::vector disabledTestPatterns() { - return { - }; -} \ No newline at end of file diff --git a/inference-engine/tests_deprecated/behavior/gna/dummy.cpp b/inference-engine/tests_deprecated/behavior/gna/dummy.cpp new file mode 100644 index 00000000000..3f70c7a4cb9 --- /dev/null +++ b/inference-engine/tests_deprecated/behavior/gna/dummy.cpp @@ -0,0 +1,3 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// diff --git a/inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/cpp_wrappers/holders_tests.cpp b/inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/cpp_wrappers/holders_tests.cpp deleted file mode 100644 index 75e76e2f854..00000000000 --- a/inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/cpp_wrappers/holders_tests.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "holders_tests.hpp" - -INSTANTIATE_TEST_CASE_P(smoke_ReleaseOrderTests, CPP_HoldersTests, testing::Combine(testing::ValuesIn(std::vector> { - // 0 - plugin - // 1 - executable_network - // 2 - infer_request - {0,1,2}, - {0,2,1}, - {1,0,2}, - {1,2,0}, - {2,0,1}, - {2,1,0}, -}), testing::Values(std::string("GNA")))); diff --git a/inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/plugin_tests/behavior_test_plugin.cpp b/inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/plugin_tests/behavior_test_plugin.cpp deleted file mode 100644 index 5e8a3f7110a..00000000000 --- a/inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/plugin_tests/behavior_test_plugin.cpp +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin.h" -#include "behavior_test_plugins.hpp" -#include "gna_test_data.hpp" - -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, BehaviorPluginTest, ValuesIn(supportedValues), - getTestCaseName); -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, BehaviorPluginTestInput, ValuesIn(allInputSupportedValues), - getTestCaseName); -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, BehaviorPluginTestOutput, ValuesIn(allOutputSupportedValues), - getOutputTestCaseName); diff --git a/inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/plugin_tests/behavior_test_plugin_layers.cpp b/inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/plugin_tests/behavior_test_plugin_layers.cpp deleted file mode 100644 index d7dca53f937..00000000000 --- a/inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/plugin_tests/behavior_test_plugin_layers.cpp +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin_layers.hpp" -#include "gna_test_data.hpp" - - -conv_test_params deconv_test_cases[] = { - conv_test_params(CommonTestUtils::DEVICE_GNA, conv_case) -}; - -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, DeconvolutionLayerTest, - ::testing::ValuesIn(deconv_test_cases), - getTestName); - -pool_test_params roi_pool_test_cases[] = { - pool_test_params(CommonTestUtils::DEVICE_GNA, "FP32", pool_case), -}; - -// TODO: fix this -//INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, PoolingLayerTest, -// ::testing::Values(pool_test_params("GNAPlugin", "FP32", pool_case)), -// getTestName); -// -//INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, ReLULayerTest, -// ::testing::Values(activ_test_params("GNAPlugin", "FP32", activation_case)), -// getTestName); - -// FIXME -//#if (defined INSTANTIATE_TESTS) -//INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, MemoryLayerTest, -// ::testing::ValuesIn(memory_test_cases), -// getTestName); -//#endif diff --git a/inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/plugin_tests/behavior_test_plugin_layout.cpp b/inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/plugin_tests/behavior_test_plugin_layout.cpp deleted file mode 100644 index 7e621e71d12..00000000000 --- a/inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/plugin_tests/behavior_test_plugin_layout.cpp +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin_layout.hpp" - -layout_test_params activ_test_cases[] = { -// layout_test_params(CommonTestUtils::DEVICE_GNA, "FP32", Layout::C, power_params({ { 3 } }, 1, 2, 2)), - layout_test_params(CommonTestUtils::DEVICE_GNA, "FP32", Layout::NC, power_params({ { 1, 3 } }, 1, 2, 2)), - layout_test_params(CommonTestUtils::DEVICE_GNA, "FP32", Layout::CHW, power_params({ { 3, 32, 16 } }, 1, 2, 2)), - layout_test_params(CommonTestUtils::DEVICE_GNA, "FP32", Layout::NCHW, power_params({ { 1, 3, 16, 16 } }, 2, 2, 2)), -}; - -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, LayoutTestCanLoadActiv, - ::testing::ValuesIn(activ_test_cases), getTestName); diff --git a/inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/plugin_tests/behavior_test_plugin_unsupported.cpp b/inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/plugin_tests/behavior_test_plugin_unsupported.cpp deleted file mode 100644 index 56b4c501bce..00000000000 --- a/inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/plugin_tests/behavior_test_plugin_unsupported.cpp +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin_unsupported.hpp" -#include "gna_test_data.hpp" - -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, BehaviorPluginTestAllUnsupported, ValuesIn(allUnSupportedValues), - getTestCaseName); - -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, BehaviorPluginTestTypeUnsupported, ValuesIn(typeUnSupportedValues), - getTestCaseName); - INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, BehaviorPluginTestBatchUnsupported, ValuesIn(batchUnSupportedValues), - getTestCaseName); diff --git a/inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/plugin_tests/behavior_test_plugin_version.cpp b/inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/plugin_tests/behavior_test_plugin_version.cpp deleted file mode 100644 index 2900cffb31e..00000000000 --- a/inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/plugin_tests/behavior_test_plugin_version.cpp +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin_version.hpp" -#include "gna_test_data.hpp" - -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, BehaviorPluginTestVersion, ValuesIn(add_element_into_array(supportedValues, BEH_HETERO)), getTestCaseName); diff --git a/inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/plugin_tests/gna_test_data.cpp b/inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/plugin_tests/gna_test_data.cpp deleted file mode 100644 index 341247bb75b..00000000000 --- a/inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/plugin_tests/gna_test_data.cpp +++ /dev/null @@ -1,305 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "gna_test_data.hpp" -#include "single_layer_common.hpp" -#include "common_test_utils/common_layers_params.hpp" -#include "functional_test_utils/test_model/test_model.hpp" - -using TestModel = FuncTestUtils::TestModel::TestModel; - -std::string getRawCnnModel() { - return (R"V0G0N( - - - - - - - 1 - 1056 - - - - - - - - 1 - 1056 - - - - - - 1 - 33 - 1 - 32 - - - - - - - - - 1 - 33 - 1 - 32 - - - - - - 1 - 128 - 1 - 24 - - - - - - - - - - - 1 - 128 - 1 - 24 - - - - - - 1 - 128 - 1 - 8 - - - - - - - - 1 - 128 - 1 - 8 - - - - - - 1 - 1024 - - - - - - - - 1 - 1024 - - - - - - 1 - 1024 - - - - - - - - - - - 1 - 1024 - - - - - 1 - 1024 - - - - - - - - - - - - -)V0G0N"); -} - -TestModel getGnaCnnModel(InferenceEngine::Precision netPrc) { - std::string model_str = getRawCnnModel(); - /* Default values for FP32 are used */ - size_t convWeigthsLen = 38016; // kernel_x * kernel_y * in_channels * out_channels - size_t convWeigthsSize = convWeigthsLen * 4; // 4 (bytes in FP32) - size_t convBiasesLen = 128; // out_channels - size_t convBiasesSize = convBiasesLen * 4; // 4 (bytes in FP32) - size_t scaleShiftWeigthsLen = 1024; // out_channels - size_t scaleShiftWeigthsSize = scaleShiftWeigthsLen * 4; // 4 (bytes in FP32) - size_t scaleShiftBiasesLen = 1024; // out_channels - size_t scaleShiftBiasesSize = scaleShiftBiasesLen * 4; // 4 (bytes in FP32) - switch (netPrc) { - case InferenceEngine::Precision::FP32: - break; - default: - std::string err = "GnaCnnModel can not be constructed with precision "; - err += netPrc.name(); - throw std::runtime_error(err); - } - std::string irName = std::string("GnaCnnModel") + netPrc.name(); - REPLACE_WITH_STR(model_str, "_NAME_", irName); - REPLACE_WITH_NUM(model_str, "_VER_", 2); - REPLACE_WITH_STR(model_str, "_PRC_", netPrc.name()); - REPLACE_WITH_NUM(model_str, "_CONV_WS_", convWeigthsSize); - REPLACE_WITH_NUM(model_str, "_CONV_BS_", convBiasesSize); - REPLACE_WITH_NUM(model_str, "_SS_W_OFFS_", convWeigthsSize + convBiasesSize); - REPLACE_WITH_NUM(model_str, "_SS_WS_", scaleShiftWeigthsSize); - REPLACE_WITH_NUM(model_str, "_SS_B_OFFS_", convWeigthsSize + convBiasesSize + scaleShiftWeigthsSize); - REPLACE_WITH_NUM(model_str, "_SS_BS_", scaleShiftBiasesSize); - return TestModel(model_str, CommonTestUtils::getWeightsBlob( - convWeigthsSize + convBiasesSize + scaleShiftWeigthsSize + scaleShiftBiasesSize)); -} - -std::string getRawMemoryModel() { - return (R"V0G0N( - - - - - - 1 - 10 - - - - - - - - - 1 - 10 - - - - - - - - - 1 - 10 - - - - - - - - 1 - 10 - - - - - 1 - 10 - - - - - - - - - - - 1 - 10 - - - - - - 1 - 10 - - - - - - - - - 1 - 10 - - - - 1 - 10 - - - - - 1 - 10 - - - - - - - - - - - - -)V0G0N"); -} - -TestModel getGnaMemoryModel(InferenceEngine::Precision netPrc) { - std::string model_str = getRawMemoryModel(); - /* Default values for FP32 are used */ - size_t fcBiasesLen = 10; // num of fc_out_channels - size_t fcWeigthsLen = 100; // fc_in_channels * fc_out_channels - size_t fcBiasesSize = fcBiasesLen * 4; // 4 bytes for FP32 - size_t fcWeigthsSize = fcWeigthsLen * 4; // 4 bytes for FP32 - switch (netPrc) { - case InferenceEngine::Precision::FP32: - break; - default: - std::string err = "getGnaMemoryModel can not be constructed with precision "; - err += netPrc.name(); - throw std::runtime_error(err); - } - std::string irName = std::string("GnaMemoryModel") + netPrc.name(); - REPLACE_WITH_STR(model_str, "_NAME_", irName); - REPLACE_WITH_NUM(model_str, "_VER_", 2); - REPLACE_WITH_STR(model_str, "_PRC_", netPrc.name()); - REPLACE_WITH_NUM(model_str, "_FC_BS_", fcBiasesSize); - REPLACE_WITH_NUM(model_str, "_FC_WS_", fcWeigthsSize); - return TestModel(model_str, CommonTestUtils::getWeightsBlob(fcBiasesSize + fcWeigthsSize)); -} diff --git a/inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/plugin_tests/gna_test_data.hpp b/inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/plugin_tests/gna_test_data.hpp deleted file mode 100644 index b6223303a82..00000000000 --- a/inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/plugin_tests/gna_test_data.hpp +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin.h" - -using TestModel = FuncTestUtils::TestModel::TestModel; - -TestModel getGnaCnnModel(InferenceEngine::Precision netPrc); - -TestModel getGnaMemoryModel(InferenceEngine::Precision netPrc); - -const TestModel gnaCnnModelFP32 = getGnaCnnModel(InferenceEngine::Precision::FP32); -const TestModel gnaMemoryModelFP32 = getGnaMemoryModel(InferenceEngine::Precision::FP32); - -// correct params -#define BEH_HETERO BehTestParams("HETERO", \ - FuncTestUtils::TestModel::convReluNormPoolFcModelFP32.model_xml_str, \ - FuncTestUtils::TestModel::convReluNormPoolFcModelFP32.weights_blob, \ - Precision::FP32) -#define BEH_CNN_GNA BehTestParams("GNA", \ - gnaCnnModelFP32.model_xml_str, \ - gnaCnnModelFP32.weights_blob, \ - Precision::FP32) -#define BEH_RNN_GNA BehTestParams("GNA", \ - gnaMemoryModelFP32.model_xml_str, \ - gnaMemoryModelFP32.weights_blob, \ - Precision::FP32) -#define BEH_GNA BEH_RNN_GNA - -// all parameters are unsupported - reversed -#define BEH_US_ALL_GNA BehTestParams("GNA", \ - FuncTestUtils::TestModel::convReluNormPoolFcModelFP16.model_xml_str, \ - FuncTestUtils::TestModel::convReluNormPoolFcModelFP16.weights_blob, \ - Precision::FP16) - -const BehTestParams supportedValues[] = { - BEH_GNA, -}; - -const BehTestParams requestsSupportedValues[] = { - BEH_GNA, -}; - -const BehTestParams allInputSupportedValues[] = { - BEH_GNA, BEH_GNA.withIn(Precision::U8), BEH_GNA.withIn(Precision::I16), -}; - -const BehTestParams allOutputSupportedValues[] = { - BEH_GNA, -}; - -const BehTestParams typeUnSupportedValues[] = { - BEH_RNN_GNA.withIn(Precision::FP16), BEH_RNN_GNA.withIn(Precision::Q78), BEH_RNN_GNA.withIn(Precision::I8), - BEH_RNN_GNA.withIn(Precision::I32), - BEH_CNN_GNA.withIn(Precision::FP16), BEH_CNN_GNA.withIn(Precision::Q78), BEH_CNN_GNA.withIn(Precision::I8), - BEH_CNN_GNA.withIn(Precision::I32), -}; - -const BehTestParams batchUnSupportedValues[] = { - BEH_RNN_GNA.withBatchSize(2), - BEH_CNN_GNA.withBatchSize(2), -}; - -const BehTestParams allUnSupportedValues[] = { - BEH_US_ALL_GNA, -}; - -const std::vector withCorrectConfValues = { - BEH_GNA.withConfig({{KEY_GNA_SCALE_FACTOR, "1.0"}}), - BEH_GNA.withConfig({{KEY_GNA_PRECISION, "I8"}}), - BEH_GNA.withConfig({{KEY_GNA_FIRMWARE_MODEL_IMAGE, "gfile"}}), - BEH_GNA.withConfig({{KEY_GNA_DEVICE_MODE, GNA_AUTO}}), - BEH_GNA.withConfig({{KEY_GNA_DEVICE_MODE, GNA_SW_FP32}}), - BEH_GNA.withConfig({{KEY_GNA_DEVICE_MODE, GNA_SW}}), - BEH_GNA.withConfig({{KEY_GNA_DEVICE_MODE, GNA_SW_EXACT}}), - BEH_GNA.withConfig({{KEY_GNA_COMPACT_MODE, NO}}), -}; - -const std::vector withGnaHwConfValue = { - BEH_GNA.withConfig({{KEY_GNA_DEVICE_MODE, GNA_HW}}), -}; - -const BehTestParams withIncorrectConfValues[] = { - BEH_GNA.withConfig({{KEY_GNA_DEVICE_MODE, GNA_SW_FP32}, - {KEY_GNA_LIB_N_THREADS, "2"}}), - BEH_GNA.withConfig({{KEY_GNA_SCALE_FACTOR, "NAN"}}), - BEH_GNA.withConfig({{KEY_GNA_PRECISION, "FP8"}}), - BEH_GNA.withConfig({{KEY_GNA_DEVICE_MODE, "AUTO"}}), - BEH_GNA.withConfig({{KEY_GNA_COMPACT_MODE, "ON"}}), -}; - -const BehTestParams withIncorrectConfKeys[] = { - BEH_GNA.withIncorrectConfigItem(), - BEH_GNA.withConfigItem({"KEY_KEY_GNA_DEVICE_MODE", GNA_SW}), - BEH_GNA.withConfigItem({"GNA_DEVICE_MODE_XYZ", GNA_SW}), - BEH_GNA.withConfigItem({"KEY_GNA_DEVICE_MODE_XYZ", GNA_SW}), - BEH_GNA.withConfigItem({"KEY_GNA_SCALE_FACTOR_1", GNA_SW}), -}; diff --git a/inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/skip_tests_config.cpp b/inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/skip_tests_config.cpp deleted file mode 100644 index 3a0c5f2bcbc..00000000000 --- a/inference-engine/tests_deprecated/behavior/gna/shared_tests_instances/skip_tests_config.cpp +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (C) 2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include -#include - -#include "functional_test_utils/skip_tests_config.hpp" - -std::vector disabledTestPatterns() { - return { - ".*BehaviorPluginTestInferRequest\\.canRun3AsyncRequestsConsistentlyFromThreadsWithoutWait.*", - - // TODO: FIX BUG 23740 - ".*BehaviorPluginTestInferRequest\\.CanCreateTwoExeNetworks.*", - - // TODO: FIX BUG 26702 - ".*BehaviorPluginTestInferRequest\\.FailedAsyncInferWithNegativeTimeForWait.*", - - // TODO: FIX BUG 23741 - ".*BehaviorPluginTestInferRequest\\.canRun3SyncRequestsConsistentlyFromThreads.*", - - // TODO: FIX BUG 23742 - ".*BehaviorPluginTestInferRequest\\.canWaitWithotStartAsync.*", - - // TODO: FIX BUG 23743 - ".*BehaviorPluginTestInferRequest\\.returnDeviceBusyOnSetBlobAfterAsyncInfer.*", - ".*BehaviorPluginTestInferRequest\\.returnDeviceBusyOnGetBlobAfterAsyncInfer.*", - ".*BehaviorPluginTestInferRequest\\.returnDeviceBusyOnGetPerformanceCountAfterAsyncInfer.*", - ".*BehaviorPluginTestInferRequest\\.returnDeviceBusyOnStartInferAfterAsyncInfer.*", - ".*BehaviorPluginTestInferRequest\\.returnDeviceBusyOnGetUserDataAfterAsyncInfer.*", - ".*BehaviorPluginTestInferRequest\\.returnDeviceBusyOnSetUserDataAfterAsyncInfer.*", - // TODO: FIX BUG 31661 - ".*BehaviorPluginTestInferRequest\\.canStartSeveralAsyncInsideCompletionCallbackNoSafeDtorWithoutWait.*", - }; -} \ No newline at end of file diff --git a/inference-engine/tests_deprecated/behavior/mkldnn/CMakeLists.txt b/inference-engine/tests_deprecated/behavior/mkldnn/CMakeLists.txt index 6b81443c030..3015a304ac4 100644 --- a/inference-engine/tests_deprecated/behavior/mkldnn/CMakeLists.txt +++ b/inference-engine/tests_deprecated/behavior/mkldnn/CMakeLists.txt @@ -32,4 +32,4 @@ target_include_directories(${TARGET_NAME} PRIVATE $> { - // 0 - plugin - // 1 - executable_network - // 2 - infer_request - {0,1,2}, - {0,2,1}, - {1,0,2}, - {1,2,0}, - {2,0,1}, - {2,1,0}, -}), testing::Values(std::string("CPU")))); diff --git a/inference-engine/tests_deprecated/behavior/mkldnn/shared_tests_instances/plugin_tests/behavior_test_plugin.cpp b/inference-engine/tests_deprecated/behavior/mkldnn/shared_tests_instances/plugin_tests/behavior_test_plugin.cpp deleted file mode 100644 index 471137bea84..00000000000 --- a/inference-engine/tests_deprecated/behavior/mkldnn/shared_tests_instances/plugin_tests/behavior_test_plugin.cpp +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin.h" -#include "behavior_test_plugins.hpp" -#include "mkldnn_test_data.hpp" - -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, BehaviorPluginTest, ValuesIn(supportedValues), - getTestCaseName); -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, BehaviorPluginTestInput, ValuesIn(allInputSupportedValues), - getTestCaseName); -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, BehaviorPluginTestOutput, ValuesIn(allOutputSupportedValues), - getOutputTestCaseName); diff --git a/inference-engine/tests_deprecated/behavior/mkldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_layers.cpp b/inference-engine/tests_deprecated/behavior/mkldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_layers.cpp deleted file mode 100644 index 2bd8e2d9df0..00000000000 --- a/inference-engine/tests_deprecated/behavior/mkldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_layers.cpp +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin_layers.hpp" - -pool_test_params roi_pool_test_cases[] = { - pool_test_params(CommonTestUtils::DEVICE_CPU, "FP32", pool_case), -}; - -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, ROIPoolingLayerTest, - ::testing::ValuesIn(roi_pool_test_cases), - getTestName); - -activ_test_params activ_test_cases[] = { - activ_test_params(CommonTestUtils::DEVICE_CPU, "FP32", activation_case), -}; - -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, ActivationLayerTest, - ::testing::ValuesIn(activ_test_cases), - getTestName); - -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, ReLULayerTest, - ::testing::Values(activ_test_params("CPU", "FP32", activation_case)), - getTestName); - -norm_test_params norm_test_cases[] = { - norm_test_params(CommonTestUtils::DEVICE_CPU, "FP32", norm_case), -}; - -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, NormalizeLayerTest, - ::testing::ValuesIn(norm_test_cases), - getTestName); diff --git a/inference-engine/tests_deprecated/behavior/mkldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_layout.cpp b/inference-engine/tests_deprecated/behavior/mkldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_layout.cpp deleted file mode 100644 index efb38cf232a..00000000000 --- a/inference-engine/tests_deprecated/behavior/mkldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_layout.cpp +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin_layout.hpp" - -layout_test_params power_test_cases[] = { - layout_test_params(CommonTestUtils::DEVICE_CPU, "FP32", Layout::C, power_params({ { 3 } }, 2, 2, 2)), - layout_test_params(CommonTestUtils::DEVICE_CPU, "FP32", Layout::NC, power_params({ { 1, 3 } }, 2, 2, 2)), - layout_test_params(CommonTestUtils::DEVICE_CPU, "FP32", Layout::CHW, power_params({ { 3, 32, 16 } }, 2, 2, 2)), - layout_test_params(CommonTestUtils::DEVICE_CPU, "FP32", Layout::NCHW, power_params({ { 1, 3, 16, 16 } }, 2, 2, 2)), -}; - -layout_test_params conv_test_cases[] = { - layout_test_params(CommonTestUtils::DEVICE_CPU, "FP32", Layout::NCHW, power_params({ { 1, 3, 16, 16 } }, 2, 2, 2)), -}; - -layout_test_params conv_neg_test_cases[] = { - layout_test_params(CommonTestUtils::DEVICE_CPU, "FP32", Layout::C, power_params({ { 3 } }, 2, 2, 2)), - layout_test_params(CommonTestUtils::DEVICE_CPU, "FP32", Layout::NC, power_params({ { 1, 3 } }, 2, 2, 2)), - layout_test_params(CommonTestUtils::DEVICE_CPU, "FP32", Layout::CHW, power_params({ { 3, 32, 16 } }, 2, 2, 2)), -}; - -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, LayoutTestCanLoadPower, - ::testing::ValuesIn(power_test_cases), getTestName); -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, LayoutTestCanLoadConv, - ::testing::ValuesIn(conv_test_cases), getTestName); -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, LayoutTestCanNotLoadConv, - ::testing::ValuesIn(conv_neg_test_cases), getTestName); diff --git a/inference-engine/tests_deprecated/behavior/mkldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_unsupported.cpp b/inference-engine/tests_deprecated/behavior/mkldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_unsupported.cpp deleted file mode 100644 index 9ca1d5d601c..00000000000 --- a/inference-engine/tests_deprecated/behavior/mkldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_unsupported.cpp +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin_unsupported.hpp" -#include "mkldnn_test_data.hpp" - -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, BehaviorPluginTestAllUnsupported, ValuesIn(allUnSupportedValues), - getTestCaseName); - -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, BehaviorPluginTestTypeUnsupported, ValuesIn(typeUnSupportedValues), - getTestCaseName); diff --git a/inference-engine/tests_deprecated/behavior/mkldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_version.cpp b/inference-engine/tests_deprecated/behavior/mkldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_version.cpp deleted file mode 100644 index 3811e22f627..00000000000 --- a/inference-engine/tests_deprecated/behavior/mkldnn/shared_tests_instances/plugin_tests/behavior_test_plugin_version.cpp +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin_version.hpp" -#include "mkldnn_test_data.hpp" - -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, BehaviorPluginTestVersion, ValuesIn(add_element_into_array(supportedValues, BEH_HETERO)), getTestCaseName); diff --git a/inference-engine/tests_deprecated/behavior/mkldnn/shared_tests_instances/plugin_tests/mkldnn_test_data.hpp b/inference-engine/tests_deprecated/behavior/mkldnn/shared_tests_instances/plugin_tests/mkldnn_test_data.hpp deleted file mode 100644 index 71539e2ea1b..00000000000 --- a/inference-engine/tests_deprecated/behavior/mkldnn/shared_tests_instances/plugin_tests/mkldnn_test_data.hpp +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin.h" - -// correct params -#define BEH_MKLDNN BehTestParams("CPU", \ - FuncTestUtils::TestModel::convReluNormPoolFcModelFP32.model_xml_str, \ - FuncTestUtils::TestModel::convReluNormPoolFcModelFP32.weights_blob, \ - Precision::FP32) -#define BEH_MKLDNN_FP16 BehTestParams("CPU", \ - FuncTestUtils::TestModel::convReluNormPoolFcModelFP16.model_xml_str, \ - FuncTestUtils::TestModel::convReluNormPoolFcModelFP16.weights_blob, \ - Precision::FP16) -#define BEH_HETERO BehTestParams("HETERO", \ - FuncTestUtils::TestModel::convReluNormPoolFcModelFP32.model_xml_str, \ - FuncTestUtils::TestModel::convReluNormPoolFcModelFP32.weights_blob, \ - Precision::FP32) -// for multi-device we are testing the fp16 (as it is supported by all device combos we are considering for testing -// e.g. GPU and VPU, for CPU the network is automatically (internally) converted to fp32. -// Yet the input precision FP16 is not supported by the CPU yet -const std::map multi_device_conf = {{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "CPU"}}; -#define BEH_MULTI BehTestParams("MULTI", \ - FuncTestUtils::TestModel::convReluNormPoolFcModelFP16.model_xml_str, \ - FuncTestUtils::TestModel::convReluNormPoolFcModelFP16.weights_blob, \ - Precision::FP32, \ - multi_device_conf) - -// all parameters are unsupported - reversed -#define BEH_US_ALL_MKLDNN BehTestParams("CPU", \ - FuncTestUtils::TestModel::convReluNormPoolFcModelQ78.model_xml_str, \ - FuncTestUtils::TestModel::convReluNormPoolFcModelQ78.weights_blob, \ - Precision::Q78) -#define BEH_US_ALL_MULTI BehTestParams("MULTI", \ - FuncTestUtils::TestModel::convReluNormPoolFcModelQ78.model_xml_str, \ - FuncTestUtils::TestModel::convReluNormPoolFcModelQ78.weights_blob, \ - Precision::Q78, \ - multi_device_conf) - -const BehTestParams supportedValues[] = { - BEH_MKLDNN, - BEH_MULTI, -}; - -const BehTestParams requestsSupportedValues[] = { - BEH_MKLDNN, - // the following adds additional test the MKLDNNGraphlessInferRequest (explicitly created for streams) - BEH_MKLDNN.withConfig({{KEY_CPU_THROUGHPUT_STREAMS, CPU_THROUGHPUT_AUTO}}), - BEH_MKLDNN.withConfig({{CONFIG_KEY(CPU_THROUGHPUT_STREAMS),"0"}, - {CONFIG_KEY(CPU_THREADS_NUM), "1"}}), - BEH_MULTI, -}; - -const BehTestParams allInputSupportedValues[] = { - BEH_MKLDNN, BEH_MKLDNN.withIn(Precision::U8), BEH_MKLDNN.withIn(Precision::U16), - BEH_MKLDNN.withIn(Precision::I16), - // the following list withConfig tests the MKLDNNGraphlessInferRequest (explicitly created for streams) - BEH_MKLDNN.withIn(Precision::U8).withConfig({{KEY_CPU_THROUGHPUT_STREAMS, CPU_THROUGHPUT_AUTO}}), - BEH_MKLDNN.withIn(Precision::U16).withConfig({{KEY_CPU_THROUGHPUT_STREAMS, CPU_THROUGHPUT_AUTO}}), - BEH_MKLDNN.withIn(Precision::I16).withConfig({{KEY_CPU_THROUGHPUT_STREAMS, CPU_THROUGHPUT_AUTO}}), - BEH_MKLDNN_FP16.withIn(Precision::FP32), - BEH_MKLDNN_FP16.withIn(Precision::U8), - BEH_MKLDNN_FP16.withIn(Precision::U16), - BEH_MKLDNN_FP16.withIn(Precision::I16), - // the following list withConfig tests the MKLDNNGraphlessInferRequest (explicitly created for streams) - BEH_MKLDNN_FP16.withIn(Precision::FP32).withConfig({{KEY_CPU_THROUGHPUT_STREAMS, CPU_THROUGHPUT_AUTO}}), - BEH_MKLDNN_FP16.withIn(Precision::U8).withConfig({{KEY_CPU_THROUGHPUT_STREAMS, CPU_THROUGHPUT_AUTO}}), - BEH_MKLDNN_FP16.withIn(Precision::U16).withConfig({{KEY_CPU_THROUGHPUT_STREAMS, CPU_THROUGHPUT_AUTO}}), - BEH_MKLDNN_FP16.withIn(Precision::I16).withConfig({{KEY_CPU_THROUGHPUT_STREAMS, CPU_THROUGHPUT_AUTO}}), - BEH_MULTI, - BEH_MULTI.withIn(Precision::U8), - BEH_MULTI.withIn(Precision::U16), - BEH_MULTI.withIn(Precision::I16), - BEH_MULTI.withIn(Precision::U8).withConfig({{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "CPU"}, - {KEY_CPU_THROUGHPUT_STREAMS, CPU_THROUGHPUT_AUTO}}), - BEH_MULTI.withIn(Precision::U16).withConfig({{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "CPU"}, - {KEY_CPU_THROUGHPUT_STREAMS, CPU_THROUGHPUT_AUTO}}), - BEH_MULTI.withIn(Precision::I16).withConfig({{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "CPU"}, - {KEY_CPU_THROUGHPUT_STREAMS, CPU_THROUGHPUT_AUTO}}), -}; - -const BehTestParams allOutputSupportedValues[] = { - BEH_MKLDNN, - // the following withConfig test checks the MKLDNNGraphlessInferRequest (explicitly created for streams) - BEH_MKLDNN.withConfig({{KEY_CPU_THROUGHPUT_STREAMS, CPU_THROUGHPUT_AUTO}}), - BEH_MULTI.withOut(Precision::FP32), - BEH_MULTI.withConfig({{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "CPU"}, - {KEY_CPU_THROUGHPUT_STREAMS, CPU_THROUGHPUT_AUTO}}), -}; - -const BehTestParams typeUnSupportedValues[] = { - BEH_MKLDNN.withIn(Precision::Q78), - BEH_MKLDNN_FP16, - BEH_MULTI.withIn(Precision::Q78), -}; - -const BehTestParams allUnSupportedValues[] = { - BEH_US_ALL_MKLDNN, - BEH_US_ALL_MULTI, -}; - -const std::vector withCorrectConfValues = { - BEH_MKLDNN.withConfig({{KEY_CPU_THROUGHPUT_STREAMS, CPU_THROUGHPUT_NUMA}}), - BEH_MKLDNN.withConfig({{KEY_CPU_THROUGHPUT_STREAMS, CPU_THROUGHPUT_AUTO}}), - BEH_MKLDNN.withConfig({{KEY_CPU_THROUGHPUT_STREAMS, "8"}}), - BEH_MKLDNN.withConfig({{KEY_CPU_BIND_THREAD, NO}}), - BEH_MKLDNN.withConfig({{KEY_CPU_BIND_THREAD, YES}}), - BEH_MKLDNN.withConfig({{KEY_DYN_BATCH_LIMIT, "10"}}), - BEH_MULTI.withConfig({{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "CPU"}, - {KEY_CPU_THROUGHPUT_STREAMS, CPU_THROUGHPUT_NUMA}}), - BEH_MULTI.withConfig({{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "CPU"}, - {KEY_CPU_THROUGHPUT_STREAMS, CPU_THROUGHPUT_AUTO}}), - BEH_MULTI.withConfig({{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "CPU"}, - {KEY_CPU_THROUGHPUT_STREAMS, "8"}}), - BEH_MULTI.withConfig({{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "CPU"}, - {KEY_CPU_BIND_THREAD, NO}}), - BEH_MULTI.withConfig({{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "CPU"}, - {KEY_CPU_BIND_THREAD, YES}}), - BEH_MULTI.withConfig({{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "CPU"}, - {KEY_DYN_BATCH_LIMIT, "10"}}), -}; - -const BehTestParams withIncorrectConfValues[] = { - BEH_MKLDNN.withConfig({{KEY_CPU_THROUGHPUT_STREAMS, "OFF"}}), - BEH_MKLDNN.withConfig({{KEY_CPU_BIND_THREAD, "OFF"}}), - BEH_MKLDNN.withConfig({{KEY_DYN_BATCH_LIMIT, "NAN"}}), - BEH_MULTI.withConfig({{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "CPU"}, - {KEY_CPU_THROUGHPUT_STREAMS, "OFF"}}), - BEH_MULTI.withConfig({{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "CPU"}, - {KEY_CPU_BIND_THREAD, "OFF"}}), - BEH_MULTI.withConfig({{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "CPU"}, - {KEY_DYN_BATCH_LIMIT, "NAN"}}), -}; - -const std::vector withCorrectConfValuesPluginOnly; - -const std::vector withCorrectConfValuesNetworkOnly = { - BEH_MKLDNN.withConfig({}), - BEH_MULTI -}; - -const BehTestParams withIncorrectConfKeys[] = { - BEH_MKLDNN.withIncorrectConfigItem(), - BEH_MULTI.withIncorrectConfigItem(), -}; diff --git a/inference-engine/tests_deprecated/behavior/mkldnn/shared_tests_instances/skip_tests_config.cpp b/inference-engine/tests_deprecated/behavior/mkldnn/shared_tests_instances/skip_tests_config.cpp deleted file mode 100644 index 8db78c156dc..00000000000 --- a/inference-engine/tests_deprecated/behavior/mkldnn/shared_tests_instances/skip_tests_config.cpp +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (C) 2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include -#include - -#include "functional_test_utils/skip_tests_config.hpp" - -std::vector disabledTestPatterns() { - return { - }; -} \ No newline at end of file diff --git a/inference-engine/tests_deprecated/behavior/shared_tests/CMakeLists.txt b/inference-engine/tests_deprecated/behavior/shared_tests/CMakeLists.txt index 942efa46e29..ac558570ef0 100644 --- a/inference-engine/tests_deprecated/behavior/shared_tests/CMakeLists.txt +++ b/inference-engine/tests_deprecated/behavior/shared_tests/CMakeLists.txt @@ -8,7 +8,7 @@ set(TARGET_NAME IEBehaviorSharedTests) disable_deprecated_warnings() file(GLOB_RECURSE SHARED_TESTS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp) + ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp) add_library(${TARGET_NAME} STATIC ${SHARED_TESTS_SRC}) add_dependencies(${TARGET_NAME} MultiDevicePlugin inference_engine_preproc) @@ -30,8 +30,7 @@ target_link_libraries(${TARGET_NAME} PUBLIC gmock) target_include_directories(${TARGET_NAME} PUBLIC ${IE_MAIN_SOURCE_DIR}/src/vpu/graph_transformer/include $ - ${CMAKE_CURRENT_SOURCE_DIR}/plugin_tests - ${CMAKE_CURRENT_SOURCE_DIR}/cpp_wrappers) + ${CMAKE_CURRENT_SOURCE_DIR}/plugin_tests) # developer package ie_developer_export_targets(${TARGET_NAME}) diff --git a/inference-engine/tests_deprecated/behavior/shared_tests/cpp_wrappers/holders_tests.hpp b/inference-engine/tests_deprecated/behavior/shared_tests/cpp_wrappers/holders_tests.hpp deleted file mode 100644 index f66d1444257..00000000000 --- a/inference-engine/tests_deprecated/behavior/shared_tests/cpp_wrappers/holders_tests.hpp +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include -#include - -#include "common_test_utils/xml_net_builder/xml_net_builder.hpp" - -using namespace InferenceEngine; - -#define EXPECT_NO_CRASH(_statement) \ -EXPECT_EXIT(_statement; exit(0), testing::ExitedWithCode(0), "") - -void release_order_test(std::vector order, const std::string & deviceName) { - SizeVector dims {1,3,3,3}; - std::map attr { - {"power", "1"}, - {"scale", "-1"}, - {"shift", "0"} - }; - - auto model = CommonTestUtils::V2NetBuilder::buildNetworkWithOneInput("RNN_Net", dims, "FP32") - .addLayer("Power", "FP32", &attr, {{dims}, {dims}}) - .finish(); - - CNNNetwork net; - - { - Core reader; - net = reader.ReadNetwork(model, Blob::CPtr()); - } - - Core core; - auto exe_net = core.LoadNetwork(net, deviceName); - auto request = exe_net.CreateInferRequest(); - - auto release = [&] (int i) { - switch (i) { - case 0: core = Core{}; break; - case 1: exe_net = {}; break; - case 2: request = {}; break; - default: break; - } - }; - - for (auto i : order) - release(i); -} - -class CPP_HoldersTests : public ::testing::TestWithParam, std::string>> { -public: - void SetUp() override { - order = std::get<0>(GetParam()); - deviceName = std::get<1>(GetParam()); - - deathTestStyle = ::testing::GTEST_FLAG(death_test_style); - if (deathTestStyle == "fast" && deviceName == "MYRIAD") { - // Default death test mode "fast" must be used in single-threaded context only. - // "MyriadBehaviorTests" links "XLink" library that statically initializes "libusb". - // Which in turn creates a thread. - ::testing::GTEST_FLAG(death_test_style) = "threadsafe"; - } - } - - void TearDown() override { - ::testing::GTEST_FLAG(death_test_style) = deathTestStyle; - } - - std::string deviceName; - std::vector order; - -private: - std::string deathTestStyle; -}; - -TEST_P(CPP_HoldersTests, Orders) { - // Test failed if crash happens - EXPECT_NO_CRASH(release_order_test(order, deviceName)); -} diff --git a/inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin.cpp b/inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin.cpp new file mode 100644 index 00000000000..3f70c7a4cb9 --- /dev/null +++ b/inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin.cpp @@ -0,0 +1,3 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// diff --git a/inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin.h b/inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin.h index a1e593e3014..c99b02a8c25 100644 --- a/inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin.h +++ b/inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin.h @@ -28,20 +28,6 @@ using namespace InferenceEngine::PluginConfigParams; using namespace InferenceEngine::VPUConfigParams; using namespace InferenceEngine::GNAConfigParams; -namespace { -inline std::string getModelName(std::string strXML) { - auto itBegin = strXML.find("", itBegin + 1); - auto substr = strXML.substr(itBegin + 1, itEnd - itBegin - 1); - - itBegin = substr.find("\""); - itEnd = substr.find("\"", itBegin + 1); - substr = substr.substr(itBegin + 1, itEnd - itBegin - 1); - - return substr; -} -} - class BehTestParams { public: std::string device; @@ -85,11 +71,6 @@ public: return *this; } - BehTestParams &withConfigItem(std::pair _config_item) { - config.insert(_config_item); - return *this; - } - BehTestParams &withIncorrectConfigItem() { config.insert({"some_nonexistent_key", "some_unknown_value"}); return *this; @@ -115,114 +96,9 @@ protected: StatusCode sts; InferenceEngine::ResponseDesc response; - static Blob::Ptr makeNotAllocatedBlob(Precision eb, Layout l, const SizeVector &dims); - - void setInputNetworkPrecision(CNNNetwork &network, InputsDataMap &inputs_info, - Precision input_precision); - - void setOutputNetworkPrecision(CNNNetwork &network, OutputsDataMap &outputs_info, - Precision output_precision); -}; - -class BehaviorPluginTestAllUnsupported : public BehaviorPluginTest { -}; - -class BehaviorPluginTestTypeUnsupported : public BehaviorPluginTest { -}; - -class BehaviorPluginTestBatchUnsupported : public BehaviorPluginTest { -}; - -class BehaviorPluginCorrectConfigTest : public BehaviorPluginTest { -}; - -class BehaviorPluginIncorrectConfigTest : public BehaviorPluginTest { -}; - -class BehaviorPluginIncorrectConfigTestInferRequestAPI : public BehaviorPluginTest { -}; - -class BehaviorPluginCorrectConfigTestInferRequestAPI : public BehaviorPluginTest { -}; - -class BehaviorPluginTestVersion : public BehaviorPluginTest { -}; - -class BehaviorPluginTestInferRequest : public BehaviorPluginTest { -public: - struct TestEnv { - // Intentionally defined Core before IInferRequest. - // Otherwise plugin will be freed with unloading dll before freeing IInferRequest::Ptr and that will cause memory corruption. - // TODO: the same story with IExecutableNetwork and IInferRequest, shared syncEnv object may cause seg fault, - // if IExecutableNetwork was freed before IInferRequest - InferenceEngine::Core core; - InferenceEngine::ExecutableNetwork exeNetwork; - IInferRequest::Ptr inferRequest; - InferenceEngine::InferRequest actualInferRequest; - CNNNetwork network; - InputInfo::Ptr networkInput; - DataPtr networkOutput; - SizeVector inputDims; - SizeVector outputDims; - std::string inputName; - std::string outputName; - typedef std::shared_ptr Ptr; - }; - - static Blob::Ptr prepareInputBlob(Precision blobPrecision, SizeVector inputDims); - -protected: - Blob::Ptr _prepareOutputBlob(Precision blobPrecision, SizeVector outputDims); - - void _setInputPrecision( - const BehTestParams ¶m, - CNNNetwork &cnnNetwork, - TestEnv::Ptr &testEnv, - const size_t expectedNetworkInputs = 0); - - void _setOutputPrecision( - const BehTestParams ¶m, - CNNNetwork &cnnNetwork, - TestEnv::Ptr &testEnv, - const size_t expectedNetworkOutputs = 0); - - void _createAndCheckInferRequest( - const BehTestParams ¶m, - TestEnv::Ptr &testEnv, - const std::map &config = {}, - const size_t expectedNetworkInputs = 1, - const size_t expectedNetworkOutputs = 1, - InferenceEngine::IExtensionPtr extension = nullptr); - - bool _wasDeviceBusy(ResponseDesc response); - }; class FPGAHangingTest : public BehaviorPluginTest { }; -class BehaviorPluginTestInferRequestInput : public BehaviorPluginTestInferRequest { -}; - -class BehaviorPluginTestInferRequestOutput : public BehaviorPluginTestInferRequest { -}; - -class BehaviorPluginTestInferRequestConfig : public BehaviorPluginTestInferRequest { -}; - -class BehaviorPluginTestInferRequestConfigExclusiveAsync : public BehaviorPluginTestInferRequest { -}; - -class BehaviorPluginTestInferRequestCallback : public BehaviorPluginTestInferRequest { -}; - -class BehaviorPluginTestExecGraphInfo : public BehaviorPluginTestInferRequest { -}; - -class BehaviorPluginTestPerfCounters : public BehaviorPluginTestInferRequest { -}; - -class BehaviorPluginTestPreProcess : public BehaviorPluginTestInferRequest { -}; - -#endif +#endif \ No newline at end of file diff --git a/inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin_infer_request_fixture.cpp b/inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin_infer_request_fixture.cpp deleted file mode 100644 index d9cf3f34d78..00000000000 --- a/inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin_infer_request_fixture.cpp +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin.h" -#include "details/ie_cnn_network_tools.h" - -using namespace std; -using namespace ::testing; -using namespace InferenceEngine; -using namespace InferenceEngine::details; - -Blob::Ptr BehaviorPluginTestInferRequest::prepareInputBlob(Precision blobPrecision, SizeVector inputDims) { - auto input = makeNotAllocatedBlob(blobPrecision, TensorDesc::getLayoutByDims(inputDims), inputDims); - input->allocate(); - return input; -} - -Blob::Ptr BehaviorPluginTestInferRequest::_prepareOutputBlob(Precision blobPrecision, SizeVector outputDims) { - auto output = makeNotAllocatedBlob(blobPrecision, TensorDesc::getLayoutByDims(outputDims), outputDims); - output->allocate(); - return output; -} - -void BehaviorPluginTestInferRequest::_setInputPrecision( - const BehTestParams ¶m, - CNNNetwork &cnnNetwork, - TestEnv::Ptr &testEnv, - const size_t expectedNetworkInputs) { - - InputsDataMap networkInputs = cnnNetwork.getInputsInfo(); - if (expectedNetworkInputs != 0) { - ASSERT_EQ(networkInputs.size(), expectedNetworkInputs); - } - testEnv->networkInput = networkInputs.begin()->second; - testEnv->networkInput->setPrecision(param.input_blob_precision); - testEnv->inputDims = testEnv->networkInput->getTensorDesc().getDims(); - testEnv->inputName = networkInputs.begin()->first; -} - -void BehaviorPluginTestInferRequest::_setOutputPrecision( - const BehTestParams ¶m, - CNNNetwork &cnnNetwork, - TestEnv::Ptr &testEnv, - const size_t expectedNetworkOutputs) { - - OutputsDataMap networkOutputs = cnnNetwork.getOutputsInfo(); - if (expectedNetworkOutputs != 0) { - ASSERT_EQ(networkOutputs.size(), expectedNetworkOutputs); - } - testEnv->networkOutput = networkOutputs.begin()->second; - testEnv->networkOutput->setPrecision(param.output_blob_precision); - testEnv->outputDims = testEnv->networkOutput->getTensorDesc().getDims(); - testEnv->outputName = networkOutputs.begin()->first; -} - -void BehaviorPluginTestInferRequest::_createAndCheckInferRequest( - const BehTestParams ¶m, - TestEnv::Ptr &testEnv, - const std::map &config, - const size_t expectedNetworkInputs, - const size_t expectedNetworkOutputs, - InferenceEngine::IExtensionPtr extension) { - - testEnv = make_shared(); - if (extension) { - ASSERT_NO_THROW(testEnv->core.AddExtension(extension)); - } - - testEnv->network = testEnv->core.ReadNetwork(param.model_xml_str, param.weights_blob); - /* Call conversion from CNNNetwork NgraphImpl to CNNNetwork */ - testEnv->network.begin(); - - _setInputPrecision(param, testEnv->network, testEnv, expectedNetworkInputs); - _setOutputPrecision(param, testEnv->network, testEnv, expectedNetworkOutputs); - - std::map full_config = config; - full_config.insert(param.config.begin(), param.config.end()); - -#ifdef DUMP_EXECUTION_GRAPH - full_config[PluginConfigParams::KEY_DUMP_EXEC_GRAPH_AS_DOT] = "behavior_tests_execution_graph_dump"; -#endif - - try { - testEnv->exeNetwork = testEnv->core.LoadNetwork(testEnv->network, param.device, full_config); - } catch (InferenceEngineException ex) { - std::cout << "LoadNetwork failed. Status: " << ex.getStatus() << ", Response: " << ex.what(); - throw ex; - } catch (std::exception ex) { - std::cout << "LoadNetwork failed. Exception: " << typeid(ex).name() << ", what(): " << ex.what() << std::endl; - throw; - } catch (...) { - std::cout << "LoadNetwork failed with unknown reason."; - throw; - } - testEnv->actualInferRequest = testEnv->exeNetwork.CreateInferRequest(); - testEnv->inferRequest = static_cast(testEnv->actualInferRequest); -} - -bool BehaviorPluginTestInferRequest::_wasDeviceBusy(ResponseDesc response) { - std::cout << response.msg << "\n"; - std::string refError = REQUEST_BUSY_str; - response.msg[refError.length()] = '\0'; - return !refError.compare(response.msg); -} diff --git a/inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin_layers.hpp b/inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin_layers.hpp deleted file mode 100644 index e90a45906a5..00000000000 --- a/inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin_layers.hpp +++ /dev/null @@ -1,931 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin.h" -#include "common_test_utils/xml_net_builder/xml_net_builder.hpp" - -using namespace std; -using namespace CommonTestUtils; -using namespace InferenceEngine; -using namespace InferenceEngine::details; - -struct in_params_c { - struct { - size_t c; - } in; -}; - -struct in_params_nc { - struct { - size_t n; - size_t c; - } in; -}; - -struct in_params_chw { - struct { - size_t c; - size_t h; - size_t w; - } in; -}; - -struct in_params_nchw { - struct { - size_t n; - size_t c; - size_t h; - size_t w; - } in; -}; - -struct str_params { - struct { - size_t w; - size_t h; - } str; -}; - -struct krn_params { - struct { - size_t w; - size_t h; - } krn; -}; - -struct pad_params { - struct { - size_t w; - size_t h; - } pad; -}; - -struct base_test_params { - std::string device; - std::string precision; - - base_test_params(std::string name, std::string _precision = "FP32") { - device = name; - precision = _precision; - } -}; - -struct conv_params : in_params_chw, krn_params, str_params, pad_params { - size_t out_c; - size_t grp_c; - - struct out_struct { - size_t w; - size_t h; - } out; - - conv_params(in_params_chw in, - krn_params krn, - str_params str, - pad_params pad, - size_t _out_c, - size_t _grp_c, - out_struct _out = {}) : - in_params_chw(in), krn_params(krn), str_params(str), pad_params(pad) { - out_c = _out_c; - grp_c = _grp_c; - out = _out; - } -}; - -struct conv_test_params : conv_params, base_test_params { - conv_test_params(std::string name, conv_params params) : - conv_params(params), base_test_params(name) {} -}; - -template -class LayerTestsCommon : public TestsCommon, - public testing::WithParamInterface { -protected: -}; - -template -std::string getTestName(testing::TestParamInfo obj) { - return obj.param.device; -} - -IE_SUPPRESS_DEPRECATED_START -class ConvolutionLayerTest : public LayerTestsCommon { -protected: - std::string getModel(const conv_test_params& p) { - std::map params = { - {"stride-x", std::to_string(p.str.w)}, - {"stride-y", std::to_string(p.str.h)}, - {"pad-x", std::to_string(p.pad.w)}, - {"pad-y", std::to_string(p.pad.h)}, - {"kernel-x", std::to_string(p.krn.w)}, - {"kernel-y", std::to_string(p.krn.h)}, - {"output", std::to_string(p.out_c)}, - {"group", std::to_string(p.grp_c)} - }; - size_t out_h = p.out.h == 0 ? - (p.in.h + 2 * p.pad.h - p.krn.h) / p.str.h + 1 : p.out.h; - size_t out_w = p.out.w == 0 ? - (p.in.w + 2 * p.pad.w - p.krn.w) / p.str.w + 1 : p.out.w; - InOutShapes inout = {{{p.in.c, p.in.h, p.in.w}}, - {{p.out_c, out_h, out_w}}}; - - size_t weights = (p.krn.w * p.krn.h * p.out_c * p.in.c / p.grp_c) * - sizeof(float); - size_t biases = p.out_c * sizeof(float); - - V2NetBuilder model = V2NetBuilder::buildNetworkWithOneInput( - "Convolution_Only", inout.inDims[0], p.precision) - .addLayer("Convolution", p.precision, ¶ms, inout, weights, biases); - return model.finish(); - } - - InferenceEngine::TBlob::Ptr GetNetworkWeights(const conv_test_params& p) { - TBlob* weights = new TBlob( - { Precision::U8, { - (p.krn.w * p.krn.h * p.out_c * p.in.c / p.grp_c + p.out_c) - * sizeof(float)}, Layout::C} ); - weights->allocate(); - fill_data(weights->buffer().as(), - weights->size() / sizeof(float)); - TBlob::Ptr weights_ptr = TBlob::Ptr(weights); - - return weights_ptr; - } -}; - -class DeconvolutionLayerTest : public ConvolutionLayerTest { -protected: - std::string getModel(const conv_test_params& p) { - std::map params = { - {"stride-x", std::to_string(p.str.w)}, - {"stride-y", std::to_string(p.str.h)}, - {"pad-x", std::to_string(p.pad.w)}, - {"pad-y", std::to_string(p.pad.h)}, - {"kernel-x", std::to_string(p.krn.w)}, - {"kernel-y", std::to_string(p.krn.h)}, - {"output", std::to_string(p.out_c)}, - {"group", std::to_string(p.grp_c)} - }; - size_t out_h = p.out.h == 0 ? - (p.in.h + 2 * p.pad.h - p.krn.h) / p.str.h + 1 : p.out.h; - size_t out_w = p.out.w == 0 ? - (p.in.w + 2 * p.pad.w - p.krn.w) / p.str.w + 1 : p.out.w; - InOutShapes inout = {{{p.in.c, p.in.h, p.in.w}}, - {{p.out_c, out_h, out_w}}}; - - size_t weights = (p.krn.w * p.krn.h * p.out_c * p.in.c / p.grp_c) * - sizeof(float); - - V2NetBuilder model = V2NetBuilder::buildNetworkWithOneInput( - "Deconvolution_Only", inout.inDims[0], p.precision) - .addLayer("Deconvolution", p.precision, ¶ms, inout, weights); - return model.finish(); - } -}; - -TEST_P(ConvolutionLayerTest, CanNotLoadConvLayer) { - auto param = GetParam(); - string ref_error = (param.device == CommonTestUtils::DEVICE_FPGA) ? - "Graph is not supported on FPGA" : "Unsupported layer: Convolution1:Convolution"; - - InferenceEngine::Core core; - auto network = core.ReadNetwork(getModel(param), GetNetworkWeights(param)); - - try { - ExecutableNetwork exeNetwork = core.LoadNetwork(network, param.device, {}); - } catch (InferenceEngineException ex) { - ASSERT_EQ(ex.getStatus(), StatusCode::GENERAL_ERROR); - ASSERT_STR_CONTAINS(ex.what(), ref_error); - } -} - -TEST_P(DeconvolutionLayerTest, CanNotLoadDeconvLayer) { - auto param = GetParam(); - string ref_error = (param.device == CommonTestUtils::DEVICE_FPGA) - ? "Graph is not supported on FPGA" - : (param.device == CommonTestUtils::DEVICE_GNA) - ? "[GNAPlugin] in function LoadNetwork: The plugin does not support layer: Deconvolution1:Deconvolution\n" - : "Unsupported layer: Deconvolution1:Deconvolution"; - - InferenceEngine::Core core; - auto network = core.ReadNetwork(getModel(param), GetNetworkWeights(param)); - - try { - ExecutableNetwork exeNetwork = core.LoadNetwork(network, param.device, {}); - } catch (InferenceEngineException ex) { - ASSERT_EQ(ex.getStatus(), StatusCode::GENERAL_ERROR); - ASSERT_STR_CONTAINS(ex.what(), ref_error); - } - -} - -#define conv_case conv_params({{32, 16, 9}, {1, 1}, {1, 1}, {0, 0}, 17, 1}) -#define conv_dw_case conv_params({{32, 16, 9}, {1, 1}, {2, 2}, {0, 0}, 512, 512}) - -struct pool_params : in_params_nchw, krn_params, str_params, pad_params { - pool_params(in_params_nchw in, krn_params krn, str_params str, pad_params pad) : - in_params_nchw(in), krn_params(krn), str_params(str), pad_params(pad) {} -}; - -struct pool_test_params : pool_params, base_test_params { - pool_test_params(std::string name, std::string pr, pool_params params) : - pool_params(params), base_test_params(name, pr) {} -}; - -class PoolingLayerTest : public LayerTestsCommon { -protected: - std::string getModel(const pool_test_params& p) { - std::map params = { - {"stride-x", std::to_string(p.str.w)}, - {"stride-y", std::to_string(p.str.h)}, - {"pad-x", std::to_string(p.pad.w)}, - {"pad-y", std::to_string(p.pad.h)}, - {"kernel-x", std::to_string(p.krn.w)}, - {"kernel-y", std::to_string(p.krn.h)}, - {"method", "MAX"}, - {"round", "Ceil"} - }; - - size_t out_h = (p.in.h + 2 * p.pad.h - p.krn.h) / p.str.h + 1; - size_t out_w = (p.in.w + 2 * p.pad.w - p.krn.w) / p.str.w + 1; - InOutShapes inout = { - {{p.in.n, p.in.c, p.in.h, p.in.w}}, - {{p.in.n, p.in.c, out_h, out_w}} - }; - - V2NetBuilder model = V2NetBuilder::buildNetworkWithOneInput( - "Pooling_Only", inout.inDims[0], p.precision) - .addLayer("Pooling", p.precision, ¶ms, inout); - return model.finish(); - } -}; - -class ROIPoolingLayerTest : public LayerTestsCommon { -protected: - std::string getROIPoolingModel(const pool_test_params& p) { - - size_t out_h = (p.in.h + 2 * p.pad.h - p.krn.h) / p.str.h + 1; - size_t out_w = (p.in.w + 2 * p.pad.w - p.krn.w) / p.str.w + 1; - InOutShapes inout = { - {{p.in.n, p.in.c, p.in.h, p.in.w}, {p.in.n, p.in.c}}, - {{p.in.n, p.in.c, out_h, out_w}} - }; - std::map params = { - {"pooled_h", std::to_string(out_h)}, - {"pooled_w", std::to_string(out_w)}, - {"spatial_scale", "0.062500"} - }; - return V2NetBuilder::buildNetworkWithOneInput("ROIPooling_Only", inout.inDims[0], p.precision) - .addInputLayer(p.precision, inout.inDims[1]) - .addLayer("ROIPooling", p.precision, ¶ms, inout) - .havingEdges().connect(0, 2).connect(1, 2).finish(); - } -}; - -TEST_P(PoolingLayerTest, CanNotLoadPoolLayer) { - auto param = GetParam(); - string ref_error = (param.device == CommonTestUtils::DEVICE_FPGA) ? - "Graph is not supported on FPGA" : "Unsupported layer: Pooling1:Pooling"; - - InferenceEngine::Core core; - std::string model = getModel(param); - CNNNetwork network = core.ReadNetwork(model, Blob::CPtr()); - - try { - ExecutableNetwork exeNetwork = core.LoadNetwork(network, param.device, {}); - } catch (InferenceEngineException ex) { - ASSERT_EQ(ex.getStatus(), StatusCode::GENERAL_ERROR); - ASSERT_EQ(ex.what(), ref_error); - } -} - -TEST_P(ROIPoolingLayerTest, CanNotLoadROIPoolLayer) { - auto param = GetParam(); - string ref_error = - (param.device == CommonTestUtils::DEVICE_FPGA) ? - "Graph is not supported on FPGA" : - "Unsupported layer: ROIPooling2:ROIPooling"; - - InferenceEngine::Core core; - std::string model = getROIPoolingModel(param); - CNNNetwork network = core.ReadNetwork(model, Blob::CPtr()); - - if (param.device == CommonTestUtils::DEVICE_CPU || - param.device == CommonTestUtils::DEVICE_MYRIAD || - param.device == CommonTestUtils::DEVICE_HDDL || - param.device == CommonTestUtils::DEVICE_KEEMBAY) { - ASSERT_NO_THROW(ExecutableNetwork exeNetwork = core.LoadNetwork(network, param.device, {})); - } else { - try { - ExecutableNetwork exeNetwork = core.LoadNetwork(network, param.device, {}); - } catch (InferenceEngineException ex) { - if (param.device != CommonTestUtils::DEVICE_HDDL) { - ASSERT_EQ(ex.getStatus(), StatusCode::GENERAL_ERROR); - } - ASSERT_STR_CONTAINS(ex.what(), ref_error); - } - } -} - -#define pool_case pool_params({{1, 1, 16, 16}, {2, 2}, {2, 2}, {0, 0}}) - -struct activ_test_params : in_params_nchw, base_test_params { - activ_test_params(std::string name, std::string pr, in_params_nchw params) : - in_params_nchw(params), base_test_params(name, pr) {} -}; - -class ActivationLayerTest : public LayerTestsCommon { -protected: - std::string getModel(const activ_test_params& p) { - std::map params = { - {"type", "sigmoid"} - }; - - InOutShapes inout = {{{p.in.n, p.in.c}}, - {{p.in.n, p.in.c}}}; - - V2NetBuilder model = V2NetBuilder::buildNetworkWithOneInput( - "Activation_Only", inout.inDims[0], p.precision) - .addLayer("Activation", p.precision, ¶ms, inout); - return model.finish(false); - } -}; - -class ReLULayerTest : public ActivationLayerTest { -protected: - std::string getModel(const activ_test_params& p) { - InOutShapes inout = { - {{p.in.c, p.in.h, p.in.w}}, - {{p.in.c, p.in.h, p.in.w}} - }; - - V2NetBuilder model = V2NetBuilder::buildNetworkWithOneInput( - "ReLU_Only", inout.inDims[0], p.precision) - .addLayer("ReLU", p.precision, nullptr, inout); - return model.finish(); - } -}; - -class ClampLayerTest : public ActivationLayerTest { -protected: - std::string getModel(const activ_test_params& p) { - std::map params = { - {"min", "-50"}, - {"max", "50"} - }; - - InOutShapes inout = { - {{p.in.n, p.in.c, p.in.h, p.in.w}}, - {{p.in.n, p.in.c, p.in.h, p.in.w}} - }; - - V2NetBuilder model = V2NetBuilder::buildNetworkWithOneInput( - "Clamp_Only", inout.inDims[0], p.precision) - .addLayer("Clamp", p.precision, ¶ms, inout); - return model.finish(); - } -}; - -TEST_P(ActivationLayerTest, CanNotLoadActivationLayer) { - auto param = GetParam(); - string ref_error = (param.device == CommonTestUtils::DEVICE_FPGA) ? - "Graph is not supported on FPGA" : "Unsupported primitive of type: Activation name: Activation1"; - - InferenceEngine::Core core; - std::string model = getModel(param); - CNNNetwork network = core.ReadNetwork(model, Blob::CPtr()); - - if (param.device == CommonTestUtils::DEVICE_CPU) { - ASSERT_NO_THROW(ExecutableNetwork exeNetwork = core.LoadNetwork(network, param.device)); - } else { - try { - ExecutableNetwork exeNetwork = core.LoadNetwork(network, param.device, {}); - } catch (InferenceEngineException ex) { - ASSERT_EQ(ex.getStatus(), StatusCode::GENERAL_ERROR); - ASSERT_STR_CONTAINS(ex.what(), ref_error); - } - } -} - -TEST_P(ReLULayerTest, CanNotLoadReLULayer) { - auto param = GetParam(); - string ref_error = (param.device == CommonTestUtils::DEVICE_FPGA) ? "Graph is not supported on FPGA" : - (param.device == CommonTestUtils::DEVICE_CPU) ? "channels mismatch between mea" : - "Unsupported layer: ReLU1:ReLU"; - - InferenceEngine::Core core; - std::string model = getModel(param); - CNNNetwork network = core.ReadNetwork(model, Blob::CPtr()); - - try { - ExecutableNetwork exeNetwork = core.LoadNetwork(network, param.device, {}); - } catch (InferenceEngineException ex) { - if (param.device != CommonTestUtils::DEVICE_CPU) { - ASSERT_EQ(ex.getStatus(), StatusCode::GENERAL_ERROR); - } - ASSERT_STR_CONTAINS(ex.what(), ref_error); - } - -} - -TEST_P(ClampLayerTest, CanNotLoadClampLayer) { - auto param = GetParam(); - string ref_error = (param.device == CommonTestUtils::DEVICE_FPGA) ? - "Graph is not supported on FPGA" : "Unsupported layer: Clamp1:Clamp"; - - InferenceEngine::Core core; - std::string model = getModel(param); - CNNNetwork network = core.ReadNetwork(model, Blob::CPtr()); - - try { - ExecutableNetwork exeNetwork = core.LoadNetwork(network, param.device, {}); - } catch (InferenceEngineException ex) { - ASSERT_EQ(ex.getStatus(), StatusCode::GENERAL_ERROR); - ASSERT_STR_CONTAINS(ex.what(), ref_error); - } - -} - -#define activation_case in_params_nchw({1, 96, 55, 55}) -#define clamp_case in_params_nchw({1, 1, 512, 1}) - -struct norm_test_params : in_params_nchw, base_test_params { - norm_test_params(std::string name, std::string pr, in_params_nchw params) : - in_params_nchw(params), base_test_params(name, pr) {} -}; - -class NormalizeLayerTest : public LayerTestsCommon { -protected: - std::string getModel(const norm_test_params& p) { - std::map params = { - {"across_spatial", "0"}, - {"type", "constant"}, - {"value", "20.000000"}, - {"min", "0.000000"}, - {"max", "1.000000"}, - {"mean", "0.000000"}, - {"std", "1.000000"}, - {"sparse", "-1"}, - {"variance_norm", "caffe.FillerParameter.FAN_IN"}, - {"channel_shared", "0"}, - {"eps", "0.000000"} - }; - - InOutShapes inout = { - {{p.in.n, p.in.c, p.in.h, p.in.w}}, - {{p.in.n, p.in.c, p.in.h, p.in.w}} - }; - size_t weights = 2048; - - V2NetBuilder model = V2NetBuilder::buildNetworkWithOneInput( - "Normalize_Only", inout.inDims[0], p.precision) - .addLayer("Normalize", p.precision, ¶ms, inout, weights); - return model.finish(); - } - - TBlob::Ptr GetNetworkWeights(const norm_test_params& p) { - TBlob* weights = new TBlob( - { Precision::U8, {p.in.c * sizeof(float)}, Layout::C }); - weights->allocate(); - fill_data(weights->buffer().as(), - weights->size() / sizeof(float)); - TBlob::Ptr weights_ptr = TBlob::Ptr(weights); - - return weights_ptr; - } -}; - -TEST_P(NormalizeLayerTest, CanNotLoadNormalizeLayer) { - auto param = GetParam(); - string ref_error = (param.device == CommonTestUtils::DEVICE_FPGA) ? - "Graph is not supported on FPGA" : "Unsupported layer: Normalize1:Normalize"; - - InferenceEngine::Core core; - auto network = core.ReadNetwork(getModel(param), GetNetworkWeights(param)); - - if (param.device == CommonTestUtils::DEVICE_CPU) { - ASSERT_NO_THROW(ExecutableNetwork exeNetwork = core.LoadNetwork(network, param.device)); - } else { - try { - ExecutableNetwork exeNetwork = core.LoadNetwork(network, param.device); - } catch (InferenceEngineException ex) { - ASSERT_EQ(ex.getStatus(), StatusCode::GENERAL_ERROR); - ASSERT_STR_CONTAINS(ex.what(), ref_error); - } - } -} - -#define norm_case in_params_nchw({1, 512, 38, 38}) - -struct scale_params : in_params_nchw { - size_t axis; - - scale_params(in_params_nchw in, size_t ax) : - in_params_nchw(in) { - axis = ax; - } -}; - -struct scale_test_params : scale_params, base_test_params { - scale_test_params(std::string name, std::string pr, scale_params params) : - scale_params(params), base_test_params(name, pr) {} -}; - -class ScalingLayerTest : public LayerTestsCommon { -protected: - std::string getScaleShiftModel(const scale_test_params& p) { - InOutShapes inout = { - {{p.in.w, p.in.h}}, - {{p.in.w, p.in.h}} - }; - size_t weights = 2048; - - V2NetBuilder model = V2NetBuilder::buildNetworkWithOneInput( - "ScaleShift_Only", inout.inDims[0], p.precision) - .addLayer("ScaleShift", p.precision, nullptr, inout, weights); - return model.finish(); - } - - std::string getSoftMaxModel(const scale_test_params& p) { - std::map params = { - {"axis", std::to_string(p.axis)} - }; - - InOutShapes inout = { - {{p.in.w, p.in.h}}, - {{p.in.w, p.in.h}} - }; - size_t weights = 2048; - - V2NetBuilder model = V2NetBuilder::buildNetworkWithOneInput( - "SoftMax_Only", inout.inDims[0], p.precision) - .addLayer("SoftMax", p.precision, ¶ms, inout, weights); - return model.finish(); - } - - std::string getBatchNormalizationModel(const scale_test_params& p) { - std::map params = { - {"epsilon", "2e-05"} - }; - - InOutShapes inout = { - {{p.in.n, p.in.c, p.in.w, p.in.h}}, - {{p.in.n, p.in.c, p.in.w, p.in.h}} - }; - size_t weights = 12; - size_t biases = 12; - - V2NetBuilder model = V2NetBuilder::buildNetworkWithOneInput( - "BatchNormalization_Only", inout.inDims[0], p.precision) - .addLayer("BatchNormalization", p.precision, ¶ms, inout, weights, biases); - return model.finish(); - } -}; - -TEST_P(ScalingLayerTest, CanNotLoadScaleShiftLayer) { - auto param = GetParam(); - string ref_error = "Unsupported layer: ScaleShift1:ScaleShift"; - std::map config; - if (param.device == CommonTestUtils::DEVICE_FPGA) { - ref_error = "Graph is not supported on FPGA"; - } else if (param.device == CommonTestUtils::DEVICE_GNA) { - config.insert({GNA_CONFIG_KEY(SCALE_FACTOR), std::to_string(1)}); - ref_error = "[GNAPlugin] in function operator(): " - "Incorrect weight value for ScaleShift1:ScaleShift"; - } - - InferenceEngine::Core core; - std::string model = getScaleShiftModel(param); - CNNNetwork network = core.ReadNetwork(model, Blob::CPtr()); - - try { - ExecutableNetwork exeNetwork = core.LoadNetwork(network, param.device, config); - } catch (InferenceEngineException ex) { - ASSERT_EQ(ex.getStatus(), StatusCode::GENERAL_ERROR); - ASSERT_STR_CONTAINS(ex.what(), ref_error); - } -} - -TEST_P(ScalingLayerTest, CanNotLoadSoftMaxLayer) { - auto param = GetParam(); - string ref_error = (param.device == CommonTestUtils::DEVICE_FPGA) ? "Graph is not supported on FPGA" : - (param.device == CommonTestUtils::DEVICE_CPU) ? "Incorrect axis!" : "Unsupported layer: SoftMax1:SoftMax"; - - InferenceEngine::Core core; - std::string model = getSoftMaxModel(param); - CNNNetwork network = core.ReadNetwork(model, Blob::CPtr()); - - try { - ExecutableNetwork exeNetwork = core.LoadNetwork(network, param.device); - } catch (InferenceEngineException ex) { - ASSERT_EQ(ex.getStatus(), StatusCode::GENERAL_ERROR); - ASSERT_STR_CONTAINS(ex.what(), ref_error); - } -} - -TEST_P(ScalingLayerTest, CanNotLoadBatchNormalizationLayer) { - auto param = GetParam(); - string ref_error = "Unsupported layer: BatchNormalization1:BatchNormalization"; - - if (param.device == CommonTestUtils::DEVICE_FPGA) { - ref_error = "Graph is not supported on FPGA"; - } else if (param.device == CommonTestUtils::DEVICE_CPU) { - ref_error = "Weights/biases are empty for layer: BatchNormalization1 "; - } else if (param.device == CommonTestUtils::DEVICE_GNA) { - ref_error = "[GNAPlugin] in function LoadNetwork: " - "The plugin does not support layer: " - "BatchNormalization1:BatchNormalization"; - } - - InferenceEngine::Core core; - std::string model = getBatchNormalizationModel(param); - CNNNetwork network = core.ReadNetwork(model, Blob::CPtr()); - - try { - ExecutableNetwork exeNetwork = core.LoadNetwork(network, param.device, {}); - } catch (InferenceEngineException ex) { - ASSERT_EQ(ex.getStatus(), StatusCode::GENERAL_ERROR); - ASSERT_STR_CONTAINS(ex.what(), ref_error); - } -} - -struct shaping_test_params : in_params_nchw, base_test_params { - shaping_test_params(std::string name, std::string pr, in_params_nchw params) : - in_params_nchw(params), base_test_params(name, pr) {} -}; - -class ShapingLayerTest : public LayerTestsCommon { -protected: - std::string getFlattenModel(const shaping_test_params& p) { - std::map params = { - {"axis", "1"}, - {"end_axis", "-1"} - }; - InOutShapes inout = { - {{p.in.n, p.in.c, p.in.w, p.in.h}}, - {{p.in.n, p.in.c}} - }; - - V2NetBuilder model = V2NetBuilder::buildNetworkWithOneInput( - "Flatten_Only", inout.inDims[0], p.precision) - .addLayer("Flatten", p.precision, ¶ms, inout); - return model.finish(); - } - - std::string getReshapeModel(const shaping_test_params& p) { - std::map params = { - {"dim", std::to_string(p.in.n) + "," + std::to_string(p.in.c)}, - {"axis", "0"}, - {"num_axes", "-1"} - }; - InOutShapes inout = { - {{p.in.n, p.in.c, p.in.w, p.in.h}}, - {{p.in.n, p.in.c}} - }; - - V2NetBuilder model = V2NetBuilder::buildNetworkWithOneInput( - "Reshape_Only", inout.inDims[0], p.precision) - .addLayer("Reshape", p.precision, ¶ms, inout); - return model.finish(); - } - - std::string getCropModel(const shaping_test_params& p) { - std::map params = { - {"dim", "12,12"}, - {"axis", "2,3"}, - {"offset", "0,0"} - }; - InOutShapes inout = { - {{p.in.n, p.in.c, p.in.w, p.in.h}}, - {{p.in.n, p.in.c, 12, 12}} - }; - - V2NetBuilder model = V2NetBuilder::buildNetworkWithOneInput( - "Crop_Only", inout.inDims[0], p.precision) - .addLayer("Crop", p.precision, ¶ms, inout); - return model.finish(); - } -}; - -TEST_P(ShapingLayerTest, CanNotLoadFlattenLayer) { - auto param = GetParam(); - string ref_error = (param.device == CommonTestUtils::DEVICE_FPGA) ? - "Graph is not supported on FPGA" : "Unsupported layer: Flatten1:Flatten"; - - InferenceEngine::Core core; - std::string model = getFlattenModel(param); - CNNNetwork network = core.ReadNetwork(model, Blob::CPtr()); - - try { - ExecutableNetwork exeNetwork = core.LoadNetwork(network, param.device, {}); - } catch (InferenceEngineException ex) { - ASSERT_EQ(ex.getStatus(), StatusCode::GENERAL_ERROR); - ASSERT_STR_CONTAINS(ex.what(), ref_error); - } -} - -TEST_P(ShapingLayerTest, CanNotLoadReshapeLayer) { - auto param = GetParam(); - string ref_error = (param.device == CommonTestUtils::DEVICE_FPGA) ? - "Graph is not supported on FPGA" : "Unsupported layer: Reshape1:Reshape"; - - InferenceEngine::Core core; - std::string model = getFlattenModel(param); - CNNNetwork network = core.ReadNetwork(model, Blob::CPtr()); - - try { - ExecutableNetwork exeNetwork = core.LoadNetwork(network, param.device, {}); - } catch (InferenceEngineException ex) { - ASSERT_EQ(ex.getStatus(), StatusCode::GENERAL_ERROR); - ASSERT_STR_CONTAINS(ex.what(), ref_error); - } -} - -TEST_P(ShapingLayerTest, CanNotLoadCropLayer) { - auto param = GetParam(); - string ref_error = (param.device == CommonTestUtils::DEVICE_FPGA) ? - "Graph is not supported on FPGA" : "Unsupported layer: Crop1:Crop"; - - InferenceEngine::Core core; - std::string model = getFlattenModel(param); - CNNNetwork network = core.ReadNetwork(model, Blob::CPtr()); - - try { - ExecutableNetwork exeNetwork = core.LoadNetwork(network, param.device, {}); - } catch (InferenceEngineException ex) { - ASSERT_EQ(ex.getStatus(), StatusCode::GENERAL_ERROR); - ASSERT_STR_CONTAINS(ex.what(), ref_error); - } -} - -#define shape_case in_params_nchw({1, 512, 1, 1}) - -struct element_test_params : in_params_nchw, base_test_params { - element_test_params(std::string name, std::string pr, in_params_nchw params) : - in_params_nchw(params), base_test_params(name, pr) {} -}; - -class ElementWiseLayerTest : public LayerTestsCommon { -protected: - std::string getEltwiseModel(const element_test_params& p) { - std::vector dims{p.in.n, p.in.c}; - InOutShapes inout = {{dims, dims}, - {dims}}; - - std::map params = { - {"operation", "prod"} - }; - - return V2NetBuilder::buildNetworkWithOneInput( - "Eltwise_Only", dims, p.precision) - .addInputLayer(p.precision, dims) - .addLayer("Eltwise", p.precision, ¶ms, inout) - .havingEdges().connect(0, 2).connect(1, 2).finish(); - } -}; - -TEST_P(ElementWiseLayerTest, CanNotLoadEltwiseLayer) { - auto param = GetParam(); - string ref_error = (param.device == CommonTestUtils::DEVICE_FPGA) ? - "Graph is not supported on FPGA" : "Unsupported layer: Eltwise1:Eltwise"; - - std::string model = getEltwiseModel(param); - InferenceEngine::Core core; - auto network = core.ReadNetwork(model, InferenceEngine::Blob::CPtr()); - - try { - ExecutableNetwork exeNetwork = core.LoadNetwork(network, param.device, {}); - } catch (InferenceEngineException ex) { - ASSERT_EQ(ex.getStatus(), StatusCode::GENERAL_ERROR); - ASSERT_STR_CONTAINS(ex.what(), ref_error); - } -} - -struct object_test_params : in_params_nchw, base_test_params { - object_test_params(std::string name, std::string pr, in_params_nchw params) : - in_params_nchw(params), base_test_params(name, pr) {} -}; - -class ObjectDetectionLayerTest : public LayerTestsCommon { -protected: - std::string getPermuteModel(const object_test_params& p) { - std::map params = { - {"order", "0,2,3,1"} - }; - InOutShapes inout = { - {{p.in.n, p.in.c, p.in.w, p.in.h}}, - {{p.in.n, p.in.w, p.in.h, p.in.c}}, - }; - - V2NetBuilder model = V2NetBuilder::buildNetworkWithOneInput( - "Permute_Only", inout.inDims[0], p.precision) - .addLayer("Permute", p.precision, ¶ms, inout); - return model.finish(); - } - - std::string getPriorBoxModel(const object_test_params& p) { - std::map params = { - {"min_size", "162.000000"}, - {"max_size", "213.000000"}, - {"aspect_ratio", "2.000000,3.000000"}, - {"flip", "1"}, - {"clip", "0"}, - {"variance", "0.100000,0.100000,0.200000,0.200000"}, - {"img_size", "0"}, - {"img_h", "0"}, - {"img_w", "0"}, - {"step", "64.000000"}, - {"step_h", "0.000000"}, - {"step_w", "0.000000"}, - {"offset", "0.500000"} - }; - InOutShapes inout = { - {{p.in.n, p.in.c, p.in.w, p.in.h}}, - {{p.in.n, p.in.w, p.in.h, p.in.c}}, - }; - - V2NetBuilder model = V2NetBuilder::buildNetworkWithOneInput( - "PriorBox_Only", inout.inDims[0], p.precision) - .addLayer("PriorBox", p.precision, ¶ms, inout); - return model.finish(); - } - - // TODO: add DetectionOutput and Tile layers -}; - -TEST_P(ObjectDetectionLayerTest, CanNotLoadPermuteLayer) { - auto param = GetParam(); - string ref_error = (param.device == CommonTestUtils::DEVICE_FPGA) ? - "Graph is not supported on FPGA" : "Unsupported layer: Permute1:Permute"; - - InferenceEngine::Core core; - CNNNetwork network = core.ReadNetwork(getPermuteModel(param), Blob::CPtr()); - - try { - ExecutableNetwork exeNetwork = core.LoadNetwork(network, param.device); - } catch (InferenceEngineException ex) { - ASSERT_EQ(ex.getStatus(), StatusCode::GENERAL_ERROR); - ASSERT_STR_CONTAINS(ex.what(), ref_error); - } -} - -#define scale_case scale_params({1, 512, 38, 38}, 2) - -#define object_case in_params_nchw({1, 804, 38, 38}) - -struct memory_test_params : in_params_nchw, base_test_params { - memory_test_params(std::string name, std::string pr, in_params_nchw params) : - in_params_nchw(params), base_test_params(name, pr) {} -}; - -class MemoryLayerTest : public LayerTestsCommon { -protected: - std::string getMemoryModel(const memory_test_params& p) { - std::map params = { - {"id", "r_2-3"}, - {"index", "1"}, - {"size", "2"} - }; - std::map paramsFC = { - {"out-size", "2048"} - }; - InOutShapes inout = { - {{p.in.n, p.in.c}}, - {{p.in.n, 2048}} - }; - InOutShapes inoutMemory = { - {{p.in.n, 2048}}, - {} - }; - return V2NetBuilder::buildNetworkWithOneInput( - "FC_with_Memory", inout.inDims[0], p.precision) - .addInputLayer(p.precision, inout.inDims[0]) - .addLayer("FullyConnected", p.precision, ¶msFC, inout, 1638400) - .addLayer("FullyConnected", p.precision, ¶msFC, inout, 1638400) - .addLayer("Memory", p.precision, ¶msFC, inoutMemory) - .havingEdges().connect(0, 2).connect(1, 3).connect(2, 4).finish(); - } -}; - -TEST_P(MemoryLayerTest, CanNotLoadMemoryLayer) { - auto param = GetParam(); - string ref_error = (param.device == CommonTestUtils::DEVICE_FPGA) ? - "Graph is not supported on FPGA" : "Unsupported layer: Memory1:Memory"; - - InferenceEngine::Core core; - std::string model = getMemoryModel(param); - auto network = core.ReadNetwork(model, InferenceEngine::Blob::CPtr()); - - try { - ExecutableNetwork exeNetwork = core.LoadNetwork(network, param.device, {}); - } catch (InferenceEngineException ex) { - ASSERT_EQ(ex.getStatus(), StatusCode::GENERAL_ERROR); - ASSERT_STR_CONTAINS(ex.what(), ref_error); - } -} -IE_SUPPRESS_DEPRECATED_END - -#define memory_case in_params_nchw({1, 512, 38, 38}) - diff --git a/inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin_layout.hpp b/inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin_layout.hpp deleted file mode 100644 index bc0ef24deb8..00000000000 --- a/inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin_layout.hpp +++ /dev/null @@ -1,271 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin.h" - -#include "precision_utils.h" -#include "common_test_utils/xml_net_builder/xml_net_builder.hpp" - -using namespace std; -using namespace CommonTestUtils; -using namespace InferenceEngine; -using namespace InferenceEngine::details; - -static constexpr int testDimW = 17; -static constexpr int testDimH = 3; - -struct in_params { - std::vector in; -}; - -struct base_layout_test_params { - std::string device; - Layout layout; - std::string precision; - base_layout_test_params(std::string name, std::string _precision = "FP32", Layout _layout = Layout::C) { - device = name; - precision = _precision; - layout = _layout; - } -}; - -struct power_params : in_params { - int power; - int scale; - int shift; - - power_params(in_params in, - int _power, - int _scale, - int _shift ) : - in_params(in) { - power = _power; - scale = _scale; - shift = _shift; - } -}; - -struct layout_test_params : power_params, base_layout_test_params { - layout_test_params(std::string name, std::string precision, Layout layout, power_params params) : - power_params(params), base_layout_test_params(name, precision, layout) {} -}; - -std::ostream &operator<<(std::ostream &os, const layout_test_params &p) { - return os << "device: " << p.device; -} - -std::string layoutToString(Layout l) { - std::string str_layout; - switch (l) - { - case InferenceEngine::NCHW: - str_layout = "NCHW"; - break; - case InferenceEngine::NHWC: - str_layout = "NHWC"; - break; - case InferenceEngine::C: - str_layout = "C"; - break; - case InferenceEngine::CHW: - str_layout = "CHW"; - break; - case InferenceEngine::HW: - str_layout = "HW"; - break; - case InferenceEngine::NC: - str_layout = "NC"; - break; - case InferenceEngine::CN: - str_layout = "CN"; - break; - default: - break; - } - return str_layout; -} - -std::string getTestName(testing::TestParamInfo obj) { - return "layout_" + layoutToString(obj.param.layout) + "_" + obj.param.device; -} - -class LayoutTestCanLoad : public TestsCommon, - public testing::WithParamInterface{ -protected: - std::string getPowerModel(const layout_test_params &p) { - std::map params = { - { "power", std::to_string(p.power) }, - { "scale", std::to_string(p.scale) }, - { "shift", std::to_string(p.shift) } - }; - - InOutShapes inout = {{p.in}, - {p.in}}; - - V2NetBuilder model = V2NetBuilder::buildNetworkWithOneInput( - "Power_Only", inout.inDims[0], p.precision) - .addLayer("Power", p.precision, ¶ms, inout); - return model.finish(false); - } - - std::string getConvModel(const layout_test_params &p) { - std::map params = { - { "stride-x", "1" }, - { "stride-y", "1" }, - { "pad-x", "0" }, - { "pad-y", "0" }, - { "kernel-x", "1" }, - { "kernel-y", "1" }, - { "output", std::to_string(testDimW)}, - { "group", "1" } - }; - - std::vector out = p.in; - if (out.size() == 1 || out.size() == 3) { - out[0] = testDimW; - } else { - out[1] = testDimW; - } - - InOutShapes inout = {{p.in}, - {out}}; - - const auto elemSize = p.precision == "FP16" ? sizeof(ie_fp16) : sizeof(float); - - size_t weights = testDimW * testDimH * elemSize; - size_t biases = testDimW * elemSize; - - V2NetBuilder model = V2NetBuilder::buildNetworkWithOneInput( - "Convolution_Only", inout.inDims[0], p.precision) - .addLayer("Convolution", p.precision, ¶ms, inout, weights, biases); - return model.finish(false); - } - - std::string getActivModel(const layout_test_params &p) { - std::map params = { - { "type", "sigmoid" } - }; - - InOutShapes inout = {{p.in}, - {p.in}}; - - V2NetBuilder model = V2NetBuilder::buildNetworkWithOneInput( - "Activation_Only", inout.inDims[0], p.precision) - .addLayer("Activation", p.precision, ¶ms, inout); - return model.finish(false); - } - - Blob::Ptr getNetworkWeights(const layout_test_params &p) { - const auto elemSize = p.precision == "FP16" ? sizeof(ie_fp16) : sizeof(float); - - TensorDesc tdesc (Precision::U8, { (testDimW * testDimH + testDimW ) * elemSize }, C); - TBlob *weights = new TBlob(tdesc); - weights->allocate(); - fill_data(weights->buffer().as(), - weights->size() / sizeof(float)); - TBlob::Ptr weights_ptr = TBlob::Ptr(weights); - return weights_ptr; - } -}; - - class LayoutTestCanLoadPower : public LayoutTestCanLoad {}; - class LayoutTestCanLoadConv : public LayoutTestCanLoad {}; - class LayoutTestCanLoadActiv : public LayoutTestCanLoad {}; - - class LayoutTestCanNotLoadPower : public LayoutTestCanLoad {}; - class LayoutTestCanNotLoadConv : public LayoutTestCanLoad {}; - - -TEST_P(LayoutTestCanLoadPower, NetWithLayout) { - auto param = GetParam(); - InferenceEngine::Core core; - std::string model = getPowerModel(param); - Blob::CPtr weights; - auto network = core.ReadNetwork(model, weights); - - ASSERT_NO_THROW(ExecutableNetwork exeNetwork = core.LoadNetwork(network, param.device, {})); -} - -TEST_P(LayoutTestCanLoadConv, NetWithLayout) { - auto param = GetParam(); - InferenceEngine::Core core; - std::string model = getConvModel(param); - Blob::Ptr weights = getNetworkWeights(param); - auto network = core.ReadNetwork(model, weights); - try { - ExecutableNetwork exeNetwork = core.LoadNetwork(network, param.device, {}); - } catch (InferenceEngineException ex) { - std::cout << "Device" << param.device << " threw exception \"" << ex.what() << "\" with status code " << ex.getStatus() << std::endl; - GTEST_FAIL() << ex.what(); - } catch (std::exception ex) { - std::cout << "Caught" << ex.what() << std::endl; - GTEST_FAIL() << ex.what(); - } catch (...) { - GTEST_FAIL(); - } -} - - -TEST_P(LayoutTestCanLoadActiv, NetWithLayout) { - auto param = GetParam(); - InferenceEngine::Core core; - std::string model = getActivModel(param); - CNNNetwork network; - Blob::CPtr weights; - ASSERT_NO_THROW(network = core.ReadNetwork(model, weights)); - ASSERT_NO_THROW(ExecutableNetwork exeNetwork = core.LoadNetwork(network, param.device, {})); -} - - -TEST_P(LayoutTestCanNotLoadPower, NetWithLayout) { - auto param = GetParam(); - string ref_error = (param.device == CommonTestUtils::DEVICE_MYRIAD) ? "Unsupported 1D dimensions" : - (param.device == CommonTestUtils::DEVICE_FPGA) ? "Graph is not supported on FPGA plugin due to existance of layer (Name: Input0, Type: Input)\n"\ - "in topology. Most likely you need to use heterogeneous plugin instead of FPGA plugin directly." : "Invalid data dimensions"; - InferenceEngine::Core core; - std::string model = getPowerModel(param); - CNNNetwork network; - Blob::CPtr weights; - ASSERT_NO_THROW(network = core.ReadNetwork(model, weights)); - - try { - ExecutableNetwork exeNetwork = core.LoadNetwork(network, param.device, {}); - } catch (InferenceEngineException ex) { - std::cout << "Device" << param.device << " threw exception \"" << ex.what() << "\" with status code " << ex.getStatus() << std::endl; - //ASSERT_EQ(ex.getStatus(), StatusCode::GENERAL_ERROR); - ASSERT_STR_CONTAINS(ex.what(), ref_error); - } catch (std::exception ex) { - std::cout << "Caught" << ex.what() << std::endl; - GTEST_FAIL() << ex.what(); - } catch (...) { - GTEST_FAIL(); - } -} - -TEST_P(LayoutTestCanNotLoadConv, NetWithLayout) { - auto param = GetParam(); - string ref_error = - (param.device == CommonTestUtils::DEVICE_MYRIAD) ? "Convolution supports only 3D or 4D or 5D input" : - (param.device == CommonTestUtils::DEVICE_FPGA) ? "Graph is not supported on FPGA" : - (param.device == CommonTestUtils::DEVICE_CPU) ? "Convolution layer. Unsupported mode. Only 4D and 5D blobs are supported as input." : - "Invalid data dimensions"; - InferenceEngine::Core core; - std::string model = getConvModel(param); - CNNNetwork network; - ASSERT_NO_THROW(network = core.ReadNetwork(model, getNetworkWeights(param))); - try { - ExecutableNetwork exeNetwork = core.LoadNetwork(network, param.device, {}); - } catch (InferenceEngineException ex) { - std::cout << "Device" << param.device << " threw exception \"" << ex.what() << "\" with status code " << ex.getStatus() << std::endl; - /*if (param.device != CommonTestUtils::DEVICE_CPU) { - ASSERT_EQ(ex.getStatus(), StatusCode::GENERAL_ERROR); - }*/ - ASSERT_STR_CONTAINS(ex.what(), ref_error); - } catch (std::exception ex) { - std::cout << "Caught" << ex.what() << std::endl; - GTEST_FAIL() << ex.what(); - } catch (...) { - GTEST_FAIL(); - } -} diff --git a/inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin_perf_counters.hpp b/inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin_perf_counters.hpp deleted file mode 100644 index 70782a077a8..00000000000 --- a/inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin_perf_counters.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin.h" -#include "details/ie_cnn_network_tools.h" -#include "exec_graph_info.hpp" - -using namespace ::testing; -using namespace InferenceEngine; - -namespace { -std::string getTestCaseName(testing::TestParamInfo obj) { - return obj.param.device + "_" + obj.param.input_blob_precision.name() - + (obj.param.config.size() ? "_" + obj.param.config.begin()->second : ""); -} -} - -TEST_P(BehaviorPluginTestPerfCounters, EmptyWhenNotExecuted) { - auto param = GetParam(); - - TestEnv::Ptr testEnv; - ASSERT_NO_FATAL_FAILURE(_createAndCheckInferRequest(GetParam(), testEnv)); - - std::map perfMap; - ASSERT_EQ(StatusCode::GENERAL_ERROR, testEnv->inferRequest->GetPerformanceCounts(perfMap, &response)) << response.msg; - ASSERT_EQ(perfMap.size(), 0); -} - -TEST_P(BehaviorPluginTestPerfCounters, NotEmptyWhenExecuted) { - auto param = GetParam(); - - TestEnv::Ptr testEnv; - ASSERT_NO_FATAL_FAILURE(_createAndCheckInferRequest(GetParam(), testEnv, - {{ PluginConfigParams::KEY_PERF_COUNT, PluginConfigParams::YES }})); - ASSERT_NO_THROW(sts = testEnv->inferRequest->Infer(&response)); - ASSERT_EQ(StatusCode::OK, sts) << response.msg; - - std::map perfMap; - ASSERT_EQ(StatusCode::OK, testEnv->inferRequest->GetPerformanceCounts(perfMap, &response)) << response.msg; - ASSERT_NE(perfMap.size(), 0); -} diff --git a/inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin_unsupported.hpp b/inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin_unsupported.hpp deleted file mode 100644 index a5d6bc35eb8..00000000000 --- a/inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin_unsupported.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin.h" - -using namespace ::testing; -using namespace InferenceEngine; -using namespace InferenceEngine::details; - -namespace { - std::string getTestCaseName(testing::TestParamInfo obj) { - return obj.param.device + (obj.param.config.size() ? "_" + obj.param.config.begin()->second : "") + - "_" + getModelName(obj.param.model_xml_str) + "_" + obj.param.input_blob_precision.name(); - } -} - -// Load unsupported network type to the Plugin -TEST_P(BehaviorPluginTestAllUnsupported, cannotLoadUnsupportedNetwork) { - std::string refError = "The plugin does not support"; - auto param = GetParam(); - InferenceEngine::Core core; - InferenceEngine::CNNNetwork network = core.ReadNetwork(GetParam().model_xml_str, GetParam().weights_blob); - ASSERT_THROW(core.LoadNetwork(network, param.device, param.config), InferenceEngineException); -} - -// Load incorrect input type for Plugin -TEST_P(BehaviorPluginTestTypeUnsupported, LoadIncorrectInputType) { - InferenceEngine::Core core; - InferenceEngine::CNNNetwork network = core.ReadNetwork(GetParam().model_xml_str, GetParam().weights_blob); - InferenceEngine::InputsDataMap inputs = network.getInputsInfo(); - inputs.begin()->second->setPrecision(GetParam().input_blob_precision); - ASSERT_THROW(core.LoadNetwork(network, GetParam().device, GetParam().config), InferenceEngineException); -} - -TEST_P(BehaviorPluginTestBatchUnsupported, DISABLED_LoadIncorrectBatchSize) { - InferenceEngine::Core core; - InferenceEngine::CNNNetwork network = core.ReadNetwork(GetParam().model_xml_str, GetParam().weights_blob); - InferenceEngine::InputsDataMap inputs = network.getInputsInfo(); - network.setBatchSize(GetParam().batch_size); - ASSERT_THROW(core.LoadNetwork(network, GetParam().device, GetParam().config), InferenceEngineException); -} diff --git a/inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin_version.hpp b/inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin_version.hpp deleted file mode 100644 index 867f03c36ec..00000000000 --- a/inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin_version.hpp +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin.h" -#include - -using namespace ::testing; -using namespace InferenceEngine; -using namespace InferenceEngine::details; - -namespace { -std::string getTestCaseName(testing::TestParamInfo obj) { - return obj.param.device + (obj.param.config.size() ? "_" + obj.param.config.begin()->second : "") - + "_" + obj.param.input_blob_precision.name(); -} -} - -// Load unsupported network type to the Plugin -TEST_P(BehaviorPluginTestVersion, pluginCurrentVersionIsCorrect) { - std::string refError = "The plugin does not support"; - InferenceEngine::Core core; - const std::string device = GetParam().device; - if (device.find(CommonTestUtils::DEVICE_MULTI) == std::string::npos && - device.find(CommonTestUtils::DEVICE_HETERO) == std::string::npos) { - std::map versions = core.GetVersions(GetParam().device); - ASSERT_EQ(versions.size(), 1); - auto version = versions.begin()->second; - ASSERT_EQ(version.apiVersion.major, 2); - ASSERT_EQ(version.apiVersion.minor, 1); - } -} - -template -std::array add_element_into_array(const T (&arr)[N], const T & element) { - std::array ar; - for(size_t i = 0; i != N; i++) { - ar[i] = arr[i]; - } - ar[N] = element; - return ar; - -}; diff --git a/inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugins.hpp b/inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugins.hpp deleted file mode 100644 index 5fb51ea0c0f..00000000000 --- a/inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugins.hpp +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin.h" -#include - -using namespace std; -using namespace ::testing; -using namespace InferenceEngine; -using namespace InferenceEngine::details; - -namespace { - std::string getTestCaseName(testing::TestParamInfo obj) { - return obj.param.device + "_" + obj.param.input_blob_precision.name() + "_" + getModelName(obj.param.model_xml_str) - + (obj.param.config.size() ? "_" + obj.param.config.begin()->second : ""); - } - - std::string getOutputTestCaseName(testing::TestParamInfo obj) { - return obj.param.device + "_" + obj.param.output_blob_precision.name() - + (obj.param.config.size() ? "_" + obj.param.config.begin()->second : ""); - } -} - -Blob::Ptr BehaviorPluginTest::makeNotAllocatedBlob(Precision eb, Layout l, const SizeVector &dims) { - TensorDesc tdesc (eb, dims, l); - switch (eb) { - case Precision::I8: - return make_shared>(tdesc); - case Precision::I16: - return make_shared>(tdesc); - case Precision::I32: - return make_shared>(tdesc); - case Precision::U8: - return make_shared>(tdesc); - case Precision::U16: - return make_shared>(tdesc); - case Precision::FP16: - return make_shared>(tdesc); - case Precision::FP32: - return make_shared>(tdesc); - case Precision::Q78: - return make_shared>(tdesc); - case Precision::UNSPECIFIED: - return make_shared>(tdesc); - default: - break; - } - throw std::runtime_error("unexpected"); -} - -void BehaviorPluginTest::setInputNetworkPrecision(CNNNetwork &network, InputsDataMap &inputs_info, - Precision input_precision) { - inputs_info = network.getInputsInfo(); - ASSERT_TRUE(inputs_info.size() == 1u); - inputs_info.begin()->second->setPrecision(input_precision); -} - -void BehaviorPluginTest::setOutputNetworkPrecision(CNNNetwork &network, OutputsDataMap &outputs_info, - Precision output_precision) { - outputs_info = network.getOutputsInfo(); - ASSERT_EQ(outputs_info.size(), 1u); - outputs_info.begin()->second->setPrecision(output_precision); -} - -class BehaviorPluginTestInput : public BehaviorPluginTest { }; -class BehaviorPluginTestOutput : public BehaviorPluginTest { }; - -TEST_F(BehaviorPluginTest, smoke_llocateNullBlob) { - TensorDesc tdesc = TensorDesc(Precision::FP32, NCHW); - InferenceEngine::TBlob blob(tdesc); - ASSERT_NO_THROW(blob.allocate()); -} - -// Create Plugin -// TEST_P(BehaviorPluginTest, canCreatePlugin) { -// ASSERT_NO_THROW(InferenceEnginePluginPtr plugin(make_plugin_name(GetParam().pluginName))); -// } - -// Load correct network to Plugin -// TODO -// TEST_P(BehaviorPluginTest, canLoadCorrectNetwork) { -// InferenceEnginePluginPtr plugin(make_plugin_name(GetParam().pluginName)); -// ASSERT_NO_THROW(pluginLoadCorrectNetwork(GetParam(), plugin)); -// } - -// // TODO -// // Load correct network to Plugin -// TEST_P(BehaviorPluginTest, canLoadTwoNetworks) { -// auto param = GetParam(); -// InferenceEnginePluginPtr plugin(make_plugin_name(param.pluginName)); -// pluginLoadCorrectNetwork(param, plugin); -// ASSERT_NO_THROW(pluginLoadCorrectNetwork(param, plugin)); -// } - -// Load incorrect network to Plugin -TEST_P(BehaviorPluginTest, canNotLoadNetworkWithoutWeights) { - InferenceEngine::Core core; - ASSERT_THROW(core.ReadNetwork(GetParam().model_xml_str, Blob::CPtr()), InferenceEngineException); -} - -bool static compare_two_files_lexicographically(const std::string& name_a, const std::string& name_b) { - std::ifstream a(name_a), b(name_b); - - std::string line_a, line_b; - while (std::getline(a, line_a)) { - std::string str_a, str_b; - std::istringstream(line_a) >> str_a; - - if (!std::getline(b, line_b)) - throw std::logic_error("Second file is shorter than first"); - else - std::istringstream(line_b) >> str_b; - - if (line_a != line_b) { - std::cout << "Line A: " << line_a << std::endl; - std::cout << "Line B: " << line_b << std::endl; - throw std::logic_error("Files are different"); - } - } - - if (std::getline(b, line_b)) - throw std::logic_error("First file is shorter than second"); - else - return true; -} - -TEST_P(BehaviorPluginTest, pluginDoesNotChangeOriginalNetwork) { - const std::string name_a = "a.xml"; - const std::string name_b = "b.xml"; - auto param = GetParam(); - - InferenceEngine::Core core; - InferenceEngine::CNNNetwork network = core.ReadNetwork(param.model_xml_str, param.weights_blob); - network.serialize(name_a); - - ASSERT_NO_THROW(core.LoadNetwork(network, param.device, param.config)); - network.serialize(name_b); - - ASSERT_NO_THROW(compare_two_files_lexicographically(name_a, name_b)); - EXPECT_EQ(0, std::remove(name_a.c_str())); - EXPECT_EQ(0, std::remove(name_b.c_str())); -} - -TEST_P(BehaviorPluginTestInput, canSetInputPrecisionForNetwork) { - auto param = GetParam(); - InputsDataMap inputs_info; - - InferenceEngine::Core core; - InferenceEngine::CNNNetwork network = core.ReadNetwork(param.model_xml_str, param.weights_blob); - setInputNetworkPrecision(network, inputs_info, param.input_blob_precision); - - // Input image format I16 is not supported yet. - // Disable verification for myriad plugin: CVS-7979, CVS-8144 - if ( ( param.device == CommonTestUtils::DEVICE_MYRIAD - || param.device == CommonTestUtils::DEVICE_HDDL - || param.device == CommonTestUtils::DEVICE_KEEMBAY) - && param.input_blob_precision == Precision::I16) { - std::string msg; - StatusCode sts = StatusCode::OK; - try { - core.LoadNetwork(network, GetParam().device, param.config); - } catch (InferenceEngineException ex) { - msg = ex.what(); - sts = ex.getStatus(); - } - ASSERT_EQ(StatusCode::GENERAL_ERROR, sts) << msg; - std::string refError = "Input image format I16 is not supported yet."; - //response.msg[refError.length()] = '\0'; - ASSERT_EQ(refError, msg); - } - else { - ASSERT_NO_THROW(core.LoadNetwork(network, GetParam().device, param.config)); - } -} - -TEST_P(BehaviorPluginTestOutput, canSetOutputPrecisionForNetwork) { - auto param = GetParam(); - OutputsDataMap outputs_info; - - InferenceEngine::Core ie; - InferenceEngine::CNNNetwork network = ie.ReadNetwork(param.model_xml_str, param.weights_blob); - - setOutputNetworkPrecision(network, outputs_info, param.output_blob_precision); - - StatusCode sts = StatusCode::OK; - std::string msg; - - try { - ExecutableNetwork exeNetwork = ie.LoadNetwork(network, param.device, GetParam().config); - } catch (InferenceEngineException ex) { - sts = ex.getStatus(); - msg = ex.what(); - std::cout << "LoadNetwork() threw InferenceEngineException. Status: " << sts << ", message: " << msg << std::endl; - } - - if ((param.output_blob_precision == Precision::I16 || param.output_blob_precision == Precision::U8)) { - if (param.device == "CPU") { - ASSERT_EQ(StatusCode::OK, sts); - } - else if (param.device == "GPU") { - // Supported precisions: FP32, FP16 - ASSERT_EQ(StatusCode::GENERAL_ERROR, sts) << msg; - std::string refError = "The plugin does not support output"; - ASSERT_STR_CONTAINS(msg, refError); - } - else { - // Supported precisions: FP32, FP16 - ASSERT_EQ(StatusCode::GENERAL_ERROR, sts) << msg; - std::string refError = "Unsupported output precision!"; - ASSERT_STR_CONTAINS(msg, refError); - } - } - else { - ASSERT_EQ(StatusCode::OK, sts); - } -} diff --git a/inference-engine/tests_deprecated/behavior/vpu/myriad_tests/vpu_boot_tests.cpp b/inference-engine/tests_deprecated/behavior/vpu/myriad_tests/vpu_boot_tests.cpp index 20142b85c4f..9f88d7ce6d6 100644 --- a/inference-engine/tests_deprecated/behavior/vpu/myriad_tests/vpu_boot_tests.cpp +++ b/inference-engine/tests_deprecated/behavior/vpu/myriad_tests/vpu_boot_tests.cpp @@ -53,7 +53,7 @@ class MYRIADBoot : public MyriadDevicesInfo, /* * @brief Boot myriad device through XLink, and then try to connect to it with plugin */ -#if !(defined(_WIN32) || defined(_WIN64)) // TODO CVS-15574 +#if !(defined(_WIN32) || defined(_WIN64)) // TODO Issue-15574 TEST_P(MYRIADBoot, ConnectToAlreadyBootedDevice) { #else TEST_P(MYRIADBoot, DISABLED_ConnectToAlreadyBootedDevice) { diff --git a/inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/cpp_wrappers/holders_tests.cpp b/inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/cpp_wrappers/holders_tests.cpp deleted file mode 100644 index cd57d39fadf..00000000000 --- a/inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/cpp_wrappers/holders_tests.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "holders_tests.hpp" - -INSTANTIATE_TEST_CASE_P(smoke_ReleaseOrderTests, CPP_HoldersTests, testing::Combine(testing::ValuesIn(std::vector> { - // 0 - plugin - // 1 - executable_network - // 2 - infer_request - {0,1,2}, - {0,2,1}, - {1,0,2}, - {1,2,0}, - {2,0,1}, - {2,1,0}, -}), testing::Values(std::string("MYRIAD")))); diff --git a/inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/plugin_tests/behavior_test_plugin.cpp b/inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/plugin_tests/behavior_test_plugin.cpp deleted file mode 100644 index 44b689cec12..00000000000 --- a/inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/plugin_tests/behavior_test_plugin.cpp +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin.h" -#include "behavior_test_plugins.hpp" -#include "vpu_test_data.hpp" - -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, BehaviorPluginTest, ValuesIn(supportedValues), - getTestCaseName); -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, BehaviorPluginTestInput, ValuesIn(allInputSupportedValues), - getTestCaseName); -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, BehaviorPluginTestOutput, ValuesIn(allOutputSupportedValues), - getOutputTestCaseName); diff --git a/inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/plugin_tests/behavior_test_plugin_layers.cpp b/inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/plugin_tests/behavior_test_plugin_layers.cpp deleted file mode 100644 index 845c8858f40..00000000000 --- a/inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/plugin_tests/behavior_test_plugin_layers.cpp +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin_layers.hpp" - -pool_test_params roi_pool_test_cases[] = { - pool_test_params(CommonTestUtils::DEVICE_MYRIAD, "FP16", pool_case), -}; - -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, ROIPoolingLayerTest, - ::testing::ValuesIn(roi_pool_test_cases), - getTestName); - -memory_test_params memory_test_cases[] = { - memory_test_params(CommonTestUtils::DEVICE_MYRIAD, "FP32", memory_case), -}; - -// FIXME -//#if (defined INSTANTIATE_TESTS) -//INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, MemoryLayerTest, -// ::testing::ValuesIn(memory_test_cases), -// getTestName); -//#endif - diff --git a/inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/plugin_tests/behavior_test_plugin_layout.cpp b/inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/plugin_tests/behavior_test_plugin_layout.cpp deleted file mode 100644 index 623fe83445b..00000000000 --- a/inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/plugin_tests/behavior_test_plugin_layout.cpp +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin_layout.hpp" - -layout_test_params power_test_cases[] = { - layout_test_params(CommonTestUtils::DEVICE_MYRIAD, "FP16", Layout::C, power_params({ { 3 } }, 2, 2, 2)), - layout_test_params(CommonTestUtils::DEVICE_MYRIAD, "FP16", Layout::NC, power_params({ { 1, 3 } }, 2, 2, 2)), - layout_test_params(CommonTestUtils::DEVICE_MYRIAD, "FP16", Layout::CHW, power_params({ { 3, 32, 16 } }, 2, 2, 2)), - layout_test_params(CommonTestUtils::DEVICE_MYRIAD, "FP16", Layout::NCHW, power_params({ { 1, 3, 16, 16 } }, 2, 2, 2)), -}; -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, LayoutTestCanLoadPower, - ::testing::ValuesIn(power_test_cases), getTestName); - -layout_test_params conv_neg_test_cases[] = { - layout_test_params(CommonTestUtils::DEVICE_MYRIAD, "FP16", Layout::C, power_params({ { 3 } }, 2, 2, 2)), - layout_test_params(CommonTestUtils::DEVICE_MYRIAD, "FP16", Layout::NC, power_params({ { 1, 3 } }, 2, 2, 2)), -}; - -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, LayoutTestCanNotLoadConv, - ::testing::ValuesIn(conv_neg_test_cases), getTestName); - -layout_test_params conv_test_cases[] = { - layout_test_params(CommonTestUtils::DEVICE_MYRIAD, "FP16", Layout::CHW, power_params({ { 3, 32, 16 } }, 2, 2, 2)), - layout_test_params(CommonTestUtils::DEVICE_MYRIAD, "FP16", Layout::NCHW, power_params({ { 1, 3, 16, 16 } }, 2, 2, 2)), - }; - INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, LayoutTestCanLoadConv, - ::testing::ValuesIn(conv_test_cases), getTestName); diff --git a/inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/plugin_tests/behavior_test_plugin_unsupported.cpp b/inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/plugin_tests/behavior_test_plugin_unsupported.cpp deleted file mode 100644 index c3a37c68e97..00000000000 --- a/inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/plugin_tests/behavior_test_plugin_unsupported.cpp +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin_unsupported.hpp" -#include "vpu_test_data.hpp" - -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, BehaviorPluginTestAllUnsupported, ValuesIn(allUnSupportedValues), - getTestCaseName); - -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, BehaviorPluginTestTypeUnsupported, ValuesIn(typeUnSupportedValues), - getTestCaseName); - INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, BehaviorPluginTestBatchUnsupported, ValuesIn(batchUnSupportedValues), - getTestCaseName); diff --git a/inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/plugin_tests/behavior_test_plugin_version.cpp b/inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/plugin_tests/behavior_test_plugin_version.cpp deleted file mode 100644 index aae56e3feb6..00000000000 --- a/inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/plugin_tests/behavior_test_plugin_version.cpp +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "behavior_test_plugin_version.hpp" -#include "vpu_test_data.hpp" - -INSTANTIATE_TEST_CASE_P(smoke_BehaviorTest, BehaviorPluginTestVersion, ValuesIn(add_element_into_array(supportedValues, BEH_HETERO)), getTestCaseName); diff --git a/inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/plugin_tests/vpu_test_data.hpp b/inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/plugin_tests/vpu_test_data.hpp index 0fa2f849df2..78dc9daae1d 100644 --- a/inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/plugin_tests/vpu_test_data.hpp +++ b/inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/plugin_tests/vpu_test_data.hpp @@ -49,7 +49,7 @@ const BehTestParams allInputSupportedValues[] = { BEH_MYRIAD, BEH_MYRIAD.withIn(Precision::U8), BEH_MYRIAD.withIn(Precision::FP16), BEH_MULTI(MYRIAD), BEH_MULTI(MYRIAD).withIn(Precision::U8), BEH_MULTI(MYRIAD).withIn(Precision::FP16), // I16 not supported yet - // (CVS-7979) [IE myriad] The plugin should support I16 format for Input + // (Issue-7979) [IE myriad] The plugin should support I16 format for Input //BEH_MYRIAD.withIn(Precision::I16), }; diff --git a/inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/skip_tests_config.cpp b/inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/skip_tests_config.cpp deleted file mode 100644 index 8db78c156dc..00000000000 --- a/inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/skip_tests_config.cpp +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (C) 2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include -#include - -#include "functional_test_utils/skip_tests_config.hpp" - -std::vector disabledTestPatterns() { - return { - }; -} \ No newline at end of file diff --git a/inference-engine/tests_deprecated/functional/shared_tests/transformations/common/validation.cpp b/inference-engine/tests_deprecated/functional/shared_tests/transformations/common/validation.cpp index d881a4ae07e..07ac39db41c 100644 --- a/inference-engine/tests_deprecated/functional/shared_tests/transformations/common/validation.cpp +++ b/inference-engine/tests_deprecated/functional/shared_tests/transformations/common/validation.cpp @@ -154,8 +154,7 @@ Precision getInputPrecision(const CNNLayer& layer) { } // TODO: workaround for the first Convolution: - // https://jira.devtools.intel.com/browse/CVS-26622 - // CVS-26622: [IE COMMON][LPT] Check if ScaleShift is dequantization ScaleShift(dequantizationLayersNames) before to apply transformation + // Issue-26622: [IE COMMON][LPT] Check if ScaleShift is dequantization ScaleShift(dequantizationLayersNames) before to apply transformation CNNLayerPtr eltwiseParent = eltwiseParentData->getCreatorLayer().lock(); if (eltwiseParent->type == "Input") { return Precision::U8; diff --git a/inference-engine/tests_deprecated/functional/vpu/common/layers/myriad_layers_pool_nd_test.cpp b/inference-engine/tests_deprecated/functional/vpu/common/layers/myriad_layers_pool_nd_test.cpp index e696c2b4b07..543d40091cf 100644 --- a/inference-engine/tests_deprecated/functional/vpu/common/layers/myriad_layers_pool_nd_test.cpp +++ b/inference-engine/tests_deprecated/functional/vpu/common/layers/myriad_layers_pool_nd_test.cpp @@ -120,8 +120,8 @@ INSTANTIATE_TEST_CASE_P(simple_ncdhw_max_userpad, // HACK: Exclude "same_upper" with excludePad=false case, // as 2D pool for Myriad seems to always exclude pad // -// CVS-25902 does software 2D avg pooling for Myriad support exclude-pad -// CVS-15146 HW AvgPool doesn't support excludePad parameter +// Issue-25902 does software 2D avg pooling for Myriad support exclude-pad +// Issue-15146 HW AvgPool doesn't support excludePad parameter //---------------------------------------------------------------------- INSTANTIATE_TEST_CASE_P(simple_ncdhw_avg_autopad_1, @@ -289,8 +289,8 @@ INSTANTIATE_TEST_CASE_P(simple_nchw_max_userpad, // HACK: Exclude "same_upper" with excludePad=false case, // as 2D pool for Myriad seems to always exclude pad // -// CVS-25902 does software 2D avg pooling for Myriad support exclude-pad -// CVS-15146 HW AvgPool doesn't support excludePad parameter +// Issue-25902 does software 2D avg pooling for Myriad support exclude-pad +// Issue-15146 HW AvgPool doesn't support excludePad parameter //---------------------------------------------------------------------- INSTANTIATE_TEST_CASE_P(simple_nchw_avg_autopad_1, diff --git a/inference-engine/tests_deprecated/functional/vpu/common/layers/myriad_layers_psroipooling_test.hpp b/inference-engine/tests_deprecated/functional/vpu/common/layers/myriad_layers_psroipooling_test.hpp index 66195e6bb30..e2a3f5891e9 100644 --- a/inference-engine/tests_deprecated/functional/vpu/common/layers/myriad_layers_psroipooling_test.hpp +++ b/inference-engine/tests_deprecated/functional/vpu/common/layers/myriad_layers_psroipooling_test.hpp @@ -202,7 +202,7 @@ static std::vector s_PSROIPoolingNumROIs = { TEST_P(myriadLayersTestsPSROIPooling_smoke, PSROIPooling) { #if defined(_WIN32) || defined(WIN32) - SKIP() << "Disabled for Windows. CVS-13239"; + SKIP() << "Disabled for Windows. Issue-13239"; #endif tensor_test_params dims_layer_in = std::get<0>(GetParam()); PSROIPoolingParams test_params = std::get<1>(GetParam()); diff --git a/inference-engine/tests_deprecated/unit/engines/gna/gna_graph_aot_test.cpp b/inference-engine/tests_deprecated/unit/engines/gna/gna_graph_aot_test.cpp index 2fd699c66d0..cbe99cafd76 100644 --- a/inference-engine/tests_deprecated/unit/engines/gna/gna_graph_aot_test.cpp +++ b/inference-engine/tests_deprecated/unit/engines/gna/gna_graph_aot_test.cpp @@ -42,7 +42,7 @@ TEST_F(GNAAOTTests, DISABLED_AffineWith2AffineOutputs_canbe_export_imported) { } -// Disabled because of random fails: CVS-23611 +// Disabled because of random fails: Issue-23611 TEST_F(GNAAOTTests, DISABLED_AffineWith2AffineOutputs_canbe_imported_verify_structure) { #if GNA_LIB_VER == 2