diff --git a/src/inference/src/dev/core_impl.cpp b/src/inference/src/dev/core_impl.cpp index 1f1a88c39e4..095b449090c 100644 --- a/src/inference/src/dev/core_impl.cpp +++ b/src/inference/src/dev/core_impl.cpp @@ -1337,8 +1337,10 @@ ov::CoreImpl::CoreConfig::CacheConfig ov::CoreImpl::CoreConfig::get_cache_config if (parsedConfig.count(ov::cache_dir.name())) { auto cache_dir_val = parsedConfig.at(ov::cache_dir.name()).as(); auto tempConfig = CoreConfig::CacheConfig::create(cache_dir_val); - // if plugin does not explicitly support cache_dir, we need to remove it from config - if (!util::contains(plugin.get_property(ov::supported_properties), ov::cache_dir)) { + // if plugin does not explicitly support cache_dir, and if plugin is not virtual, we need to remove + // it from config + if (!util::contains(plugin.get_property(ov::supported_properties), ov::cache_dir) && + !is_virtual_device(plugin.get_name())) { parsedConfig.erase(ov::cache_dir.name()); } return tempConfig; diff --git a/src/plugins/auto/src/plugin.cpp b/src/plugins/auto/src/plugin.cpp index a8a3c3f65de..c8c7face1fa 100644 --- a/src/plugins/auto/src/plugin.cpp +++ b/src/plugins/auto/src/plugin.cpp @@ -372,8 +372,6 @@ IExecutableNetworkInternal::Ptr MultiDeviceInferencePlugin::LoadNetworkImpl(cons // Remove the performance hint as this is set by plugin logic, not from user if (!isHintSet) fullConfig.erase(ov::hint::performance_mode.name()); - if (!loadConfig.is_set_by_user(ov::cache_dir)) - fullConfig.erase(ov::cache_dir.name()); if (!loadConfig.is_set_by_user(ov::hint::execution_mode)) fullConfig.erase(ov::hint::execution_mode.name()); // collect the settings that are applicable to the devices we are loading the network to @@ -469,7 +467,6 @@ IExecutableNetworkInternal::Ptr MultiDeviceInferencePlugin::LoadNetworkImpl(cons insertPropToConfig(ov::hint::allow_auto_batching.name(), iter->deviceName, configs); if (loadConfig.is_set_by_user(ov::auto_batch_timeout)) insertPropToConfig(ov::auto_batch_timeout.name(), iter->deviceName, configs); - insertPropToConfig(ov::cache_dir.name(), iter->deviceName, configs); LOG_INFO_TAG("device:%s, priority:%ld", iter->deviceName.c_str(), iter->devicePriority); } autoSContext->_modelPath = clonedModelPath; @@ -525,8 +522,6 @@ QueryNetworkResult MultiDeviceInferencePlugin::QueryNetwork(const CNNNetwork& auto fullproperty = queryconfig.get_full_properties(); // this can be updated when plugin switch to 2.0 API std::map fullConfig = ConvertToStringMap(fullproperty); - if (!queryconfig.is_set_by_user(ov::cache_dir)) - fullConfig.erase(ov::cache_dir.name()); auto priorities = fullConfig.find(ov::device::priorities.name()); if (!priorities->second.empty()) { auto metaDevices = ParseMetaDevices(priorities->second, fullConfig); diff --git a/src/plugins/auto/src/plugin_config.cpp b/src/plugins/auto/src/plugin_config.cpp index cc305a7b5e6..a8bdede70a3 100644 --- a/src/plugins/auto/src/plugin_config.cpp +++ b/src/plugins/auto/src/plugin_config.cpp @@ -28,8 +28,7 @@ void PluginConfig::set_default() { std::make_tuple(ov::hint::num_requests, 0, UnsignedTypeValidator()), std::make_tuple(ov::intel_auto::enable_startup_fallback, true), std::make_tuple(ov::intel_auto::enable_runtime_fallback, true), - // TODO 1) cache_dir 2) allow_auto_batch 3) auto_batch_timeout - std::make_tuple(ov::cache_dir, ""), + // TODO 1) allow_auto_batch 2) auto_batch_timeout std::make_tuple(ov::hint::allow_auto_batching, true), std::make_tuple(ov::auto_batch_timeout, 1000), // Legacy API properties @@ -94,13 +93,7 @@ void PluginConfig::set_user_property(const ov::AnyMap& config, bool checkfirstle internal_properties[kv.first] = kv.second; user_properties[kv.first] = kv.second; } else { - if (device_property_validator->is_valid(ov::Any(name))) { // if it's a valid secondary, accept it - user_properties[kv.first] = kv.second; - } else if (!checkfirstlevel) { // for multi, accept it anyway when compiled model - user_properties[kv.first] = kv.second; - } else { - OPENVINO_ASSERT(false, "property ", name, ": not supported"); - } + user_properties[kv.first] = kv.second; } } } diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/behavior/ov_executable_network/properties.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/behavior/ov_executable_network/properties.cpp index a458f7afa3f..72b33abf3e8 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/behavior/ov_executable_network/properties.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/behavior/ov_executable_network/properties.cpp @@ -53,7 +53,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, OVCompiledModelPropertiesInc INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, OVCompiledModelPropertiesIncorrectTests, ::testing::Combine( - ::testing::Values(CommonTestUtils::DEVICE_AUTO), + ::testing::Values("AUTO:CPU"), ::testing::ValuesIn(auto_inproperties)), OVCompiledModelPropertiesIncorrectTests::getTestCaseName); diff --git a/src/tests/functional/plugin/shared/include/behavior/ov_executable_network/exec_network_base.hpp b/src/tests/functional/plugin/shared/include/behavior/ov_executable_network/exec_network_base.hpp index ac140964452..66ce463a659 100644 --- a/src/tests/functional/plugin/shared/include/behavior/ov_executable_network/exec_network_base.hpp +++ b/src/tests/functional/plugin/shared/include/behavior/ov_executable_network/exec_network_base.hpp @@ -150,6 +150,10 @@ TEST(OVExecutableNetworkBaseTest, smoke_LoadNetworkToDefaultDeviceNoThrow) { } TEST_P(OVExecutableNetworkBaseTest, canLoadCorrectNetworkToGetExecutableWithIncorrectConfig) { + std::set metaPlugins = {"AUTO", "MULTI", "HETERO"}; + if (metaPlugins.end() != std::find(metaPlugins.begin(), metaPlugins.end(), target_device)) { + GTEST_SKIP(); + } ov::AnyMap incorrectConfig = {{"abc", "def"}}; EXPECT_ANY_THROW(auto execNet = core->compile_model(function, target_device, incorrectConfig)); }