From a8298510c1034156f812672c8d30f80e03259357 Mon Sep 17 00:00:00 2001 From: fishbell Date: Wed, 29 Mar 2023 16:56:28 -0400 Subject: [PATCH 1/2] revert incorrect change for common cases Signed-off-by: fishbell --- .../shared_tests_instances/skip_tests_config.cpp | 3 ++- .../multi/gpu_remote_blob_tests.cpp | 14 ++++++++------ .../shared_tests_instances/skip_tests_config.cpp | 4 ++++ .../executable_network/exec_network_base.hpp | 6 +----- .../src/behavior/plugin/configuration_tests.cpp | 8 ++------ 5 files changed, 17 insertions(+), 18 deletions(-) diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/skip_tests_config.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/skip_tests_config.cpp index 5e246017855e49..13ef023c523dd1 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/skip_tests_config.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/skip_tests_config.cpp @@ -93,7 +93,8 @@ std::vector disabledTestPatterns() { R"(.*Behavior.*ExecutableNetworkBaseTest.*canSetConfigToExecNetWithIncorrectConfig.*)", R"(.*Hetero.*Behavior.*ExecutableNetworkBaseTest.*ExecGraphInfo.*)", R"(.*Hetero.*Behavior.*ExecutableNetworkBaseTest.*CanCreateTwoExeNetworksAndCheckFunction.*)", - + // TODO: CVS-104942 + R"(.*(Auto|Multi).*Behavior.*ExecutableNetworkBaseTest.*canLoadCorrectNetworkToGetExecutableAndCheckConfig.*)", // CPU does not support dynamic rank // Issue: CVS-66778 R"(.*smoke_BehaviorTests.*InferFullyDynamicNetworkWith(S|G)etTensor.*)", diff --git a/src/tests/functional/plugin/gpu/shared_tests_instances/multi/gpu_remote_blob_tests.cpp b/src/tests/functional/plugin/gpu/shared_tests_instances/multi/gpu_remote_blob_tests.cpp index 0d86ef2d403e28..10b67ab10d34e6 100644 --- a/src/tests/functional/plugin/gpu/shared_tests_instances/multi/gpu_remote_blob_tests.cpp +++ b/src/tests/functional/plugin/gpu/shared_tests_instances/multi/gpu_remote_blob_tests.cpp @@ -106,15 +106,17 @@ TEST_P(MultiDevice_Bind_oversubsciption_test, oversubsciptionOfInferRequest) { auto device_names_and_support_for_remote_blobs2 = []() { return std::vector{ + // another GPU (the test will test its presence), different OCL contexts + // use GPU.0 as reference, expect auto to throw exception on other hardware contexts #ifdef ENABLE_INTEL_CPU //{{CPU}, {}}, // stand-alone CPU via MULTI (no GPU), no OCL context - {{CPU, "GPU.1"}, - {ov::intel_auto::device_bind_buffer(true)}}, // CPU,GPU.1 via MULTI, no OCL context - {{CPU, "GPU.1"}, - {ov::intel_auto::device_bind_buffer(false)}}, // CPU,GPU.1 via MULTI, no OCL context + {{"GPU.1", CPU}, + {ov::intel_auto::device_bind_buffer(true)}}, + {{"GPU.1", CPU}, + {ov::intel_auto::device_bind_buffer(false)}}, #endif - {{"GPU.1"}, {}}, // another GPU (the test will test its presence), different OCL contexts - {{"GPU.1"}, {ov::intel_auto::device_bind_buffer(true)}}, // another GPU (the test will test its presence), different OCL contexts + {{"GPU.1"}, {}}, + {{"GPU.1"}, {ov::intel_auto::device_bind_buffer(true)}}, }; }; diff --git a/src/tests/functional/plugin/gpu/shared_tests_instances/skip_tests_config.cpp b/src/tests/functional/plugin/gpu/shared_tests_instances/skip_tests_config.cpp index df4e53897f4329..9ef080844e9cac 100644 --- a/src/tests/functional/plugin/gpu/shared_tests_instances/skip_tests_config.cpp +++ b/src/tests/functional/plugin/gpu/shared_tests_instances/skip_tests_config.cpp @@ -124,5 +124,9 @@ std::vector disabledTestPatterns() { // Looks like the test is targeting CPU plugin and doesn't respect that execution graph may vary from plugin to plugin R"(.*ExecGraphSerializationTest.*)", + + // TODO: support getconfig in auto/multi CVS-104942 + // TODO: move auto/multi cases to dedicated unit tests + R"(.*(Auto|Multi).*SetPropLoadNetWorkGetPropTests.*)", }; } diff --git a/src/tests/functional/plugin/shared/include/behavior/executable_network/exec_network_base.hpp b/src/tests/functional/plugin/shared/include/behavior/executable_network/exec_network_base.hpp index 85b3c6e6284cdb..e5331582cd9ebb 100644 --- a/src/tests/functional/plugin/shared/include/behavior/executable_network/exec_network_base.hpp +++ b/src/tests/functional/plugin/shared/include/behavior/executable_network/exec_network_base.hpp @@ -72,11 +72,7 @@ TEST_P(ExecutableNetworkBaseTest, canLoadCorrectNetworkToGetExecutableAndCheckCo auto execNet = ie->LoadNetwork(cnnNet, target_device, configuration); for (const auto& configItem : configuration) { InferenceEngine::Parameter param; - try { - param = execNet.GetConfig(configItem.first); - } catch (InferenceEngine::Exception&) { - ASSERT_NO_THROW(param = execNet.GetMetric(configItem.first)); - } + ASSERT_NO_THROW(param = execNet.GetConfig(configItem.first)); ASSERT_FALSE(param.empty()); ASSERT_EQ(param, InferenceEngine::Parameter(configItem.second)); } diff --git a/src/tests/functional/plugin/shared/src/behavior/plugin/configuration_tests.cpp b/src/tests/functional/plugin/shared/src/behavior/plugin/configuration_tests.cpp index 7859e364e97a1a..74d37ae30adb11 100644 --- a/src/tests/functional/plugin/shared/src/behavior/plugin/configuration_tests.cpp +++ b/src/tests/functional/plugin/shared/src/behavior/plugin/configuration_tests.cpp @@ -192,7 +192,7 @@ TEST_P(ExclusiveAsyncReqTests, excluAsyncReqTests) { ASSERT_NO_THROW(ie->LoadNetwork(cnnNet, target_device, configuration)); } -TEST_P(SetPropLoadNetWorkGetPropTests, ieSetGetConfigAndLoadNetWorkSetGetPropertyTest) { +TEST_P(SetPropLoadNetWorkGetPropTests, SetPropLoadNetWorkGetProperty) { ASSERT_NO_THROW(ie->SetConfig(configuration, target_device)); InferenceEngine::ExecutableNetwork exeNetWork; @@ -201,11 +201,7 @@ TEST_P(SetPropLoadNetWorkGetPropTests, ieSetGetConfigAndLoadNetWorkSetGetPropert //ie's setConfig and LoadNetwork should not affect each other, for config settings for (const auto& property_item : loadNetWorkConfig) { InferenceEngine::Parameter exeNetProperty; - try { - exeNetProperty = exeNetWork.GetConfig(property_item.first); - } catch (InferenceEngine::Exception&) { - ASSERT_NO_THROW(exeNetProperty = exeNetWork.GetMetric(property_item.first)); - } + ASSERT_NO_THROW(exeNetProperty = exeNetWork.GetConfig(property_item.first)); ASSERT_EQ(property_item.second, exeNetProperty.as()); } From ad3073e75c606c195b1bbc33b2ee317e69f1d031 Mon Sep 17 00:00:00 2001 From: fishbell Date: Wed, 29 Mar 2023 19:39:03 -0400 Subject: [PATCH 2/2] fix Signed-off-by: fishbell --- .../functional/shared_tests_instances/skip_tests_config.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/skip_tests_config.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/skip_tests_config.cpp index 13ef023c523dd1..a2fe8fcfb6f074 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/skip_tests_config.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/skip_tests_config.cpp @@ -95,6 +95,7 @@ std::vector disabledTestPatterns() { R"(.*Hetero.*Behavior.*ExecutableNetworkBaseTest.*CanCreateTwoExeNetworksAndCheckFunction.*)", // TODO: CVS-104942 R"(.*(Auto|Multi).*Behavior.*ExecutableNetworkBaseTest.*canLoadCorrectNetworkToGetExecutableAndCheckConfig.*)", + R"(.*(Auto|Multi).*SetPropLoadNetWorkGetPropTests.*)", // CPU does not support dynamic rank // Issue: CVS-66778 R"(.*smoke_BehaviorTests.*InferFullyDynamicNetworkWith(S|G)etTensor.*)",