Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[NPU] Fix functional tests (#34490)

Bogdan Pereanu4f5a8748a4d7
diff --git a/src/plugins/intel_npu/tests/functional/behavior/compiled_model/property.hpp b/src/plugins/intel_npu/tests/functional/behavior/compiled_model/property.hpp
index f1cfba3bf9d..50518b429d4 100644
--- a/src/plugins/intel_npu/tests/functional/behavior/compiled_model/property.hpp
+++ b/src/plugins/intel_npu/tests/functional/behavior/compiled_model/property.hpp
@@ -4,13 +4,17 @@
#pragma once
+#include <memory>
#include <openvino/runtime/intel_npu/properties.hpp>
#include <vector>
#include "behavior/compiled_model/properties.hpp"
#include "common/npu_test_env_cfg.hpp"
#include "common_test_utils/subgraph_builders/conv_pool_relu.hpp"
+#include "intel_npu/npu_private_properties.hpp"
#include "openvino/core/log.hpp"
+#include "zero_backend.hpp"
+#include "zero_device.hpp"
using namespace ov::test::behavior;
@@ -30,6 +34,18 @@ public:
LogCallbackGuard& operator=(const LogCallbackGuard&) = delete;
};
+bool has_non_negative_numeric_suffix(const std::string& value) {
+ const auto dot_pos = value.find('.');
+ if (dot_pos == std::string::npos || dot_pos + 1 >= value.size()) {
+ return false;
+ }
+
+ const auto suffix = value.substr(dot_pos + 1);
+ return std::all_of(suffix.begin(), suffix.end(), [](const char ch) {
+ return ch >= '0' && ch <= '9';
+ });
+}
+
// ExecutableNetwork Properties tests
class ClassExecutableNetworkGetPropertiesTestNPU
: public OVCompiledModelPropertiesBase,
@@ -239,6 +255,21 @@ using ClassExecutableNetworkInvalidDeviceIDTestSuite = ClassExecutableNetworkGet
TEST_P(ClassExecutableNetworkInvalidDeviceIDTestSuite, InvalidNPUdeviceIDTest) {
deviceName = configValue.as<std::string>();
+ const bool is_non_negative_numeric_device_id = has_non_negative_numeric_suffix(deviceName);
+
+ auto backend = std::make_shared<::intel_npu::ZeroEngineBackend>();
+ auto device = backend->getDevice();
+ if (device != nullptr && device->getName() == ov::intel_npu::Platform::AUTO_DETECT) {
+ if (is_non_negative_numeric_device_id) {
+ GTEST_SKIP()
+ << "Skip since AUTO_DETECT platform should ignore numeric suffix and find the device successfully\n";
+ }
+
+ OV_EXPECT_THROW_HAS_SUBSTRING(ov::CompiledModel compiled_model = ie.compile_model(model, deviceName),
+ ov::Exception,
+ "Compilation failed.");
+ return;
+ }
OV_EXPECT_THROW_HAS_SUBSTRING(ov::CompiledModel compiled_model = ie.compile_model(model, deviceName),
ov::Exception,
diff --git a/src/plugins/intel_npu/tests/functional/behavior/roi_tensors_tests/roi_tensors_tests.hpp b/src/plugins/intel_npu/tests/functional/behavior/roi_tensors_tests/roi_tensors_tests.hpp
index 0bdf061908f..1ae22d6462d 100644
--- a/src/plugins/intel_npu/tests/functional/behavior/roi_tensors_tests/roi_tensors_tests.hpp
+++ b/src/plugins/intel_npu/tests/functional/behavior/roi_tensors_tests/roi_tensors_tests.hpp
@@ -112,6 +112,11 @@ public:
return property == ov::intel_npu::enable_strides_for.name();
});
+ auto zeroInit = ::intel_npu::ZeroInitStructsHolder::getInstance();
+ if (zeroInit->getGraphDdiTable().version() < ZE_MAKE_VERSION(1, 16)) {
+ stridesEnabled = false;
+ }
+
if (!stridesEnabled) {
GTEST_SKIP() << "NPU_ENABLE_STRIDES_FOR property is not supported";
}
diff --git a/src/plugins/intel_npu/tests/functional/shared_tests_instances/npu_skip_func_tests.xml b/src/plugins/intel_npu/tests/functional/shared_tests_instances/npu_skip_func_tests.xml
index f81c846113d..0f63381f56f 100644
--- a/src/plugins/intel_npu/tests/functional/shared_tests_instances/npu_skip_func_tests.xml
+++ b/src/plugins/intel_npu/tests/functional/shared_tests_instances/npu_skip_func_tests.xml
@@ -876,16 +876,4 @@ Example:
</filters>
</skip_config>
- <!-- C#182232 -->
- <skip_config>
- <message>ROI Tensor tests fail since UD2026.08 CiP update.</message>
- <enable_rules>
- <device>4000</device>
- <device>5010</device>
- </enable_rules>
- <filters>
- <filter>.*RoiTensorsTestsRun.*</filter>
- </filters>
- </skip_config>
-
</skip_configs>