Skip to content

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

[NPU] Add 5020 to device list (#34611)

Sorin Butnariu270f75154b75
diff --git a/src/plugins/intel_npu/src/al/include/intel_npu/npu_private_properties.hpp b/src/plugins/intel_npu/src/al/include/intel_npu/npu_private_properties.hpp
index 90daca2bf74..d8d515a720b 100644
--- a/src/plugins/intel_npu/src/al/include/intel_npu/npu_private_properties.hpp
+++ b/src/plugins/intel_npu/src/al/include/intel_npu/npu_private_properties.hpp
@@ -15,6 +15,7 @@ constexpr std::string_view AUTO_DETECT = "AUTO_DETECT"; // Auto detection
constexpr std::string_view NPU3720 = "3720"; // NPU3720
constexpr std::string_view NPU4000 = "4000"; // NPU4000
constexpr std::string_view NPU5010 = "5010"; // NPU5010
+constexpr std::string_view NPU5020 = "5020"; // NPU5020
/**
* @brief Converts the given platform value to the standard one.
diff --git a/src/plugins/intel_npu/src/backend/src/zero_device.cpp b/src/plugins/intel_npu/src/backend/src/zero_device.cpp
index 600cd21d40e..227e7e001ca 100644
--- a/src/plugins/intel_npu/src/backend/src/zero_device.cpp
+++ b/src/plugins/intel_npu/src/backend/src/zero_device.cpp
@@ -72,6 +72,7 @@ std::string ZeroDevice::getName() const {
#define NPU_3720_S_DEVICE_ID 0xAD1D
#define NPU_4000_DEVICE_ID 0x643E
#define NPU_5010_DEVICE_ID 0xB03E
+#define NPU_5020_DEVICE_ID 0xFD3E
std::string name;
switch (_device_properties.deviceId) {
@@ -85,6 +86,9 @@ std::string ZeroDevice::getName() const {
case NPU_5010_DEVICE_ID:
name = ov::intel_npu::Platform::NPU5010;
break;
+ case NPU_5020_DEVICE_ID:
+ name = ov::intel_npu::Platform::NPU5020;
+ break;
case LEGACY_NPU_3000_DEVICE_ID:
OPENVINO_THROW("[LEGACY] NPU device ID 0x", std::hex, _device_properties.deviceId, " is not supported!");
default:
diff --git a/src/plugins/intel_npu/src/compiler_adapter/src/compiler_adapter_factory.cpp b/src/plugins/intel_npu/src/compiler_adapter/src/compiler_adapter_factory.cpp
index 3826563cc61..d25699973e5 100644
--- a/src/plugins/intel_npu/src/compiler_adapter/src/compiler_adapter_factory.cpp
+++ b/src/plugins/intel_npu/src/compiler_adapter/src/compiler_adapter_factory.cpp
@@ -12,7 +12,8 @@ namespace intel_npu {
ov::intel_npu::CompilerType CompilerAdapterFactory::determineAppropriateCompilerTypeBasedOnPlatform(
std::string_view platform) const {
- if (platform == ov::intel_npu::Platform::NPU4000 || platform == ov::intel_npu::Platform::NPU5010) {
+ if (platform == ov::intel_npu::Platform::NPU4000 || platform == ov::intel_npu::Platform::NPU5010 ||
+ platform == ov::intel_npu::Platform::NPU5020) {
return ov::intel_npu::CompilerType::PLUGIN;
}
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 50518b429d4..62a43b9ffc9 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
@@ -280,15 +280,21 @@ using CheckCompilerTypeProperty = ClassExecutableNetworkGetPropertiesTestNPU;
TEST_P(CheckCompilerTypeProperty, CheckCompilerTypePropertyFromCompiledModel) {
std::string platform = ov::test::utils::getTestsPlatformFromEnvironmentOr(deviceName);
- size_t pos0 = platform.find("5010");
- size_t pos1 = platform.find("4000");
+ const std::vector<std::string> plugin_compiler_platforms = {"4000", "5010", "5020"};
+ bool is_plugin_compiler_platform = false;
+ for (const auto& p : plugin_compiler_platforms) {
+ if (platform.find(p) != std::string::npos) {
+ is_plugin_compiler_platform = true;
+ break;
+ }
+ }
ov::Core core;
ov::CompiledModel compiled_model;
OV_ASSERT_NO_THROW(compiled_model = core.compile_model(model, deviceName));
auto compiler_type = compiled_model.get_property(ov::intel_npu::compiler_type);
- if (pos0 != std::string::npos || pos1 != std::string::npos) {
+ if (is_plugin_compiler_platform) {
ASSERT_TRUE(compiler_type == ov::intel_npu::CompilerType::PLUGIN);
} else {
ASSERT_TRUE(compiler_type == ov::intel_npu::CompilerType::DRIVER);
@@ -300,7 +306,7 @@ TEST_P(CheckCompilerTypeProperty, CheckCompilerTypePropertyFromCompiledModel) {
compiler_type = compiled_model.get_property(ov::intel_npu::compiler_type);
ASSERT_TRUE(compiler_type == ov::intel_npu::CompilerType::DRIVER);
- if (pos0 != std::string::npos || pos1 != std::string::npos) {
+ if (is_plugin_compiler_platform) {
OV_ASSERT_NO_THROW(compiled_model =
core.compile_model(model,
deviceName,
@@ -312,8 +318,14 @@ TEST_P(CheckCompilerTypeProperty, CheckCompilerTypePropertyFromCompiledModel) {
TEST_P(CheckCompilerTypeProperty, CheckCompilerTypePropertyAfterSettingExtraConfigToGetProperty) {
std::string platform = ov::test::utils::getTestsPlatformFromEnvironmentOr(deviceName);
- size_t pos0 = platform.find("5010");
- size_t pos1 = platform.find("4000");
+ const std::vector<std::string> plugin_compiler_platforms = {"4000", "5010", "5020"};
+ bool is_plugin_compiler_platform = false;
+ for (const auto& p : plugin_compiler_platforms) {
+ if (platform.find(p) != std::string::npos) {
+ is_plugin_compiler_platform = true;
+ break;
+ }
+ }
ov::Core core;
auto test_custom_compiler_type =
@@ -323,7 +335,7 @@ TEST_P(CheckCompilerTypeProperty, CheckCompilerTypePropertyAfterSettingExtraConf
ASSERT_TRUE(test_custom_compiler_type == ov::intel_npu::CompilerType::DRIVER);
test_custom_compiler_type = core.get_property(deviceName, ov::intel_npu::compiler_type);
- if (pos0 != std::string::npos || pos1 != std::string::npos) {
+ if (is_plugin_compiler_platform) {
ASSERT_TRUE(test_custom_compiler_type == ov::intel_npu::CompilerType::PREFER_PLUGIN);
} else {
ASSERT_TRUE(test_custom_compiler_type == ov::intel_npu::CompilerType::DRIVER);
@@ -333,7 +345,7 @@ TEST_P(CheckCompilerTypeProperty, CheckCompilerTypePropertyAfterSettingExtraConf
OV_ASSERT_NO_THROW(compiled_model = core.compile_model(model, deviceName));
auto compiler_type = compiled_model.get_property(ov::intel_npu::compiler_type);
- if (pos0 != std::string::npos || pos1 != std::string::npos) {
+ if (is_plugin_compiler_platform) {
ASSERT_TRUE(compiler_type == ov::intel_npu::CompilerType::PLUGIN);
} else {
ASSERT_TRUE(compiler_type == ov::intel_npu::CompilerType::DRIVER);
diff --git a/src/plugins/intel_npu/tests/functional/behavior/plugin_compiler_compile.cpp b/src/plugins/intel_npu/tests/functional/behavior/plugin_compiler_compile.cpp
index 43ba9f5ef2f..0b19b6d35b3 100644
--- a/src/plugins/intel_npu/tests/functional/behavior/plugin_compiler_compile.cpp
+++ b/src/plugins/intel_npu/tests/functional/behavior/plugin_compiler_compile.cpp
@@ -12,7 +12,8 @@ namespace {
const std::vector<ov::AnyMap> configs = {
{{"NPU_COMPILER_TYPE", "PLUGIN"}, {"NPU_PLATFORM", "NPU4000"}, {"NPU_CREATE_EXECUTOR", "0"}},
- {{"NPU_COMPILER_TYPE", "PLUGIN"}, {"NPU_PLATFORM", "NPU5010"}, {"NPU_CREATE_EXECUTOR", "0"}}};
+ {{"NPU_COMPILER_TYPE", "PLUGIN"}, {"NPU_PLATFORM", "NPU5010"}, {"NPU_CREATE_EXECUTOR", "0"}},
+ {{"NPU_COMPILER_TYPE", "PLUGIN"}, {"NPU_PLATFORM", "NPU5020"}, {"NPU_CREATE_EXECUTOR", "0"}}};
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTest,
TestPluginCompilerCompilationNPU,