Improved properties handling between Core and plugins (#16296)

* [HETERO]: adopt setting device properties in benchmark_app/speech_sample for HETERO

Fix IEClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_METRICS test

Fix NumStreamsAndDefaultPerfHintToHWTest/PerHintAndDefaultPerfHintToHWTest tests

[HETERO][MULTI][AUTO] Make ov::device::properties regular property

[PYTHON] Update python BA with device properties

Update after rebase

Update src/plugins/auto/auto_executable_network.cpp

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>

Update src/plugins/auto/multi_executable_network.cpp

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>

Fix merge conflicts, apply some review comments

* Multiple improvements

* [HETERO]: adopt setting device properties in benchmark_app/speech_sample for HETERO

Fix IEClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_METRICS test

Fix NumStreamsAndDefaultPerfHintToHWTest/PerHintAndDefaultPerfHintToHWTest tests

[HETERO][MULTI][AUTO] Make ov::device::properties regular property

[PYTHON] Update python BA with device properties

Update after rebase

Update src/plugins/auto/auto_executable_network.cpp

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>

Update src/plugins/auto/multi_executable_network.cpp

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>

Fix merge conflicts, apply some review comments

* Code style, bugfix after merging improvement

* More improvements

* Even more improvements

* Commit changes in core_impl.cpp

* Added parsing of any maps

* Fixed code-style

* Fixed AB mock tests build

* Fixed comparison

* Added new AB config key

* Improvements and fixes (#147)

* Fix BA, fix GetSupportedConfig call for virtual plugins (#148)

* Fix GPU tests (#149)

* Fix BA, fix GetSupportedConfig call for virtual plugins

* Fix GPU tests

* Code style

* Improvements 10

* Fixed incorrect tests

* Revert removal cache_dir

* Revert removal cache_dir

* Fixed clean

* Supported device ID in CPU

* More fixed tests

* clang-format

* Fix legacy GPU tests (#150)

* Removed clone_map

* clang-format

* Added clone_map back

---------

Co-authored-by: Nadezhda Ageeva <nadezhda.ageeva@intel.com>
Co-authored-by: Nadezhda Ageeva <nkogteva@gmail.com>
This commit is contained in:
Ilya Lavrenov
2023-03-20 12:42:40 +00:00
committed by GitHub
co-authored by Nadezhda Ageeva Nadezhda Ageeva
parent 8b31e3aafe
commit 0c99135d44
53 changed files with 1711 additions and 840 deletions
@@ -87,7 +87,19 @@ INSTANTIATE_TEST_SUITE_P(
const std::vector<ov::AnyMap> multiConfigs = {
{ov::device::priorities(CommonTestUtils::DEVICE_CPU)}
};
const std::vector<ov::AnyMap> configsDeviceProperties = {{ov::device::properties("CPU", ov::num_streams(3))}};
const std::vector<ov::AnyMap> configsDeviceProperties = {{ov::device::properties("CPU", ov::num_streams(3))},
{ov::device::properties(ov::AnyMap{{"CPU", ov::AnyMap{ov::num_streams(3)}}})}};
const std::vector<ov::AnyMap> configsDevicePropertiesDouble = {{ov::device::properties("CPU", ov::num_streams(5)),
ov::num_streams(3)},
{ov::device::properties("CPU", ov::num_streams(5)),
ov::device::properties(ov::AnyMap{{"CPU", ov::AnyMap{ov::num_streams(7)}}}),
ov::num_streams(3)},
{ov::device::properties("CPU", ov::num_streams(3)),
ov::device::properties("CPU", ov::num_streams(5))},
{ov::device::properties("CPU", ov::num_streams(3)),
ov::device::properties(ov::AnyMap{{"CPU", ov::AnyMap{ov::num_streams(5)}}})},
{ov::device::properties(ov::AnyMap{{"CPU", ov::AnyMap{ov::num_streams(3)}}}),
ov::device::properties(ov::AnyMap{{"CPU", ov::AnyMap{ov::num_streams(5)}}})}};
const std::vector<ov::AnyMap> configsWithSecondaryProperties = {
{ov::device::properties("CPU", ov::num_streams(4))},
{ov::device::properties("CPU",
@@ -130,10 +142,41 @@ const std::vector<ov::AnyMap> autoConfigsWithSecondaryProperties = {
ov::device::properties("CPU",
ov::num_streams(4),
ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT))},
{ov::device::priorities(CommonTestUtils::DEVICE_CPU),
{ov::device::priorities(CommonTestUtils::DEVICE_GPU),
ov::device::properties("AUTO",
ov::enable_profiling(false),
ov::device::priorities(CommonTestUtils::DEVICE_GPU),
ov::device::priorities(CommonTestUtils::DEVICE_CPU),
ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY)),
ov::device::properties("CPU",
ov::num_streams(4),
ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT)),
ov::device::properties("GPU", ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY))}};
const std::vector<ov::AnyMap> heteroConfigsWithSecondaryProperties = {
{ov::device::priorities(CommonTestUtils::DEVICE_CPU),
ov::device::properties("HETERO",
ov::enable_profiling(false),
ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT))},
{ov::device::priorities(CommonTestUtils::DEVICE_CPU),
ov::device::properties("CPU",
ov::num_streams(4),
ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT))},
{ov::device::priorities(CommonTestUtils::DEVICE_CPU),
ov::device::properties("CPU",
ov::num_streams(4),
ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT)),
ov::device::properties("GPU", ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY))},
{ov::device::priorities(CommonTestUtils::DEVICE_CPU),
ov::device::properties("HETERO",
ov::enable_profiling(false),
ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY)),
ov::device::properties("CPU",
ov::num_streams(4),
ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT))},
{ov::device::priorities(CommonTestUtils::DEVICE_GPU),
ov::device::properties("HETERO",
ov::enable_profiling(false),
ov::device::priorities(CommonTestUtils::DEVICE_CPU),
ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY)),
ov::device::properties("CPU",
ov::num_streams(4),
@@ -142,7 +185,7 @@ const std::vector<ov::AnyMap> autoConfigsWithSecondaryProperties = {
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassSetDevicePriorityConfigTest, OVClassSetDevicePriorityConfigTest,
::testing::Combine(::testing::Values("MULTI", "AUTO"),
::testing::Combine(::testing::Values("MULTI", "AUTO", "HETERO"),
::testing::ValuesIn(multiConfigs)));
//
// IE Class GetConfig
@@ -265,7 +308,7 @@ INSTANTIATE_TEST_SUITE_P(
// IE Class Load network
INSTANTIATE_TEST_SUITE_P(smoke_CPU_OVClassLoadNetworkWithCorrectSecondaryPropertiesTest,
OVClassLoadNetworkWithCorrectPropertiesTest,
::testing::Combine(::testing::Values("CPU", "AUTO:CPU", "MULTI:CPU"),
::testing::Combine(::testing::Values("CPU", "AUTO:CPU", "MULTI:CPU", "HETERO:CPU"),
::testing::ValuesIn(configsWithSecondaryProperties)));
INSTANTIATE_TEST_SUITE_P(smoke_Multi_OVClassLoadNetworkWithSecondaryPropertiesTest,
@@ -278,12 +321,21 @@ INSTANTIATE_TEST_SUITE_P(smoke_AUTO_OVClassLoadNetworkWithSecondaryPropertiesTes
::testing::Combine(::testing::Values("AUTO"),
::testing::ValuesIn(autoConfigsWithSecondaryProperties)));
INSTANTIATE_TEST_SUITE_P(smoke_HETERO_OVClassLoadNetworkWithSecondaryPropertiesTest,
OVClassLoadNetworkWithCorrectPropertiesTest,
::testing::Combine(::testing::Values("HETERO"),
::testing::ValuesIn(heteroConfigsWithSecondaryProperties)));
// IE Class load and check network with ov::device::properties
INSTANTIATE_TEST_SUITE_P(smoke_CPU_OVClassLoadNetworkAndCheckWithSecondaryPropertiesTest,
OVClassLoadNetworkAndCheckSecondaryPropertiesTest,
::testing::Combine(::testing::Values("CPU", "MULTI:CPU"),
::testing::ValuesIn(configsDeviceProperties)));
INSTANTIATE_TEST_SUITE_P(smoke_CPU_OVClassLoadNetworkAndCheckWithSecondaryPropertiesDoubleTest,
OVClassLoadNetworkAndCheckSecondaryPropertiesTest,
::testing::Combine(::testing::Values("CPU", "MULTI:CPU"),
::testing::ValuesIn(configsDevicePropertiesDouble)));
INSTANTIATE_TEST_SUITE_P(
smoke_OVClassLoadNetworkTest, OVClassLoadNetworkTest,
::testing::Values("CPU"));
@@ -152,14 +152,18 @@ const std::vector<std::pair<ov::AnyMap, std::string>> automultiExeDeviceConfigs
INSTANTIATE_TEST_SUITE_P(smoke_AutoMultiCompileModelBehaviorTests,
OVCompileModelGetExecutionDeviceTests,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_AUTO,
CommonTestUtils::DEVICE_MULTI),
CommonTestUtils::DEVICE_MULTI,
CommonTestUtils::DEVICE_HETERO),
::testing::ValuesIn(automultiExeDeviceConfigs)),
OVCompileModelGetExecutionDeviceTests::getTestCaseName);
const std::vector<ov::AnyMap> auto_multi_device_properties = {
{ov::device::priorities(CommonTestUtils::DEVICE_CPU), ov::device::properties("CPU", ov::num_streams(4))},
{ov::device::priorities(CommonTestUtils::DEVICE_CPU),
ov::device::properties("CPU", ov::num_streams(4), ov::enable_profiling(true))}};
ov::device::properties("CPU", ov::num_streams(4), ov::enable_profiling(true))},
{ov::device::priorities(CommonTestUtils::DEVICE_CPU),
ov::device::properties(ov::AnyMap{{"CPU", ov::AnyMap{{ov::num_streams(4), ov::enable_profiling(true)}}}})}
};
const std::vector<ov::AnyMap> auto_multi_incorrect_device_properties = {
{ov::device::priorities(CommonTestUtils::DEVICE_CPU),
@@ -170,16 +174,18 @@ const std::vector<ov::AnyMap> auto_multi_incorrect_device_properties = {
ov::device::properties("CPU", ov::num_streams(4), ov::enable_profiling(true))}};
INSTANTIATE_TEST_SUITE_P(smoke_AutoMultiSetAndCompileModelBehaviorTestsNoThrow,
OVSetSupportPropComplieModleWithoutConfigTests,
OVSetSupportPropCompileModelWithoutConfigTests,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_AUTO,
CommonTestUtils::DEVICE_MULTI),
CommonTestUtils::DEVICE_MULTI,
CommonTestUtils::DEVICE_HETERO),
::testing::ValuesIn(auto_multi_device_properties)),
OVSetSupportPropComplieModleWithoutConfigTests::getTestCaseName);
OVSetSupportPropCompileModelWithoutConfigTests::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_AutoMultiSetAndCompileModelBehaviorTestsThrow,
OVSetUnsupportPropComplieModleWithoutConfigTests,
OVSetUnsupportPropCompileModelWithoutConfigTests,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_AUTO,
CommonTestUtils::DEVICE_MULTI),
CommonTestUtils::DEVICE_MULTI,
CommonTestUtils::DEVICE_HETERO),
::testing::ValuesIn(auto_multi_incorrect_device_properties)),
OVSetUnsupportPropComplieModleWithoutConfigTests::getTestCaseName);
OVSetUnsupportPropCompileModelWithoutConfigTests::getTestCaseName);
} // namespace
@@ -144,9 +144,6 @@ std::vector<std::string> disabledTestPatterns() {
R"(.*OVInferRequestCheckTensorPrecision.*type=i4.*)",
R"(.*OVInferRequestCheckTensorPrecision.*type=u1.*)",
R"(.*OVInferRequestCheckTensorPrecision.*type=u4.*)",
// Issue: 75022
R"(.*OVExecutableNetworkBaseTest.*LoadNetworkToDefaultDeviceNoThrow.*)",
R"(.*IEClassBasicTest.*LoadNetworkToDefaultDeviceNoThrow.*)",
// Issue: 77390
R"(.*LoopLayerCPUTest.*exec_cond=0.*)",
R"(.*LoopLayerCPUTest.*trip_count=0.*)",
@@ -168,15 +165,8 @@ std::vector<std::string> disabledTestPatterns() {
// Issue: 95590
R"(.*CachingSupportCase.*CompileModelCacheTestBase.*(TIwithLSTMcell1|MatMulBias|2InputSubtract)_(u|i).*)",
// Issue: 95607
R"(.*OVClass.*LoadNetwork.*LoadNetwork(HETEROAndDeviceIDThrows|MULTIwithAUTONoThrow|HETEROwithMULTINoThrow|MULTIwithHETERONoThrow).*)",
R"(.*OVClass.*LoadNetwork.*LoadNetwork(HETEROWithDeviceIDNoThrow|WithDeviceID|WithBigDeviceIDThrows|WithInvalidDeviceIDThrows|HETEROWithBigDeviceIDThrows).*)",
R"(.*OVClass.*QueryNetwork.*QueryNetwork(HETEROWithDeviceIDNoThrow|WithDeviceID|WithBigDeviceIDThrows|WithInvalidDeviceIDThrows|HETEROWithBigDeviceIDThrows).*)",
R"(.*OVClass.*LoadNetwork.*(DeviceID|MultiWithoutSettingDevicePrioritiesThrows).*)",
R"(.*OVClassLoadNetworkTest.*QueryNetwork(MULTIWithHETERO|HETEROWithMULTI)NoThrow_V10.*)",
R"(.*CachingSupportCase.*LoadNetworkCacheTestBase.*(TIwithLSTMcell1|MatMulBias|2InputSubtract)_(i|u).*)",
R"(.*CachingSupportCase.*ReadConcatSplitAssign.*)",
R"(.*IEClassQueryNetworkTest.*QueryNetwork.*)",
R"(.*IEClassLoadNetworkTest.*(Load|Query)Network.*)",
// Issue: 95239
// HETERO plugin lacks caching_properties definition
R"(smoke_Hetero_CachingSupportCase.*)",