diff --git a/inference-engine/src/vpu/common/include/vpu/configuration/plugin_configuration.hpp b/inference-engine/src/vpu/common/include/vpu/configuration/plugin_configuration.hpp index 5d4786f321c..8383c82932d 100644 --- a/inference-engine/src/vpu/common/include/vpu/configuration/plugin_configuration.hpp +++ b/inference-engine/src/vpu/common/include/vpu/configuration/plugin_configuration.hpp @@ -118,7 +118,7 @@ public: const std::string& operator[](const std::string& key) const; InferenceEngine::Parameter asParameter(const std::string& key) const; - + std::unordered_map getValues() const {return values;} virtual void validate() const; private: diff --git a/inference-engine/src/vpu/myriad_plugin/myriad_executable_network.cpp b/inference-engine/src/vpu/myriad_plugin/myriad_executable_network.cpp index 83e48a22595..45e4add8603 100644 --- a/inference-engine/src/vpu/myriad_plugin/myriad_executable_network.cpp +++ b/inference-engine/src/vpu/myriad_plugin/myriad_executable_network.cpp @@ -236,6 +236,15 @@ InferenceEngine::Parameter ExecutableNetwork::GetMetric(const std::string &name) } } +InferenceEngine::Parameter ExecutableNetwork::GetConfig(const std::string &name) const { + auto confValues = _config.getValues(); + auto it = confValues.find(name); + if (it != confValues.end()) { + return it->second; + } + VPU_THROW_EXCEPTION << "Unsupported ExecutableNetwork config key: " << name; +} + std::shared_ptr ExecutableNetwork::GetExecGraphInfo() { auto perfInfo = _executor->getPerfTimeInfo(_graphDesc._graphHandle); if (_graphDesc._name == importedNetworkName) diff --git a/inference-engine/src/vpu/myriad_plugin/myriad_executable_network.h b/inference-engine/src/vpu/myriad_plugin/myriad_executable_network.h index ceb54714f28..69af0fca273 100644 --- a/inference-engine/src/vpu/myriad_plugin/myriad_executable_network.h +++ b/inference-engine/src/vpu/myriad_plugin/myriad_executable_network.h @@ -101,6 +101,7 @@ public: } ie::Parameter GetMetric(const std::string &name) const override; + InferenceEngine::Parameter GetConfig(const std::string &name) const override; std::shared_ptr GetExecGraphInfo() override; diff --git a/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_infer_request/callback.cpp b/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_infer_request/callback.cpp new file mode 100644 index 00000000000..c9aaa7b5fb6 --- /dev/null +++ b/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_infer_request/callback.cpp @@ -0,0 +1,37 @@ +// Copyright (C) 2018-2021 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include + +#include "behavior/ov_infer_request/callback.hpp" + +using namespace ov::test::behavior; + +namespace { +const std::vector> configs = { + {}, +}; + +const std::vector> multiConfigs = { + {{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_MYRIAD}} +}; + +INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVInferRequestCallbackTests, + ::testing::Combine( + ::testing::Values(CommonTestUtils::DEVICE_MYRIAD), + ::testing::ValuesIn(configs)), + OVInferRequestCallbackTests::getTestCaseName); + +INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, OVInferRequestCallbackTests, + ::testing::Combine( + ::testing::Values(CommonTestUtils::DEVICE_MULTI), + ::testing::ValuesIn(multiConfigs)), + OVInferRequestCallbackTests::getTestCaseName); + +INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, OVInferRequestCallbackTests, + ::testing::Combine( + ::testing::Values(CommonTestUtils::DEVICE_AUTO), + ::testing::ValuesIn(multiConfigs)), + OVInferRequestCallbackTests::getTestCaseName); +} // namespace diff --git a/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_infer_request/cancellation.cpp b/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_infer_request/cancellation.cpp new file mode 100644 index 00000000000..e00764a32ca --- /dev/null +++ b/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_infer_request/cancellation.cpp @@ -0,0 +1,19 @@ +// Copyright (C) 2018-2021 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "behavior/ov_infer_request/cancellation.hpp" + +using namespace ov::test::behavior; + +namespace { +const std::vector> configs = { + {}, +}; + +INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVInferRequestCancellationTests, + ::testing::Combine( + ::testing::Values(CommonTestUtils::DEVICE_MYRIAD), + ::testing::ValuesIn(configs)), + OVInferRequestCancellationTests::getTestCaseName); +} // namespace diff --git a/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/infer_request_dynamic.cpp b/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_infer_request/infer_request_dynamic.cpp similarity index 98% rename from src/tests/functional/plugin/myriad/shared_tests_instances/behavior/infer_request_dynamic.cpp rename to src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_infer_request/infer_request_dynamic.cpp index a7558eebe09..7d2989d3044 100644 --- a/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/infer_request_dynamic.cpp +++ b/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_infer_request/infer_request_dynamic.cpp @@ -23,7 +23,7 @@ const std::vector> configs = { }; const std::vector> HeteroConfigs = { - {{"TARGET_FALLBACK", CommonTestUtils::DEVICE_CPU}} + {{"TARGET_FALLBACK", CommonTestUtils::DEVICE_MYRIAD}} }; std::shared_ptr getFunction1() { diff --git a/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_infer_request/io_tensor.cpp b/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_infer_request/io_tensor.cpp new file mode 100644 index 00000000000..79808ac0acf --- /dev/null +++ b/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_infer_request/io_tensor.cpp @@ -0,0 +1,82 @@ +// Copyright (C) 2018-2021 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include + +#include "behavior/ov_infer_request/io_tensor.hpp" + +using namespace ov::test::behavior; + +namespace { +const std::vector> configs = { + {}, +}; + +const std::vector> Multiconfigs = { + {{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_MYRIAD}} +}; + +const std::vector> Autoconfigs = { + {{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_MYRIAD}} +}; + +INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVInferRequestIOTensorTest, + ::testing::Combine( + ::testing::Values(CommonTestUtils::DEVICE_MYRIAD), + ::testing::ValuesIn(configs)), + OVInferRequestIOTensorTest::getTestCaseName); + +INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, OVInferRequestIOTensorTest, + ::testing::Combine( + ::testing::Values(CommonTestUtils::DEVICE_MULTI), + ::testing::ValuesIn(Multiconfigs)), + OVInferRequestIOTensorTest::getTestCaseName); + +INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, OVInferRequestIOTensorTest, + ::testing::Combine( + ::testing::Values(CommonTestUtils::DEVICE_AUTO), + ::testing::ValuesIn(Autoconfigs)), + OVInferRequestIOTensorTest::getTestCaseName); + +std::vector prcs = { + ov::element::boolean, + ov::element::bf16, + ov::element::f16, + ov::element::f32, + ov::element::f64, + ov::element::i4, + ov::element::i8, + ov::element::i16, + ov::element::i32, + ov::element::i64, + ov::element::u1, + ov::element::u4, + ov::element::u8, + ov::element::u16, + ov::element::u32, + ov::element::u64, +}; + +INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVInferRequestIOTensorSetPrecisionTest, + ::testing::Combine( + ::testing::ValuesIn(prcs), + ::testing::Values(CommonTestUtils::DEVICE_MYRIAD), + ::testing::ValuesIn(configs)), + OVInferRequestIOTensorSetPrecisionTest::getTestCaseName); + +INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, OVInferRequestIOTensorSetPrecisionTest, + ::testing::Combine( + ::testing::ValuesIn(prcs), + ::testing::Values(CommonTestUtils::DEVICE_MULTI), + ::testing::ValuesIn(Multiconfigs)), + OVInferRequestIOTensorSetPrecisionTest::getTestCaseName); + +INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, OVInferRequestIOTensorSetPrecisionTest, + ::testing::Combine( + ::testing::ValuesIn(prcs), + ::testing::Values(CommonTestUtils::DEVICE_AUTO), + ::testing::ValuesIn(Autoconfigs)), + OVInferRequestIOTensorSetPrecisionTest::getTestCaseName); + +} // namespace diff --git a/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_infer_request/multithreading.cpp b/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_infer_request/multithreading.cpp new file mode 100644 index 00000000000..f65b67b3e94 --- /dev/null +++ b/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_infer_request/multithreading.cpp @@ -0,0 +1,39 @@ +// Copyright (C) 2018-2021 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include + +#include "behavior/ov_infer_request/multithreading.hpp" + +using namespace ov::test::behavior; + +namespace { + +const std::vector> configs = { + {}, +}; + +const std::vector> Multiconfigs = { + {{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_MYRIAD}} +}; + +INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVInferRequestMultithreadingTests, + ::testing::Combine( + ::testing::Values(CommonTestUtils::DEVICE_MYRIAD), + ::testing::ValuesIn(configs)), + OVInferRequestMultithreadingTests::getTestCaseName); + +INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, OVInferRequestMultithreadingTests, + ::testing::Combine( + ::testing::Values(CommonTestUtils::DEVICE_MULTI), + ::testing::ValuesIn(Multiconfigs)), + OVInferRequestMultithreadingTests::getTestCaseName); + +INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, OVInferRequestMultithreadingTests, + ::testing::Combine( + ::testing::Values(CommonTestUtils::DEVICE_AUTO), + ::testing::ValuesIn(Multiconfigs)), + OVInferRequestMultithreadingTests::getTestCaseName); + +} // namespace diff --git a/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_infer_request/perf_counters.cpp b/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_infer_request/perf_counters.cpp new file mode 100644 index 00000000000..add84985315 --- /dev/null +++ b/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_infer_request/perf_counters.cpp @@ -0,0 +1,65 @@ +// Copyright (C) 2018-2021 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "behavior/ov_infer_request/perf_counters.hpp" +#include +#include + +using namespace ov::test::behavior; + +namespace { +TEST_P(OVInferRequestPerfCountersTest, CheckOperationInProfilingInfo) { + req = execNet.create_infer_request(); + ASSERT_NO_THROW(req.infer()); + std::vector profiling_info; + ASSERT_NO_THROW(profiling_info = req.get_profiling_info()); + for (const auto& op : function->get_ops()) { + if (ov::is_type(op) || ov::is_type(op)) + continue; + auto op_is_in_profiling_info = std::any_of(std::begin(profiling_info), std::end(profiling_info), + [&] (const ov::runtime::ProfilingInfo& info) { + if (info.node_name.find(op->get_friendly_name() + "_") != std::string::npos || info.node_name == op->get_friendly_name()) { + return true; + } else { + return false; + } + }); + if (!op_is_in_profiling_info) { + std::cout << "Node w/o prof info: " << op->get_friendly_name() + << ", type : " << op->get_type_name() << std::endl; + } + ASSERT_TRUE(op_is_in_profiling_info) << "For op: " << op; + } +} + +const std::vector> configs = { + {} +}; + +const std::vector> Multiconfigs = { + {{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_MYRIAD}} +}; + +const std::vector> Autoconfigs = { + {{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_MYRIAD}} +}; + +INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVInferRequestPerfCountersTest, + ::testing::Combine( + ::testing::Values(CommonTestUtils::DEVICE_MYRIAD), + ::testing::ValuesIn(configs)), + OVInferRequestPerfCountersTest::getTestCaseName); + +INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, OVInferRequestPerfCountersTest, + ::testing::Combine( + ::testing::Values(CommonTestUtils::DEVICE_MULTI), + ::testing::ValuesIn(Multiconfigs)), + OVInferRequestPerfCountersTest::getTestCaseName); + +INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, OVInferRequestPerfCountersTest, + ::testing::Combine( + ::testing::Values(CommonTestUtils::DEVICE_AUTO), + ::testing::ValuesIn(Autoconfigs)), + OVInferRequestPerfCountersTest::getTestCaseName); +} // namespace diff --git a/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_infer_request/wait.cpp b/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_infer_request/wait.cpp new file mode 100644 index 00000000000..987dacb8806 --- /dev/null +++ b/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_infer_request/wait.cpp @@ -0,0 +1,43 @@ +// Copyright (C) 2018-2021 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include + +#include "behavior/ov_infer_request/wait.hpp" + +using namespace ov::test::behavior; + +namespace { + +const std::vector> configs = { + {}, +}; + +const std::vector> Multiconfigs = { + {{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_MYRIAD}} +}; + +const std::vector> Autoconfigs = { + {{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_MYRIAD}} +}; + +INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVInferRequestWaitTests, + ::testing::Combine( + ::testing::Values(CommonTestUtils::DEVICE_MYRIAD), + ::testing::ValuesIn(configs)), + OVInferRequestWaitTests::getTestCaseName); + +INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, OVInferRequestWaitTests, + ::testing::Combine( + ::testing::Values(CommonTestUtils::DEVICE_MULTI), + ::testing::ValuesIn(Multiconfigs)), + OVInferRequestWaitTests::getTestCaseName); + +INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, OVInferRequestWaitTests, + ::testing::Combine( + ::testing::Values(CommonTestUtils::DEVICE_AUTO), + ::testing::ValuesIn(Autoconfigs)), + OVInferRequestWaitTests::getTestCaseName); + +} // namespace diff --git a/src/tests/functional/plugin/myriad/shared_tests_instances/skip_tests_config.cpp b/src/tests/functional/plugin/myriad/shared_tests_instances/skip_tests_config.cpp index aaacb7b8df1..2d11cc32c60 100644 --- a/src/tests/functional/plugin/myriad/shared_tests_instances/skip_tests_config.cpp +++ b/src/tests/functional/plugin/myriad/shared_tests_instances/skip_tests_config.cpp @@ -24,6 +24,8 @@ std::vector disabledTestPatterns() { ".*InferDynamicNetworkWithSetTensor2times.*", ".*InferRequestDynamicTests.GetSameTensor2times.*", ".*InferRequestDynamicTests.InferDynamicNetworkWithSetTensor.*", + // TODO: Issue: 67972 + R"(.*Hetero.*InferRequestDynamicTests.*)", // TODO: Issue: 26268 ".*ConcatLayerTest.*axis=0.*", // TODO: Issue 31197