OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[intel-npu] Limiting getDevice function to existing devices (#30368)
Attila Csok6ca058685e4f
diff --git a/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes/npu-device.rst b/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes/npu-device.rstindex 2ef2b323699..033ae74a985 100644--- a/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes/npu-device.rst+++ b/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes/npu-device.rst@@ -167,6 +167,7 @@ offer a limited set of supported OpenVINO features.ov::device::capabilitiesov::device::full_nameov::device::uuid+ ov::device::luid (windows only)ov::device::pci_infoov::device::gopsov::device::typediff --git a/src/plugins/intel_npu/src/backend/src/zero_backend.cpp b/src/plugins/intel_npu/src/backend/src/zero_backend.cppindex 0bd02dccb96..8043bcdb17f 100644--- a/src/plugins/intel_npu/src/backend/src/zero_backend.cpp+++ b/src/plugins/intel_npu/src/backend/src/zero_backend.cpp@@ -49,9 +49,59 @@ const std::shared_ptr<IDevice> ZeroEngineBackend::getDevice() const {}}-const std::shared_ptr<IDevice> ZeroEngineBackend::getDevice(const std::string& /*name*/) const {- // TODO Add the search of the device by platform & slice- return getDevice();+const std::shared_ptr<IDevice> ZeroEngineBackend::getDevice(const std::string& name) const {+ // sanity check - if string is empty, call the default function+ // which will pick the first available and valid npu device+ if (name.length() == 0) {+ return getDevice();+ }+ // First let's see if its a number (for device index) or a name+ int param = 0;+ try {+ param = std::stoi(name);+ } catch (...) {+ // seems like it is not a number+ param = -1;+ }+ // if it is not a number, we search for it+ if (param < 0) {+ if (_devices.find(name) != _devices.end()) {+ // string index exists, so we can return its Idevice+ return _devices.find(name)->second;+ } else {+ // try looking for a device with this name+ for (auto it = _devices.begin(); it != _devices.end(); ++it) {+ if (it->second->getName() == name) {+ return it->second;+ }+ }+ // if the loop ends w/o return = no device with this name+ OPENVINO_THROW("Could not find available NPU device with the specified name: NPU.", name);+ }+ } else {+ // parameter is a number, but can be index or arch+ // index is priority so we first check if there is a device with this index+ // if there is no device with this index, we try it as an arch number+ if (_devices.size() > (size_t)(param)) {+ // returning the n-th element (param)+ auto it = _devices.begin();+ std::advance(it, param);+ return it->second;+ } else {+ // index does not exist+ // we asume this is an arch number, so we search for the first one+ for (auto it = _devices.begin(); it != _devices.end(); ++it) {+ if (it->second->getName() == name) {+ return it->second;+ }+ }+ }++ // if we got here, it means there is no device with that arch number+ OPENVINO_THROW("Could not find available NPU device with specified arch or index: NPU.", name);+ }+ // if we got here without returning already, it means we did not find a device with requested name/index/arch+ OPENVINO_THROW("Could not find requested NPU device: NPU.", name);}const std::vector<std::string> ZeroEngineBackend::getDeviceNames() const {diff --git a/src/plugins/intel_npu/tests/functional/behavior/compiled_model/property.cpp b/src/plugins/intel_npu/tests/functional/behavior/compiled_model/property.cppnew file mode 100644index 00000000000..e9a391854fc--- /dev/null+++ b/src/plugins/intel_npu/tests/functional/behavior/compiled_model/property.cpp@@ -0,0 +1,142 @@+// Copyright (C) 2018-2025 Intel Corporation+// SPDX-License-Identifier: Apache-2.0+//++#include "internal/overload/compiled_model/property.hpp"++#include <openvino/runtime/intel_npu/properties.hpp>+#include <vector>++#include "behavior/compiled_model/properties.hpp"+#include "common/npu_test_env_cfg.hpp"+#include "common/utils.hpp"+#include "common_test_utils/subgraph_builders/conv_pool_relu.hpp"+#include "intel_npu/config/options.hpp"++using namespace ov::test::behavior;++namespace {++std::vector<std::pair<std::string, ov::Any>> exe_network_supported_properties = {+ {ov::hint::num_requests.name(), ov::Any(8)},+ {ov::hint::enable_cpu_pinning.name(), ov::Any(true)},+ {ov::hint::performance_mode.name(), ov::Any(ov::hint::PerformanceMode::THROUGHPUT)},+ {ov::enable_profiling.name(), ov::Any(true)},+ {ov::device::id.name(), ov::Any(ov::test::utils::getDeviceNameID(ov::test::utils::getDeviceName()))},+ {ov::optimal_number_of_infer_requests.name(), ov::Any(2)},+};++std::vector<std::pair<std::string, ov::Any>> exe_network_immutable_properties = {+ {std::make_pair(ov::optimal_number_of_infer_requests.name(), ov::Any(2))},+ {std::make_pair(ov::hint::enable_cpu_pinning.name(), ov::Any(false))},+ {std::make_pair(ov::supported_properties.name(), ov::Any("deadbeef"))},+ {std::make_pair(ov::model_name.name(), ov::Any("deadbeef"))}};++std::vector<std::pair<std::string, ov::Any>> plugin_public_mutable_properties = {+ {ov::hint::num_requests.name(), ov::Any(5)},+ {ov::enable_profiling.name(), ov::Any(true)},+ {ov::compilation_num_threads.name(), ov::Any(1)},+ {ov::hint::performance_mode.name(), ov::Any(ov::hint::PerformanceMode::THROUGHPUT)},+ {ov::hint::enable_cpu_pinning.name(), ov::Any(true)},+ {ov::log::level.name(), ov::Any(ov::log::Level::ERR)},+ {ov::device::id.name(), ov::Any(ov::test::utils::getDeviceNameID(ov::test::utils::getDeviceName()))},+};++std::vector<std::pair<std::string, ov::Any>> compat_plugin_internal_mutable_properties = {+ {ov::intel_npu::compilation_mode_params.name(), ov::Any("use-user-precision=false propagate-quant-dequant=0")},+ {ov::intel_npu::dma_engines.name(), ov::Any(1)},+ {ov::intel_npu::platform.name(), ov::Any(ov::intel_npu::Platform::AUTO_DETECT)},+ {ov::intel_npu::compilation_mode.name(), ov::Any("DefaultHW")},+ {ov::intel_npu::dpu_groups.name(), ov::Any(2)},+ {ov::intel_npu::defer_weights_load.name(), ov::Any(true)},+};++std::vector<std::pair<std::string, ov::Any>> plugin_internal_mutable_properties = {+ {ov::intel_npu::max_tiles.name(), ov::Any(8)},+ {ov::intel_npu::stepping.name(), ov::Any(4)},+};++std::vector<std::pair<std::string, ov::Any>> plugin_public_immutable_properties = {+ {ov::device::uuid.name(), ov::Any("deadbeef")},+ {ov::supported_properties.name(), {ov::device::full_name.name()}},+ {ov::num_streams.name(), ov::Any(ov::streams::Num(4))},+ {ov::available_devices.name(), ov::Any(std::vector<std::string>{"deadbeef"})},+ {ov::device::capabilities.name(), ov::Any(std::vector<std::string>{"deadbeef"})},+ {ov::range_for_async_infer_requests.name(),+ ov::Any(std::tuple<unsigned int, unsigned int, unsigned int>{0, 10, 1})},+ {ov::range_for_streams.name(), ov::Any(std::tuple<unsigned int, unsigned int>{0, 10})},+ {ov::optimal_number_of_infer_requests.name(), ov::Any(4)},+ {ov::intel_npu::device_alloc_mem_size.name(), ov::Any(2)},+ {ov::intel_npu::device_total_mem_size.name(), ov::Any(2)},+};++std::vector<std::pair<std::string, ov::Any>> invalid_device_ids = {+ {ov::device::id.name(), "NPU.1"},+ {ov::device::id.name(), "NPU.-1"},+ {ov::device::id.name(), "NPU.3990"},+ {ov::device::id.name(), "NPU.DUMMY"},+};++INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_ClassExecutableNetworkGetPropertiesTestNPU,+ ClassExecutableNetworkTestSuite1NPU,+ ::testing::Combine(::testing::Values(ov::test::utils::getDeviceName()),+ ::testing::ValuesIn(exe_network_supported_properties)),+ ClassExecutableNetworkTestSuite1NPU::getTestCaseName);++INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_ClassExecutableNetworkTestSuite2NPU,+ ClassExecutableNetworkTestSuite2NPU,+ ::testing::Combine(::testing::Values(ov::test::utils::getDeviceName()),+ ::testing::ValuesIn(exe_network_immutable_properties)),+ ClassExecutableNetworkTestSuite2NPU::getTestCaseName);++INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests_ClassPluginPropertiesTestNPU,+ ClassPluginPropertiesTestSuite0NPU,+ ::testing::Combine(::testing::Values(ov::test::utils::getDeviceName()),+ ::testing::ValuesIn(plugin_public_mutable_properties)),+ ClassPluginPropertiesTestNPU::getTestCaseName);++INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests_ClassPluginPropertiesTestNPU,+ ClassPluginPropertiesTestSuite1NPU,+ ::testing::Combine(::testing::Values(ov::test::utils::getDeviceName()),+ ::testing::ValuesIn(compat_plugin_internal_mutable_properties)),+ ClassPluginPropertiesTestNPU::getTestCaseName);++INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_ClassPluginPropertiesTestNPU,+ ClassPluginPropertiesTestSuite1NPU,+ ::testing::Combine(::testing::Values(ov::test::utils::getDeviceName()),+ ::testing::ValuesIn(plugin_internal_mutable_properties)),+ ClassPluginPropertiesTestNPU::getTestCaseName);++INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_ClassPluginPropertiesTest,+ ClassPluginPropertiesTestSuite2NPU,+ ::testing::Combine(::testing::Values(ov::test::utils::getDeviceName()),+ ::testing::ValuesIn(plugin_public_immutable_properties)),+ ClassPluginPropertiesTestNPU::getTestCaseName);++INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_ClassPluginPropertiesOptsTest1NPU,+ ClassPluginPropertiesTestSuite3NPU,+ ::testing::Combine(::testing::Values(ov::test::utils::getDeviceName()),+ ::testing::ValuesIn(plugin_public_immutable_properties)),+ ClassPluginPropertiesTestNPU::getTestCaseName);++INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests_ClassPluginPropertiesOptsTest2NPU,+ ClassPluginPropertiesTestSuite3NPU,+ ::testing::Combine(::testing::Values(ov::test::utils::getDeviceName()),+ ::testing::ValuesIn(plugin_public_mutable_properties)),+ ClassPluginPropertiesTestNPU::getTestCaseName);++INSTANTIATE_TEST_SUITE_P(+ smoke_BehaviorTests_ClassExecutableNetworkGetPropertiesTestNPU,+ ClassPluginPropertiesTestSuite4NPU,+ ::testing::Combine(::testing::Values(ov::test::utils::getDeviceName()),+ ::testing::ValuesIn({std::make_pair<std::string, ov::Any>("THISCONFIGKEYNOTEXIST",+ ov::Any("THISCONFIGVALUENOTEXIST"))})),+ ClassPluginPropertiesTestSuite4NPU::getTestCaseName);++INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_ClassExecutableNetworkInvalidDeviceIDTestNPU,+ ClassExecutableNetworkInvalidDeviceIDTestSuite,+ ::testing::Combine(::testing::Values(ov::test::utils::getDeviceName()),+ ::testing::ValuesIn(invalid_device_ids)),+ ClassExecutableNetworkInvalidDeviceIDTestSuite::getTestCaseName);++} // namespacediff --git a/src/plugins/intel_npu/tests/functional/internal/overload/compiled_model/property.cpp b/src/plugins/intel_npu/tests/functional/internal/overload/compiled_model/property.hppsimilarity index 55%rename from src/plugins/intel_npu/tests/functional/internal/overload/compiled_model/property.cpprename to src/plugins/intel_npu/tests/functional/internal/overload/compiled_model/property.hppindex 97b6af33167..8df1706c23d 100644--- a/src/plugins/intel_npu/tests/functional/internal/overload/compiled_model/property.cpp+++ b/src/plugins/intel_npu/tests/functional/internal/overload/compiled_model/property.hpp@@ -15,21 +15,6 @@ using namespace ov::test::behavior;namespace {-std::vector<std::pair<std::string, ov::Any>> exe_network_supported_properties = {- {ov::hint::num_requests.name(), ov::Any(8)},- {ov::hint::enable_cpu_pinning.name(), ov::Any(true)},- {ov::hint::performance_mode.name(), ov::Any(ov::hint::PerformanceMode::THROUGHPUT)},- {ov::enable_profiling.name(), ov::Any(true)},- {ov::device::id.name(), ov::Any(ov::test::utils::getDeviceNameID(ov::test::utils::getDeviceName()))},- {ov::optimal_number_of_infer_requests.name(), ov::Any(2)},-};--std::vector<std::pair<std::string, ov::Any>> exe_network_immutable_properties = {- {std::make_pair(ov::optimal_number_of_infer_requests.name(), ov::Any(2))},- {std::make_pair(ov::hint::enable_cpu_pinning.name(), ov::Any(false))},- {std::make_pair(ov::supported_properties.name(), ov::Any("deadbeef"))},- {std::make_pair(ov::model_name.name(), ov::Any("deadbeef"))}};-// ExecutableNetwork Properties testsclass ClassExecutableNetworkGetPropertiesTestNPU: public OVCompiledModelPropertiesBase,@@ -64,90 +49,6 @@ public:}};-using ClassExecutableNetworkTestSuite1NPU = ClassExecutableNetworkGetPropertiesTestNPU;--TEST_P(ClassExecutableNetworkTestSuite1NPU, PropertyIsSupportedAndImmutableAndGet) {- std::vector<ov::PropertyName> properties;-- ov::CompiledModel exeNetwork = ie.compile_model(model, deviceName);- OV_ASSERT_NO_THROW(properties = exeNetwork.get_property(ov::supported_properties));-- auto it = find(properties.cbegin(), properties.cend(), configKey);- ASSERT_TRUE(it != properties.cend());- ASSERT_FALSE(it->is_mutable());-- OV_ASSERT_NO_THROW(exeNetwork.get_property(configKey));-}--INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_ClassExecutableNetworkGetPropertiesTestNPU,- ClassExecutableNetworkTestSuite1NPU,- ::testing::Combine(::testing::Values(ov::test::utils::getDeviceName()),- ::testing::ValuesIn(exe_network_supported_properties)),- ClassExecutableNetworkTestSuite1NPU::getTestCaseName);--using ClassExecutableNetworkTestSuite2NPU = ClassExecutableNetworkGetPropertiesTestNPU;--TEST_P(ClassExecutableNetworkTestSuite2NPU, PropertyIsSupportedAndImmutableAndCanNotSet) {- std::vector<ov::PropertyName> properties;-- ov::CompiledModel exeNetwork = ie.compile_model(model, deviceName);- OV_ASSERT_NO_THROW(properties = exeNetwork.get_property(ov::supported_properties));-- auto it = find(properties.cbegin(), properties.cend(), configKey);- ASSERT_TRUE(it != properties.cend());- ASSERT_FALSE(it->is_mutable());-- ASSERT_THROW(exeNetwork.set_property({{configKey, configValue}}), ov::Exception);-}--INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_ClassExecutableNetworkTestSuite2NPU,- ClassExecutableNetworkTestSuite2NPU,- ::testing::Combine(::testing::Values(ov::test::utils::getDeviceName()),- ::testing::ValuesIn(exe_network_immutable_properties)),- ClassExecutableNetworkTestSuite2NPU::getTestCaseName);--} // namespace--namespace {--std::vector<std::pair<std::string, ov::Any>> plugin_public_mutable_properties = {- {ov::hint::num_requests.name(), ov::Any(5)},- {ov::enable_profiling.name(), ov::Any(true)},- {ov::compilation_num_threads.name(), ov::Any(1)},- {ov::hint::performance_mode.name(), ov::Any(ov::hint::PerformanceMode::THROUGHPUT)},- {ov::hint::enable_cpu_pinning.name(), ov::Any(true)},- {ov::log::level.name(), ov::Any(ov::log::Level::ERR)},- {ov::device::id.name(), ov::Any(ov::test::utils::getDeviceNameID(ov::test::utils::getDeviceName()))},-};--std::vector<std::pair<std::string, ov::Any>> compat_plugin_internal_mutable_properties = {- {ov::intel_npu::compilation_mode_params.name(), ov::Any("use-user-precision=false propagate-quant-dequant=0")},- {ov::intel_npu::dma_engines.name(), ov::Any(1)},- {ov::intel_npu::platform.name(), ov::Any(ov::intel_npu::Platform::AUTO_DETECT)},- {ov::intel_npu::compilation_mode.name(), ov::Any("DefaultHW")},- {ov::intel_npu::dpu_groups.name(), ov::Any(2)},- {ov::intel_npu::defer_weights_load.name(), ov::Any(true)},-};--std::vector<std::pair<std::string, ov::Any>> plugin_internal_mutable_properties = {- {ov::intel_npu::max_tiles.name(), ov::Any(8)},- {ov::intel_npu::stepping.name(), ov::Any(4)},-};--std::vector<std::pair<std::string, ov::Any>> plugin_public_immutable_properties = {- {ov::device::uuid.name(), ov::Any("deadbeef")},- {ov::supported_properties.name(), {ov::device::full_name.name()}},- {ov::num_streams.name(), ov::Any(ov::streams::Num(4))},- {ov::available_devices.name(), ov::Any(std::vector<std::string>{"deadbeef"})},- {ov::device::capabilities.name(), ov::Any(std::vector<std::string>{"deadbeef"})},- {ov::range_for_async_infer_requests.name(),- ov::Any(std::tuple<unsigned int, unsigned int, unsigned int>{0, 10, 1})},- {ov::range_for_streams.name(), ov::Any(std::tuple<unsigned int, unsigned int>{0, 10})},- {ov::optimal_number_of_infer_requests.name(), ov::Any(4)},- {ov::intel_npu::device_alloc_mem_size.name(), ov::Any(2)},- {ov::intel_npu::device_total_mem_size.name(), ov::Any(2)},-};-// Plugin Properties testsclass ClassPluginPropertiesTestNPU: public OVCompiledModelPropertiesBase,@@ -198,11 +99,35 @@ TEST_P(ClassPluginPropertiesTestSuite0NPU, CanSetGetPublicMutableProperty) {ASSERT_EQ(retrieved_value.as<std::string>(), configValue.as<std::string>());}-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests_ClassPluginPropertiesTestNPU,- ClassPluginPropertiesTestSuite0NPU,- ::testing::Combine(::testing::Values(ov::test::utils::getDeviceName()),- ::testing::ValuesIn(plugin_public_mutable_properties)),- ClassPluginPropertiesTestNPU::getTestCaseName);+using ClassExecutableNetworkTestSuite1NPU = ClassExecutableNetworkGetPropertiesTestNPU;++TEST_P(ClassExecutableNetworkTestSuite1NPU, PropertyIsSupportedAndImmutableAndGet) {+ std::vector<ov::PropertyName> properties;++ ov::CompiledModel exeNetwork = ie.compile_model(model, deviceName);+ OV_ASSERT_NO_THROW(properties = exeNetwork.get_property(ov::supported_properties));++ auto it = find(properties.cbegin(), properties.cend(), configKey);+ ASSERT_TRUE(it != properties.cend());+ ASSERT_FALSE(it->is_mutable());++ OV_ASSERT_NO_THROW(exeNetwork.get_property(configKey));+}++using ClassExecutableNetworkTestSuite2NPU = ClassExecutableNetworkGetPropertiesTestNPU;++TEST_P(ClassExecutableNetworkTestSuite2NPU, PropertyIsSupportedAndImmutableAndCanNotSet) {+ std::vector<ov::PropertyName> properties;++ ov::CompiledModel exeNetwork = ie.compile_model(model, deviceName);+ OV_ASSERT_NO_THROW(properties = exeNetwork.get_property(ov::supported_properties));++ auto it = find(properties.cbegin(), properties.cend(), configKey);+ ASSERT_TRUE(it != properties.cend());+ ASSERT_FALSE(it->is_mutable());++ ASSERT_THROW(exeNetwork.set_property({{configKey, configValue}}), ov::Exception);+}using ClassPluginPropertiesTestSuite1NPU = ClassPluginPropertiesTestNPU;@@ -215,18 +140,6 @@ TEST_P(ClassPluginPropertiesTestSuite1NPU, CanSetGetInternalMutableProperty) {ASSERT_EQ(retrieved_value.as<std::string>(), configValue.as<std::string>());}-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests_ClassPluginPropertiesTestNPU,- ClassPluginPropertiesTestSuite1NPU,- ::testing::Combine(::testing::Values(ov::test::utils::getDeviceName()),- ::testing::ValuesIn(compat_plugin_internal_mutable_properties)),- ClassPluginPropertiesTestNPU::getTestCaseName);--INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_ClassPluginPropertiesTestNPU,- ClassPluginPropertiesTestSuite1NPU,- ::testing::Combine(::testing::Values(ov::test::utils::getDeviceName()),- ::testing::ValuesIn(plugin_internal_mutable_properties)),- ClassPluginPropertiesTestNPU::getTestCaseName);-using ClassPluginPropertiesTestSuite2NPU = ClassPluginPropertiesTestNPU;TEST_P(ClassPluginPropertiesTestSuite2NPU, CanNotSetImmutableProperty) {@@ -249,12 +162,6 @@ TEST_P(ClassPluginPropertiesTestSuite2NPU, CanNotSetImmutableProperty) {ASSERT_EQ(orig_value.as<std::string>(), after_value.as<std::string>());}-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_ClassPluginPropertiesTest,- ClassPluginPropertiesTestSuite2NPU,- ::testing::Combine(::testing::Values(ov::test::utils::getDeviceName()),- ::testing::ValuesIn(plugin_public_immutable_properties)),- ClassPluginPropertiesTestNPU::getTestCaseName);-using ClassPluginPropertiesTestSuite3NPU = ClassPluginPropertiesTestNPU;TEST_P(ClassPluginPropertiesTestSuite3NPU, CanGetPropertyWithOptionsNotAffectingCore) {@@ -280,18 +187,6 @@ TEST_P(ClassPluginPropertiesTestSuite3NPU, CanGetPropertyWithOptionsNotAffectingASSERT_EQ(retrieved_value.as<std::string>(), retrieved_value2.as<std::string>());}-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_ClassPluginPropertiesOptsTest1NPU,- ClassPluginPropertiesTestSuite3NPU,- ::testing::Combine(::testing::Values(ov::test::utils::getDeviceName()),- ::testing::ValuesIn(plugin_public_immutable_properties)),- ClassPluginPropertiesTestNPU::getTestCaseName);--INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests_ClassPluginPropertiesOptsTest2NPU,- ClassPluginPropertiesTestSuite3NPU,- ::testing::Combine(::testing::Values(ov::test::utils::getDeviceName()),- ::testing::ValuesIn(plugin_public_mutable_properties)),- ClassPluginPropertiesTestNPU::getTestCaseName);-using ClassPluginPropertiesTestSuite4NPU = ClassExecutableNetworkGetPropertiesTestNPU;TEST_P(ClassPluginPropertiesTestSuite4NPU, CanNotSetGetInexistentProperty) {@@ -319,12 +214,13 @@ TEST_P(ClassPluginPropertiesTestSuite4NPU, CanNotSetGetInexistentProperty) {ov::Exception); // Expect to throw due to unsupported config}-INSTANTIATE_TEST_SUITE_P(- smoke_BehaviorTests_ClassExecutableNetworkGetPropertiesTestNPU,- ClassPluginPropertiesTestSuite4NPU,- ::testing::Combine(::testing::Values(ov::test::utils::getDeviceName()),- ::testing::ValuesIn({std::make_pair<std::string, ov::Any>("THISCONFIGKEYNOTEXIST",- ov::Any("THISCONFIGVALUENOTEXIST"))})),- ClassPluginPropertiesTestSuite4NPU::getTestCaseName);+using ClassExecutableNetworkInvalidDeviceIDTestSuite = ClassExecutableNetworkGetPropertiesTestNPU;++TEST_P(ClassExecutableNetworkInvalidDeviceIDTestSuite, InvalidNPUdeviceIDTest) {+ deviceName = configValue.as<std::string>();+ OV_EXPECT_THROW_HAS_SUBSTRING(ov::CompiledModel compiled_model = ie.compile_model(model, deviceName),+ ov::Exception,+ "Could not find available NPU device");+}} // namespace