diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/behavior/ov_plugin/properties_tests.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/behavior/ov_plugin/properties_tests.cpp index a952579791e..fdf6b5a90c8 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/behavior/ov_plugin/properties_tests.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/behavior/ov_plugin/properties_tests.cpp @@ -151,6 +151,22 @@ INSTANTIATE_TEST_SUITE_P(smoke_AutoMultiHeteroOVGetMetricPropsTest, INSTANTIATE_TEST_SUITE_P(smoke_OVGetMetricPropsTest, OVGetMetricPropsTest, ::testing::Values("CPU")); +INSTANTIATE_TEST_SUITE_P( + smoke_AutoMultiHeteroOVCheckGetSupportedROMetricsPropsTests, + OVCheckGetSupportedROMetricsPropsTests, + ::testing::Combine(::testing::Values("MULTI", "HETERO", "AUTO"), + ::testing::ValuesIn(OVCheckGetSupportedROMetricsPropsTests::configureProperties( + {ov::device::full_name.name()}))), + OVCheckGetSupportedROMetricsPropsTests::getTestCaseName); + +INSTANTIATE_TEST_SUITE_P( + smoke_OVCheckGetSupportedROMetricsPropsTests, + OVCheckGetSupportedROMetricsPropsTests, + ::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_CPU), + ::testing::ValuesIn(OVCheckGetSupportedROMetricsPropsTests::configureProperties( + {ov::device::full_name.name()}))), + OVCheckGetSupportedROMetricsPropsTests::getTestCaseName); + INSTANTIATE_TEST_SUITE_P(smoke_OVGetAvailableDevicesPropsTest, OVGetAvailableDevicesPropsTest, ::testing::Values("CPU")); @@ -158,7 +174,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_OVGetAvailableDevicesPropsTest, INSTANTIATE_TEST_SUITE_P( OVCheckSetSupportedRWMandatoryMetricsPropsTests, OVCheckSetSupportedRWMetricsPropsTests, - ::testing::Combine(::testing::Values("MULTI", "AUTO"), + ::testing::Combine(::testing::Values("MULTI:CPU", "AUTO:CPU"), ::testing::ValuesIn(OVCheckSetSupportedRWMetricsPropsTests::getRWMandatoryPropertiesValues( {ov::hint::model_priority.name(), ov::log::level.name()}))), OVCheckSetSupportedRWMetricsPropsTests::getTestCaseName); @@ -166,7 +182,7 @@ INSTANTIATE_TEST_SUITE_P( INSTANTIATE_TEST_SUITE_P( OVCheckSetSupportedRWOptionalMetricsPropsTests, OVCheckSetSupportedRWMetricsPropsTests, - ::testing::Combine(::testing::Values("MULTI", "AUTO"), + ::testing::Combine(::testing::Values("MULTI:CPU", "AUTO:CPU"), ::testing::ValuesIn(OVCheckSetSupportedRWMetricsPropsTests::getRWOptionalPropertiesValues( {ov::hint::enable_hyper_threading.name(), ov::hint::enable_cpu_pinning.name(), 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 2ac0567c072..547a6e2ff16 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 @@ -104,7 +104,7 @@ std::vector disabledTestPatterns() { R"(.*smoke_Auto_BehaviorTests.*DynamicOutputToDynamicInput.*)", R"(.*smoke_Auto_BehaviorTests.*DynamicInputToDynamicOutput.*)", // unsupported metrics - R"(.*OVGetMetricPropsTest.*OVGetMetricPropsTest.*(DEVICE_ID|MAX_BATCH_SIZE).*)", + R"(.*OVGetMetricPropsTest.*OVGetMetricPropsTest.*(MAX_BATCH_SIZE).*)", R"(.*smoke_AutoMultiHeteroOVGetMetricPropsTest.*OVGetMetricPropsTest.*(AVAILABLE_DEVICES|OPTIMIZATION_CAPABILITIES|RANGE_FOR_ASYNC_INFER_REQUESTS|RANGE_FOR_STREAMS).*)", // supports only '' as device id R"(.*OVClassQueryModelTest.*QueryModelWithDeviceID.*)", diff --git a/src/plugins/intel_gna/tests/functional/shared_tests_instances/behavior/ov_plugin/core_integration.cpp b/src/plugins/intel_gna/tests/functional/shared_tests_instances/behavior/ov_plugin/core_integration.cpp index bd7009212f8..6a0623655d1 100644 --- a/src/plugins/intel_gna/tests/functional/shared_tests_instances/behavior/ov_plugin/core_integration.cpp +++ b/src/plugins/intel_gna/tests/functional/shared_tests_instances/behavior/ov_plugin/core_integration.cpp @@ -36,6 +36,22 @@ INSTANTIATE_TEST_SUITE_P(smoke_MultiHeteroOVGetMetricPropsTest, INSTANTIATE_TEST_SUITE_P(nightly_OVGetMetricPropsTest, OVGetMetricPropsTest, ::testing::Values("GNA")); +INSTANTIATE_TEST_SUITE_P( + smoke_MultiHeteroOVCheckGetSupportedROMetricsPropsTests, + OVCheckGetSupportedROMetricsPropsTests, + ::testing::Combine(::testing::Values("MULTI", "HETERO"), + ::testing::ValuesIn(OVCheckGetSupportedROMetricsPropsTests::configureProperties( + {ov::device::full_name.name()}))), + OVCheckGetSupportedROMetricsPropsTests::getTestCaseName); + +INSTANTIATE_TEST_SUITE_P( + smoke_OVCheckGetSupportedROMetricsPropsTests, + OVCheckGetSupportedROMetricsPropsTests, + ::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_GNA), + ::testing::ValuesIn(OVCheckGetSupportedROMetricsPropsTests::configureProperties( + {ov::device::full_name.name()}))), + OVCheckGetSupportedROMetricsPropsTests::getTestCaseName); + const std::vector>> GetMetricTest_ExecutionDevice_GNA = { {"GNA", std::make_pair(ov::AnyMap{}, "GNA")}}; diff --git a/src/plugins/intel_gna/tests/functional/shared_tests_instances/skip_tests_config.cpp b/src/plugins/intel_gna/tests/functional/shared_tests_instances/skip_tests_config.cpp index 9f6a8cd4381..a67e1746968 100644 --- a/src/plugins/intel_gna/tests/functional/shared_tests_instances/skip_tests_config.cpp +++ b/src/plugins/intel_gna/tests/functional/shared_tests_instances/skip_tests_config.cpp @@ -97,7 +97,6 @@ std::vector disabledTestPatterns() { R"(.*CachingSupportCase.*LoadNet.*(ConvPoolRelu|TIwithLSTMcell1)_f32_batch2.*)", R"(.*smoke_Multi_BehaviorTests.*)", // unsupported metrics - R"(.*OVGetMetricPropsTest.*OVGetMetricPropsTest.*DEVICE_ID.*)", R"(.*smoke_MultiHeteroOVGetMetricPropsTest.*OVGetMetricPropsTest.*(AVAILABLE_DEVICES|OPTIMIZATION_CAPABILITIES|RANGE_FOR_ASYNC_INFER_REQUESTS|RANGE_FOR_STREAMS).*)", }; } diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/behavior/ov_plugin/properties_tests.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/behavior/ov_plugin/properties_tests.cpp index 358e1da504b..0ded7bc0e62 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/behavior/ov_plugin/properties_tests.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/behavior/ov_plugin/properties_tests.cpp @@ -159,7 +159,7 @@ INSTANTIATE_TEST_SUITE_P(nightly_OVGetAvailableDevicesPropsTest, INSTANTIATE_TEST_SUITE_P( smoke_MultiAutoOVCheckSetSupportedRWMetricsPropsTests, OVCheckSetSupportedRWMetricsPropsTests, - ::testing::Combine(::testing::Values("MULTI", "AUTO"), + ::testing::Combine(::testing::Values("MULTI:GPU", "AUTO:GPU"), ::testing::ValuesIn(OVCheckSetSupportedRWMetricsPropsTests::getRWMandatoryPropertiesValues( {ov::hint::model_priority.name(), ov::log::level.name()}))), OVCheckSetSupportedRWMetricsPropsTests::getTestCaseName); @@ -169,9 +169,21 @@ INSTANTIATE_TEST_SUITE_P( OVCheckGetSupportedROMetricsPropsTests, ::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_GPU), ::testing::ValuesIn(OVCheckGetSupportedROMetricsPropsTests::configureProperties( - {ov::device::uuid.name(), ov::device::gops.name(), ov::device::type.name()}))), + {ov::device::uuid.name(), ov::device::gops.name(), ov::device::type.name(), ov::device::full_name.name()}))), OVCheckGetSupportedROMetricsPropsTests::getTestCaseName); +INSTANTIATE_TEST_SUITE_P(nightly_MultiHeteroAutoBatchOVCheckChangePropComplieModleGetPropTests_DEVICE_ID, + OVCheckChangePropComplieModleGetPropTests_DEVICE_ID, + ::testing::Combine(::testing::Values("MULTI", "HETERO", "AUTO", "BATCH"), + ::testing::Values(ov::AnyMap({}))), + OVCheckChangePropComplieModleGetPropTests_DEVICE_ID::getTestCaseName); + +INSTANTIATE_TEST_SUITE_P(nightly_gpuOVCheckChangePropComplieModleGetPropTests_DEVICE_ID, + OVCheckChangePropComplieModleGetPropTests_DEVICE_ID, + ::testing::Combine(::testing::Values("GPU"), + ::testing::Values(ov::AnyMap({}))), + OVCheckChangePropComplieModleGetPropTests_DEVICE_ID::getTestCaseName); + INSTANTIATE_TEST_SUITE_P( smoke_OVCheckSetSupportedRWMetricsPropsTests, OVCheckSetSupportedRWMetricsPropsTests, diff --git a/src/plugins/template/tests/functional/shared_tests_instances/behavior/ov_plugin/properties_tests.cpp b/src/plugins/template/tests/functional/shared_tests_instances/behavior/ov_plugin/properties_tests.cpp index 92509aa5b1c..c6625bc3a12 100644 --- a/src/plugins/template/tests/functional/shared_tests_instances/behavior/ov_plugin/properties_tests.cpp +++ b/src/plugins/template/tests/functional/shared_tests_instances/behavior/ov_plugin/properties_tests.cpp @@ -87,6 +87,15 @@ INSTANTIATE_TEST_SUITE_P(smoke_AutoBatch_BehaviorTests, INSTANTIATE_TEST_SUITE_P(smoke_OVGetMetricPropsTest, OVGetMetricPropsTest, ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)); + +INSTANTIATE_TEST_SUITE_P( + smoke_OVCheckGetSupportedROMetricsPropsTests, + OVCheckGetSupportedROMetricsPropsTests, + ::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_TEMPLATE), + ::testing::ValuesIn(OVCheckGetSupportedROMetricsPropsTests::configureProperties( + {ov::device::full_name.name()}))), + OVCheckGetSupportedROMetricsPropsTests::getTestCaseName); + // // OV Class GetConfig // diff --git a/src/plugins/template/tests/functional/skip_tests_config.cpp b/src/plugins/template/tests/functional/skip_tests_config.cpp index 9edf24a12a8..73d4432627a 100644 --- a/src/plugins/template/tests/functional/skip_tests_config.cpp +++ b/src/plugins/template/tests/functional/skip_tests_config.cpp @@ -19,7 +19,7 @@ std::vector disabledTestPatterns() { R"(.*smoke_(Multi|Auto|Hetero)_BehaviorTests.*OVPropertiesTests.*canSetPropertyAndCheckGetProperty.*)", // // unsupported metrics - R"(.*smoke_OVGetMetricPropsTest.*OVGetMetricPropsTest.*(DEVICE_ID|RANGE_FOR_STREAMS|MAX_BATCH_SIZE).*)", + R"(.*smoke_OVGetMetricPropsTest.*OVGetMetricPropsTest.*(RANGE_FOR_STREAMS|MAX_BATCH_SIZE).*)", // CVS-55937 R"(.*SplitLayerTest.*numSplits=30.*)", diff --git a/src/tests/functional/plugin/conformance/test_runner/api_conformance_runner/src/behavior/ov_plugin/properties.cpp b/src/tests/functional/plugin/conformance/test_runner/api_conformance_runner/src/behavior/ov_plugin/properties.cpp index 78b0e17acb7..69868b7408e 100644 --- a/src/tests/functional/plugin/conformance/test_runner/api_conformance_runner/src/behavior/ov_plugin/properties.cpp +++ b/src/tests/functional/plugin/conformance/test_runner/api_conformance_runner/src/behavior/ov_plugin/properties.cpp @@ -35,7 +35,6 @@ INSTANTIATE_TEST_SUITE_P(ov_plugin_AutoBatch, OVPropertiesIncorrectTests, const std::vector default_properties = { {}, {ov::enable_profiling(true)}, - {ov::device::id("0")}, }; const std::vector auto_batch_properties = { @@ -80,14 +79,10 @@ INSTANTIATE_TEST_SUITE_P(ov_plugin, OVCheckSetSupportedRWMetricsPropsTests, ::testing::ValuesIn(OVCheckSetSupportedRWMetricsPropsTests::getRWOptionalPropertiesValues())), OVCheckSetSupportedRWMetricsPropsTests::getTestCaseName); -const std::vector device_properties = { - {ov::device::id("0")}, -}; - INSTANTIATE_TEST_SUITE_P(ov_plugin_mandatory, OVCheckChangePropComplieModleGetPropTests_DEVICE_ID, ::testing::Combine( ::testing::ValuesIn(return_all_possible_device_combination()), - ::testing::ValuesIn(device_properties)), + ::testing::Values(ov::AnyMap({}))), OVCheckChangePropComplieModleGetPropTests_DEVICE_ID::getTestCaseName); INSTANTIATE_TEST_SUITE_P(ov_plugin, OVCheckMetricsPropsTests_ModelDependceProps, diff --git a/src/tests/functional/plugin/shared/include/behavior/ov_plugin/properties_tests.hpp b/src/tests/functional/plugin/shared/include/behavior/ov_plugin/properties_tests.hpp index cfbc795904b..8541c50e8c6 100644 --- a/src/tests/functional/plugin/shared/include/behavior/ov_plugin/properties_tests.hpp +++ b/src/tests/functional/plugin/shared/include/behavior/ov_plugin/properties_tests.hpp @@ -56,7 +56,7 @@ public: AnyMap compileModelProperties; }; -class OVPropertiesTestsWithComplieModelProps : public testing::WithParamInterface, +class OVPropertiesTestsWithCompileModelProps : public testing::WithParamInterface, public OVPropertiesBase { public: static std::string getTestCaseName(testing::TestParamInfo obj); @@ -77,10 +77,10 @@ public: static std::vector getModelDependcePropertiesValues(); }; -using OVCheckSetSupportedRWMetricsPropsTests = OVPropertiesTestsWithComplieModelProps; -using OVCheckGetSupportedROMetricsPropsTests = OVPropertiesTestsWithComplieModelProps; -using OVCheckChangePropComplieModleGetPropTests_DEVICE_ID = OVPropertiesTestsWithComplieModelProps; -using OVCheckMetricsPropsTests_ModelDependceProps = OVPropertiesTestsWithComplieModelProps; +using OVCheckSetSupportedRWMetricsPropsTests = OVPropertiesTestsWithCompileModelProps; +using OVCheckGetSupportedROMetricsPropsTests = OVPropertiesTestsWithCompileModelProps; +using OVCheckChangePropComplieModleGetPropTests_DEVICE_ID = OVPropertiesTestsWithCompileModelProps; +using OVCheckMetricsPropsTests_ModelDependceProps = OVPropertiesTestsWithCompileModelProps; class OVClassSetDefaultDeviceIDPropTest : public OVPluginTestBase, public ::testing::WithParamInterface> { diff --git a/src/tests/functional/plugin/shared/src/behavior/ov_plugin/properties_tests.cpp b/src/tests/functional/plugin/shared/src/behavior/ov_plugin/properties_tests.cpp index 02b59bd4a91..0a10ea6f105 100644 --- a/src/tests/functional/plugin/shared/src/behavior/ov_plugin/properties_tests.cpp +++ b/src/tests/functional/plugin/shared/src/behavior/ov_plugin/properties_tests.cpp @@ -60,7 +60,7 @@ void OVSetPropComplieModleGetPropTests::SetUp() { model = ngraph::builder::subgraph::makeSplitConcat(); } -std::string OVPropertiesTestsWithComplieModelProps::getTestCaseName(testing::TestParamInfo obj) { +std::string OVPropertiesTestsWithCompileModelProps::getTestCaseName(testing::TestParamInfo obj) { std::string target_device; AnyMap properties; std::tie(target_device, properties) = obj.param; @@ -73,7 +73,7 @@ std::string OVPropertiesTestsWithComplieModelProps::getTestCaseName(testing::Tes return result.str(); } -void OVPropertiesTestsWithComplieModelProps::SetUp() { +void OVPropertiesTestsWithCompileModelProps::SetUp() { SKIP_IF_CURRENT_TEST_IS_DISABLED(); std::string temp_device; std::tie(temp_device, properties) = this->GetParam(); @@ -93,13 +93,14 @@ void OVPropertiesTestsWithComplieModelProps::SetUp() { target_device == std::string(CommonTestUtils::DEVICE_AUTO) || target_device == std::string(CommonTestUtils::DEVICE_HETERO)) { compileModelProperties = { ov::device::priorities(hw_device) }; - } else if (target_device == std::string(CommonTestUtils::DEVICE_BATCH)) { + } else if (target_device == std::string(CommonTestUtils::DEVICE_BATCH)) { compileModelProperties = {{ CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG) , hw_device}}; } + model = ngraph::builder::subgraph::makeSplitConcat(); } -void OVPropertiesTestsWithComplieModelProps::TearDown() { +void OVPropertiesTestsWithCompileModelProps::TearDown() { if (!properties.empty()) { utils::PluginCache::get().reset(); } @@ -204,9 +205,10 @@ TEST_P(OVSetPropComplieModleGetPropTests, SetPropertyAndComplieModelWithPropsWor } } -std::vector OVPropertiesTestsWithComplieModelProps::getROMandatoryProperties() { +std::vector OVPropertiesTestsWithCompileModelProps::getROMandatoryProperties() { std::vector res; res.push_back({{ov::PropertyName(ov::model_name.name(), ov::model_name.mutability), nullptr}}); + res.push_back({{ov::PropertyName(ov::device::full_name.name(), ov::model_name.mutability), nullptr}}); res.push_back({{ov::PropertyName(ov::optimal_number_of_infer_requests.name(), ov::optimal_number_of_infer_requests.mutability), nullptr}}); res.push_back({{ov::PropertyName(ov::device::architecture.name(), ov::device::architecture.mutability), nullptr}}); res.push_back({{ov::PropertyName(ov::device::type.name(), ov::device::type.mutability), nullptr}}); @@ -215,7 +217,7 @@ std::vector OVPropertiesTestsWithComplieModelProps::getROMandatoryPr return res; } -std::vector OVPropertiesTestsWithComplieModelProps::getROOptionalProperties() { +std::vector OVPropertiesTestsWithCompileModelProps::getROOptionalProperties() { std::vector res; res.push_back({{ov::PropertyName(ov::loaded_from_cache.name(), ov::loaded_from_cache.mutability), nullptr}}); res.push_back({{ov::PropertyName(ov::device::uuid.name(), ov::device::uuid.mutability), nullptr}}); @@ -225,7 +227,7 @@ std::vector OVPropertiesTestsWithComplieModelProps::getROOptionalPro return res; } -std::vector OVPropertiesTestsWithComplieModelProps::configureProperties(std::vector props) { +std::vector OVPropertiesTestsWithCompileModelProps::configureProperties(std::vector props) { std::vector res; for (auto &prop : props) { @@ -235,7 +237,7 @@ std::vector OVPropertiesTestsWithComplieModelProps::configurePropert return res; } -std::vector OVPropertiesTestsWithComplieModelProps::getRWMandatoryPropertiesValues(std::vector props) { +std::vector OVPropertiesTestsWithCompileModelProps::getRWMandatoryPropertiesValues(std::vector props) { std::vector res; if (props.empty() || std::find(props.begin(), props.end(), ov::hint::inference_precision.name()) != props.end()) { @@ -246,14 +248,14 @@ std::vector OVPropertiesTestsWithComplieModelProps::getRWMandatoryPr ov::element::boolean, ov::element::undefined, ov::element::dynamic }; for (auto &precision : ovElemTypes) { - res.push_back({{ov::PropertyName(ov::hint::inference_precision.name(), ov::hint::inference_precision.mutability), precision}}); + res.push_back({{ov::hint::inference_precision(precision)}}); } } if (props.empty() || std::find(props.begin(), props.end(), ov::hint::model_priority.name()) != props.end()) { ov::hint::Priority priorities[] = {ov::hint::Priority::LOW , ov::hint::Priority::MEDIUM, ov::hint::Priority::HIGH}; for (auto &priority : priorities) { - res.push_back({{ov::PropertyName(ov::hint::model_priority.name(), ov::hint::model_priority.mutability), priority}}); + res.push_back({{ov::hint::model_priority(priority)}}); } } @@ -261,73 +263,69 @@ std::vector OVPropertiesTestsWithComplieModelProps::getRWMandatoryPr ov::hint::PerformanceMode performance_modes[] = {ov::hint::PerformanceMode::LATENCY, ov::hint::PerformanceMode::THROUGHPUT, ov::hint::PerformanceMode::CUMULATIVE_THROUGHPUT}; for (auto &performance_mode : performance_modes) { - res.push_back({{ov::PropertyName(ov::hint::performance_mode.name(), ov::hint::performance_mode.mutability), performance_mode}}); + res.push_back({{ov::hint::performance_mode(performance_mode)}}); } } if (props.empty() || std::find(props.begin(), props.end(), ov::hint::num_requests.name()) != props.end()) { - res.push_back({{ov::PropertyName(ov::hint::num_requests.name(), ov::hint::num_requests.mutability), 1}}); + res.push_back({{ov::hint::num_requests(1)}}); } if (props.empty() || std::find(props.begin(), props.end(), ov::hint::execution_mode.name()) != props.end()) { ov::hint::ExecutionMode execution_modes[] = {ov::hint::ExecutionMode::PERFORMANCE, ov::hint::ExecutionMode::ACCURACY}; for (auto &execution_mode : execution_modes) { - res.push_back({{ov::PropertyName(ov::hint::execution_mode.name(), ov::hint::execution_mode.mutability), execution_mode}}); + res.push_back({{ov::hint::execution_mode(execution_mode)}}); } } if (props.empty() || std::find(props.begin(), props.end(), ov::enable_profiling.name()) != props.end()) { - res.push_back({{ov::PropertyName(ov::enable_profiling.name(), ov::enable_profiling.mutability), true}}); - res.push_back({{ov::PropertyName(ov::enable_profiling.name(), ov::enable_profiling.mutability), false}}); + res.push_back({{ov::enable_profiling(true)}}); + res.push_back({{ov::enable_profiling(false)}}); } if (props.empty() || std::find(props.begin(), props.end(), ov::log::level.name()) != props.end()) { ov::log::Level log_levels[] = {ov::log::Level::NO , ov::log::Level::ERR, ov::log::Level::WARNING, - ov::log::Level::INFO, ov::log::Level::DEBUG, ov::log::Level::TRACE}; + ov::log::Level::INFO, ov::log::Level::DEBUG, ov::log::Level::TRACE}; for (auto &log_level : log_levels) { - res.push_back({{ov::PropertyName(ov::log::level.name(), ov::log::level.mutability), log_level}}); + res.push_back({ov::log::level(log_level)}); } } if (props.empty() || std::find(props.begin(), props.end(), ov::enable_mmap.name()) != props.end()) { - res.push_back({{ov::PropertyName(ov::enable_mmap.name(), ov::enable_mmap.mutability), true}}); - res.push_back({{ov::PropertyName(ov::enable_mmap.name(), ov::enable_mmap.mutability), false}}); + res.push_back({ov::enable_mmap(true)}); + res.push_back({ov::enable_mmap(false)}); } if (props.empty() || std::find(props.begin(), props.end(), ov::streams::num.name()) != props.end()) { - ov::streams::Num nums[] = {ov::streams::AUTO, ov::streams::NUMA}; - for (auto &num : nums) { - res.push_back({{ov::PropertyName(ov::streams::num.name(), ov::streams::num.mutability), num}}); - // res.push_back({{ov::PropertyName(ov::num_streams.name(), ov::num_streams.mutability), num}}); - } + res.push_back({ov::streams::num(3)}); } return res; } -std::vector OVPropertiesTestsWithComplieModelProps::getRWOptionalPropertiesValues(std::vector props) { +std::vector OVPropertiesTestsWithCompileModelProps::getRWOptionalPropertiesValues(std::vector props) { std::vector res; if (props.empty() || std::find(props.begin(), props.end(), ov::inference_num_threads.name()) != props.end()) { - res.push_back({{ov::PropertyName(ov::inference_num_threads.name(), ov::inference_num_threads.mutability), 1}}); - res.push_back({{ov::PropertyName(ov::compilation_num_threads.name(), ov::compilation_num_threads.mutability), 1}}); + res.push_back({ov::inference_num_threads(1)}); + res.push_back({ov::compilation_num_threads(1)}); } if (props.empty() || std::find(props.begin(), props.end(), ov::affinity.name()) != props.end()) { ov::Affinity affinities[] = {ov::Affinity::NONE , ov::Affinity::CORE, ov::Affinity::NUMA, ov::Affinity::HYBRID_AWARE}; for (auto &affinity : affinities) { - res.push_back({{ov::PropertyName(ov::affinity.name(), ov::affinity.mutability), affinity}}); + res.push_back({ov::affinity(affinity)}); } } if (props.empty() || std::find(props.begin(), props.end(), ov::hint::enable_hyper_threading.name()) != props.end()) { - res.push_back({{ov::PropertyName(ov::hint::enable_hyper_threading.name(), ov::hint::enable_hyper_threading.mutability), true}}); - res.push_back({{ov::PropertyName(ov::hint::enable_hyper_threading.name(), ov::hint::enable_hyper_threading.mutability), false}}); + res.push_back({ov::hint::enable_hyper_threading(true)}); + res.push_back({ov::hint::enable_hyper_threading(false)}); } if (props.empty() || std::find(props.begin(), props.end(), ov::hint::enable_cpu_pinning.name()) != props.end()) { - res.push_back({{ov::PropertyName(ov::hint::enable_cpu_pinning.name(), ov::hint::enable_cpu_pinning.mutability), true}}); - res.push_back({{ov::PropertyName(ov::hint::enable_cpu_pinning.name(), ov::hint::enable_cpu_pinning.mutability), false}}); + res.push_back({ov::hint::enable_cpu_pinning(true)}); + res.push_back({ov::hint::enable_cpu_pinning(false)}); } if (props.empty() || std::find(props.begin(), props.end(), ov::hint::scheduling_core_type.name()) != props.end()) { @@ -335,7 +333,7 @@ std::vector OVPropertiesTestsWithComplieModelProps::getRWOptionalPro ov::hint::SchedulingCoreType::PCORE_ONLY, ov::hint::SchedulingCoreType::ECORE_ONLY}; for (auto &schedulingCoreType : schedulingCoreTypes) { - res.push_back({{ov::PropertyName(ov::hint::scheduling_core_type.name(), ov::hint::scheduling_core_type.mutability), schedulingCoreType}}); + res.push_back({ov::hint::scheduling_core_type(schedulingCoreType)}); } } @@ -343,7 +341,7 @@ std::vector OVPropertiesTestsWithComplieModelProps::getRWOptionalPro } TEST_P(OVCheckSetSupportedRWMetricsPropsTests, ChangeCorrectProperties) { - std::vector supported_properties; + std::vectorsupported_properties; OV_ASSERT_NO_THROW(supported_properties = core->get_property(target_device, ov::supported_properties)); for (const std::pair& property_item : properties) { auto supported = util::contains(supported_properties, property_item.first); @@ -356,13 +354,13 @@ TEST_P(OVCheckSetSupportedRWMetricsPropsTests, ChangeCorrectProperties) { if (property_item.first.is_mutable() && !property_item.second.empty()) { OV_ASSERT_NO_THROW(core->set_property(target_device, {property_item})); core->compile_model(model, target_device, compileModelProperties); - ov::Any new_property_value; - OV_ASSERT_NO_THROW(new_property_value = core->get_property(target_device, property_item.first)); - if (default_property != property_item.second) { - ASSERT_TRUE(new_property_value == property_item.second) << "Peoperty is not changed"; - } else { - ASSERT_TRUE(new_property_value == property_item.second) << "Peoperty is changed in wrong way"; - } + ov::Any actual_property_value; + OV_ASSERT_NO_THROW(actual_property_value = core->get_property(target_device, property_item.first)); + ASSERT_FALSE(actual_property_value.empty()); + + std::string expect_value = property_item.second.as(); + std::string actual_value = actual_property_value.as(); + EXPECT_EQ(actual_value, expect_value) << "Peoperty is changed in wrong way"; } } } @@ -383,29 +381,34 @@ TEST_P(OVCheckGetSupportedROMetricsPropsTests, ChangeCorrectProperties) { TEST_P(OVCheckChangePropComplieModleGetPropTests_DEVICE_ID, ChangeCorrectDeviceProperties) { std::vector supported_properties; OV_ASSERT_NO_THROW(supported_properties = core->get_property(target_device, ov::supported_properties)); + auto supported = util::contains(supported_properties, ov::device::id); + ASSERT_TRUE(supported) << "property is not supported: " << ov::device::id; - std::vector availableDevices = core->get_available_devices(); - for (int id = 0; id < availableDevices.size(); id++) { - std::string deviceName = availableDevices[id]; - auto supported = util::contains(supported_properties, ov::device::id); - ASSERT_TRUE(supported) << "property is not supported: " << ov::device::id; + auto device_ids = core->get_available_devices(); + for (auto&& device_name_with_id : device_ids) { + std::string device_name = device_name_with_id; + std::string device_id = ""; + auto pos = device_name_with_id.find('.'); + if (pos != std::string::npos) { + device_name = device_name_with_id.substr(0, pos); + device_id = device_name_with_id.substr(pos + 1, device_name_with_id.size()); + } - ov::Any default_property; - OV_ASSERT_NO_THROW(default_property = core->get_property(target_device, ov::device::id)); - ASSERT_FALSE(default_property.empty()); - OV_ASSERT_NO_THROW(core->set_property(target_device, {ov::device::id(id)})); - core->compile_model(model, target_device, compileModelProperties); - ov::Any new_property_value; - OV_ASSERT_NO_THROW(new_property_value = core->get_property(target_device, ov::device::id)); - if (default_property != deviceName) { - ASSERT_TRUE(new_property_value == deviceName) << "Peoperty is not changed"; - } else { - ASSERT_TRUE(new_property_value == deviceName) << "Peoperty is changed in wrong way"; + std::string full_name; + OV_ASSERT_NO_THROW(full_name = core->get_property(device_name, ov::device::full_name, ov::device::id(device_id))); + ASSERT_FALSE(full_name.empty()); + + if (device_id != "") { + OV_ASSERT_NO_THROW(core->set_property(device_name, {ov::device::id(device_id)})); + core->compile_model(model, device_name, compileModelProperties); + std::string actual_device_id; + OV_ASSERT_NO_THROW(actual_device_id = core->get_property(device_name, ov::device::id)); + EXPECT_EQ(device_id, actual_device_id) << "DeviceID is changed, but new value is not correct"; } } } -std::vector OVPropertiesTestsWithComplieModelProps::getModelDependcePropertiesValues() { +std::vector OVPropertiesTestsWithCompileModelProps::getModelDependcePropertiesValues() { std::vector res; // Read Only res.push_back({{ov::PropertyName(ov::optimal_batch_size.name(), ov::optimal_batch_size.mutability), nullptr}}); @@ -428,6 +431,7 @@ TEST_P(OVCheckMetricsPropsTests_ModelDependceProps, ChangeCorrectDevicePropertie ov::Any default_property; OV_ASSERT_NO_THROW(default_property = core->get_property(target_device, property_item.first)); + ASSERT_FALSE(default_property.empty()); } } @@ -535,29 +539,6 @@ TEST_P(OVGetMetricPropsTest, GetMetricAndPrintNoThrow_AVAILABLE_DEVICES) { OV_ASSERT_PROPERTY_SUPPORTED(ov::available_devices); } -TEST_P(OVGetMetricPropsTest, GetMetricAndPrintNoThrow_FULL_DEVICE_NAME) { - ov::Core ie = createCoreWithTemplate(); - std::string t; - - OV_ASSERT_NO_THROW(t = ie.get_property(target_device, ov::device::full_name)); - std::cout << "Full device name: " << std::endl << t << std::endl; - ASSERT_FALSE(t.empty()); - OV_ASSERT_PROPERTY_SUPPORTED(ov::device::full_name); -} - - -TEST_P(OVGetMetricPropsTest, GetMetricAndPrintNoThrow_DEVICE_ID) { - ov::Core ie = createCoreWithTemplate(); - std::string t; - - auto device_ids = ie.get_property(target_device, ov::available_devices); - ASSERT_GT(device_ids.size(), 0); - OV_ASSERT_NO_THROW(t = ie.get_property(target_device, ov::device::full_name, ov::device::id(device_ids.front()))); - std::cout << "Device " << device_ids.front() << " " << ", Full device name: " << std::endl << t << std::endl; - ASSERT_FALSE(t.empty()); - OV_ASSERT_PROPERTY_SUPPORTED(ov::device::full_name); -} - TEST_P(OVGetMetricPropsTest, GetMetricAndPrintNoThrow_OPTIMIZATION_CAPABILITIES) { ov::Core ie = createCoreWithTemplate(); std::vector capabilities;