Skip to content

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

[NPU] Separate the compiler headers from the runtime headers (#27125)

Bogdan Pereanu5676ff88f4d1
diff --git a/src/plugins/intel_npu/cmake/features.cmake b/src/plugins/intel_npu/cmake/features.cmake
index 8a9dce04f07..0dde0f9d67f 100644
--- a/src/plugins/intel_npu/cmake/features.cmake
+++ b/src/plugins/intel_npu/cmake/features.cmake
@@ -4,12 +4,22 @@
ov_option(ENABLE_MLIR_COMPILER "Enable compilation of npu_mlir_compiler libraries" ON)
-ov_option(BUILD_COMPILER_FOR_DRIVER "Enable build of npu_driver_compiler" OFF)
+ov_option(ENABLE_NPU_RUNTIME_COMMON "Enable compilation of npu runtime common libraries" ON)
# if ENABLE_ZEROAPI_BACKEND=ON, it adds the ze_loader dependency for driver compiler
-ov_dependent_option(ENABLE_ZEROAPI_BACKEND "Enable zero-api as a plugin backend" ON "NOT BUILD_COMPILER_FOR_DRIVER" OFF)
+ov_dependent_option(ENABLE_NPU_PLUGIN_ENGINE "Enable compilation of NPU plugin engine" ON "ENABLE_NPU_RUNTIME_COMMON" OFF)
-ov_dependent_option(ENABLE_DRIVER_COMPILER_ADAPTER "Enable NPU Compiler inside driver" ON "NOT BUILD_COMPILER_FOR_DRIVER;ENABLE_ZEROAPI_BACKEND" OFF)
+ov_dependent_option(ENABLE_ZEROAPI_BACKEND "Enable zero-api as a plugin backend" ON "ENABLE_NPU_RUNTIME_COMMON;ENABLE_NPU_PLUGIN_ENGINE" OFF)
+
+ov_dependent_option(ENABLE_DRIVER_COMPILER_ADAPTER "Enable NPU Compiler inside driver" ON "ENABLE_ZEROAPI_BACKEND" OFF)
+
+if((NOT ENABLE_NPU_PLUGIN_ENGINE OR NOT ENABLE_NPU_RUNTIME_COMMON) AND ENABLE_TESTS)
+ message(FATAL_ERROR "Tests depends on npu plugin engine and npu runtime common libraries!")
+endif()
+
+if((NOT ENABLE_NPU_PLUGIN_ENGINE OR NOT ENABLE_NPU_RUNTIME_COMMON) AND ENABLE_ZEROAPI_BACKEND)
+ message(FATAL_ERROR "Zero backend depends on npu plugin engine and npu common libraries!")
+endif()
if(NOT ENABLE_ZEROAPI_BACKEND AND ENABLE_DRIVER_COMPILER_ADAPTER)
message(FATAL_ERROR "Compiler adapter depends on zero backend to use same context!")
diff --git a/src/plugins/intel_npu/src/CMakeLists.txt b/src/plugins/intel_npu/src/CMakeLists.txt
index c073aa7fbea..5530eb1f3e5 100644
--- a/src/plugins/intel_npu/src/CMakeLists.txt
+++ b/src/plugins/intel_npu/src/CMakeLists.txt
@@ -9,6 +9,10 @@ add_subdirectory(utils)
add_subdirectory(al)
+if (ENABLE_NPU_RUNTIME_COMMON)
+ add_subdirectory(common)
+endif()
+
if(ENABLE_DRIVER_COMPILER_ADAPTER AND ENABLE_ZEROAPI_BACKEND)
add_subdirectory(compiler)
endif()
@@ -17,6 +21,6 @@ if(ENABLE_ZEROAPI_BACKEND)
add_subdirectory(backend)
endif()
-if (NOT BUILD_COMPILER_FOR_DRIVER)
+if (ENABLE_NPU_PLUGIN_ENGINE)
add_subdirectory(plugin)
endif()
diff --git a/src/plugins/intel_npu/src/al/include/intel_npu/al/config/common.hpp b/src/plugins/intel_npu/src/al/include/intel_npu/config/common.hpp
similarity index 98%
rename from src/plugins/intel_npu/src/al/include/intel_npu/al/config/common.hpp
rename to src/plugins/intel_npu/src/al/include/intel_npu/config/common.hpp
index 814764b77ff..07a886adbea 100644
--- a/src/plugins/intel_npu/src/al/include/intel_npu/al/config/common.hpp
+++ b/src/plugins/intel_npu/src/al/include/intel_npu/config/common.hpp
@@ -4,8 +4,8 @@
#pragma once
-#include "intel_npu/al/config/config.hpp"
-#include "npu_private_properties.hpp"
+#include "intel_npu/config/config.hpp"
+#include "intel_npu/npu_private_properties.hpp"
#include "openvino/runtime/internal_properties.hpp"
#include "openvino/runtime/properties.hpp"
diff --git a/src/plugins/intel_npu/src/al/include/intel_npu/al/config/compiler.hpp b/src/plugins/intel_npu/src/al/include/intel_npu/config/compiler.hpp
similarity index 98%
rename from src/plugins/intel_npu/src/al/include/intel_npu/al/config/compiler.hpp
rename to src/plugins/intel_npu/src/al/include/intel_npu/config/compiler.hpp
index fc7f25d6210..a108fc86d97 100644
--- a/src/plugins/intel_npu/src/al/include/intel_npu/al/config/compiler.hpp
+++ b/src/plugins/intel_npu/src/al/include/intel_npu/config/compiler.hpp
@@ -7,8 +7,8 @@
#include <thread>
#include "common.hpp"
-#include "intel_npu/al/config/config.hpp"
-#include "npu_private_properties.hpp"
+#include "intel_npu/config/config.hpp"
+#include "intel_npu/npu_private_properties.hpp"
#include "openvino/runtime/intel_npu/properties.hpp"
namespace ov {
diff --git a/src/plugins/intel_npu/src/al/include/intel_npu/al/config/config.hpp b/src/plugins/intel_npu/src/al/include/intel_npu/config/config.hpp
similarity index 100%
rename from src/plugins/intel_npu/src/al/include/intel_npu/al/config/config.hpp
rename to src/plugins/intel_npu/src/al/include/intel_npu/config/config.hpp
diff --git a/src/plugins/intel_npu/src/al/include/intel_npu/al/config/npuw.hpp b/src/plugins/intel_npu/src/al/include/intel_npu/config/npuw.hpp
similarity index 97%
rename from src/plugins/intel_npu/src/al/include/intel_npu/al/config/npuw.hpp
rename to src/plugins/intel_npu/src/al/include/intel_npu/config/npuw.hpp
index f315d333d67..3eb7d3df218 100644
--- a/src/plugins/intel_npu/src/al/include/intel_npu/al/config/npuw.hpp
+++ b/src/plugins/intel_npu/src/al/include/intel_npu/config/npuw.hpp
@@ -7,8 +7,8 @@
#include <thread>
#include "common.hpp"
-#include "npu_private_properties.hpp"
-#include "npuw_private_properties.hpp"
+#include "intel_npu/npu_private_properties.hpp"
+#include "intel_npu/npuw_private_properties.hpp"
namespace intel_npu {
diff --git a/src/plugins/intel_npu/src/al/include/intel_npu/al/config/runtime.hpp b/src/plugins/intel_npu/src/al/include/intel_npu/config/runtime.hpp
similarity index 98%
rename from src/plugins/intel_npu/src/al/include/intel_npu/al/config/runtime.hpp
rename to src/plugins/intel_npu/src/al/include/intel_npu/config/runtime.hpp
index f3bf6476f79..d52c25f6a3e 100644
--- a/src/plugins/intel_npu/src/al/include/intel_npu/al/config/runtime.hpp
+++ b/src/plugins/intel_npu/src/al/include/intel_npu/config/runtime.hpp
@@ -4,8 +4,8 @@
#pragma once
-#include "intel_npu/al/config/config.hpp"
-#include "npu_private_properties.hpp"
+#include "intel_npu/config/config.hpp"
+#include "intel_npu/npu_private_properties.hpp"
#include "openvino/runtime/intel_npu/properties.hpp"
#include "openvino/runtime/internal_properties.hpp"
#include "openvino/runtime/properties.hpp"
diff --git a/src/plugins/intel_npu/src/al/include/intel_npu/al/icompiler.hpp b/src/plugins/intel_npu/src/al/include/intel_npu/icompiler.hpp
similarity index 99%
rename from src/plugins/intel_npu/src/al/include/intel_npu/al/icompiler.hpp
rename to src/plugins/intel_npu/src/al/include/intel_npu/icompiler.hpp
index 570e2057d9b..e0a02f12aa2 100644
--- a/src/plugins/intel_npu/src/al/include/intel_npu/al/icompiler.hpp
+++ b/src/plugins/intel_npu/src/al/include/intel_npu/icompiler.hpp
@@ -14,7 +14,7 @@
#include <unordered_map>
#include <unordered_set>
-#include "intel_npu/al/config/config.hpp"
+#include "intel_npu/config/config.hpp"
#include "openvino/core/partial_shape.hpp"
#include "openvino/core/type/element_type.hpp"
#include "openvino/runtime/common.hpp"
diff --git a/src/plugins/intel_npu/src/al/include/npu_private_properties.hpp b/src/plugins/intel_npu/src/al/include/intel_npu/npu_private_properties.hpp
similarity index 100%
rename from src/plugins/intel_npu/src/al/include/npu_private_properties.hpp
rename to src/plugins/intel_npu/src/al/include/intel_npu/npu_private_properties.hpp
diff --git a/src/plugins/intel_npu/src/al/include/npuw_private_properties.hpp b/src/plugins/intel_npu/src/al/include/intel_npu/npuw_private_properties.hpp
similarity index 100%
rename from src/plugins/intel_npu/src/al/include/npuw_private_properties.hpp
rename to src/plugins/intel_npu/src/al/include/intel_npu/npuw_private_properties.hpp
diff --git a/src/plugins/intel_npu/src/al/include/intel_npu/al/prefix.hpp b/src/plugins/intel_npu/src/al/include/intel_npu/prefix.hpp
similarity index 100%
rename from src/plugins/intel_npu/src/al/include/intel_npu/al/prefix.hpp
rename to src/plugins/intel_npu/src/al/include/intel_npu/prefix.hpp
diff --git a/src/plugins/intel_npu/src/al/include/intel_npu/al/profiling.hpp b/src/plugins/intel_npu/src/al/include/intel_npu/profiling.hpp
similarity index 100%
rename from src/plugins/intel_npu/src/al/include/intel_npu/al/profiling.hpp
rename to src/plugins/intel_npu/src/al/include/intel_npu/profiling.hpp
diff --git a/src/plugins/intel_npu/src/al/src/config/common.cpp b/src/plugins/intel_npu/src/al/src/config/common.cpp
index 04c831a3bff..5a3fed496ff 100644
--- a/src/plugins/intel_npu/src/al/src/config/common.cpp
+++ b/src/plugins/intel_npu/src/al/src/config/common.cpp
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//
-#include "intel_npu/al/config/common.hpp"
+#include "intel_npu/config/common.hpp"
using namespace intel_npu;
using namespace ov::intel_npu;
diff --git a/src/plugins/intel_npu/src/al/src/config/compiler.cpp b/src/plugins/intel_npu/src/al/src/config/compiler.cpp
index f3c37a82435..22cf050306d 100644
--- a/src/plugins/intel_npu/src/al/src/config/compiler.cpp
+++ b/src/plugins/intel_npu/src/al/src/config/compiler.cpp
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//
-#include "intel_npu/al/config/compiler.hpp"
+#include "intel_npu/config/compiler.hpp"
using namespace intel_npu;
using namespace ov::intel_npu;
diff --git a/src/plugins/intel_npu/src/al/src/config/config.cpp b/src/plugins/intel_npu/src/al/src/config/config.cpp
index 24c84ab6db2..9d4c600351a 100644
--- a/src/plugins/intel_npu/src/al/src/config/config.cpp
+++ b/src/plugins/intel_npu/src/al/src/config/config.cpp
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//
-#include "intel_npu/al/config/config.hpp"
+#include "intel_npu/config/config.hpp"
namespace intel_npu {
diff --git a/src/plugins/intel_npu/src/al/src/config/npuw.cpp b/src/plugins/intel_npu/src/al/src/config/npuw.cpp
index b5180633e43..3b108c2068b 100644
--- a/src/plugins/intel_npu/src/al/src/config/npuw.cpp
+++ b/src/plugins/intel_npu/src/al/src/config/npuw.cpp
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//
-#include "intel_npu/al/config/npuw.hpp"
+#include "intel_npu/config/npuw.hpp"
using namespace intel_npu;
using namespace ov::intel_npu;
diff --git a/src/plugins/intel_npu/src/al/src/config/runtime.cpp b/src/plugins/intel_npu/src/al/src/config/runtime.cpp
index 6b0d9b8fc4d..10f9b4a7c72 100644
--- a/src/plugins/intel_npu/src/al/src/config/runtime.cpp
+++ b/src/plugins/intel_npu/src/al/src/config/runtime.cpp
@@ -2,11 +2,11 @@
// SPDX-License-Identifier: Apache-2.0
//
-#include "intel_npu/al/config/runtime.hpp"
+#include "intel_npu/config/runtime.hpp"
#include <sstream>
-#include "intel_npu/al/config/common.hpp"
+#include "intel_npu/config/common.hpp"
#include "openvino/runtime/properties.hpp"
using namespace intel_npu;
diff --git a/src/plugins/intel_npu/src/al/src/icompiler.cpp b/src/plugins/intel_npu/src/al/src/icompiler.cpp
index 632a466d17d..3d3860e84c3 100644
--- a/src/plugins/intel_npu/src/al/src/icompiler.cpp
+++ b/src/plugins/intel_npu/src/al/src/icompiler.cpp
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//
-#include "intel_npu/al/icompiler.hpp"
+#include "intel_npu/icompiler.hpp"
namespace intel_npu {
diff --git a/src/plugins/intel_npu/src/backend/CMakeLists.txt b/src/plugins/intel_npu/src/backend/CMakeLists.txt
index e093386eae1..aadee8998a6 100644
--- a/src/plugins/intel_npu/src/backend/CMakeLists.txt
+++ b/src/plugins/intel_npu/src/backend/CMakeLists.txt
@@ -24,6 +24,7 @@ target_include_directories(${TARGET_NAME}
target_link_libraries(${TARGET_NAME}
PRIVATE
openvino::npu_al
+ openvino::npu_common
openvino_npu_zero_result_parser
ze_loader
)
diff --git a/src/plugins/intel_npu/src/backend/include/zero_backend.hpp b/src/plugins/intel_npu/src/backend/include/zero_backend.hpp
index 7323553f6dc..ba187da8faf 100644
--- a/src/plugins/intel_npu/src/backend/include/zero_backend.hpp
+++ b/src/plugins/intel_npu/src/backend/include/zero_backend.hpp
@@ -7,8 +7,8 @@
#include <map>
#include <memory>
+#include "intel_npu/common/npu.hpp"
#include "intel_npu/utils/logger/logger.hpp"
-#include "npu.hpp"
#include "zero_init.hpp"
namespace intel_npu {
diff --git a/src/plugins/intel_npu/src/backend/include/zero_device.hpp b/src/plugins/intel_npu/src/backend/include/zero_device.hpp
index 9d034b1bb40..1bf5d391d23 100644
--- a/src/plugins/intel_npu/src/backend/include/zero_device.hpp
+++ b/src/plugins/intel_npu/src/backend/include/zero_device.hpp
@@ -7,9 +7,9 @@
#include <ze_api.h>
#include <ze_graph_ext.h>
-#include "intel_npu/al/icompiled_model.hpp"
+#include "intel_npu/common/icompiled_model.hpp"
+#include "intel_npu/common/npu.hpp"
#include "intel_npu/utils/logger/logger.hpp"
-#include "npu.hpp"
#include "openvino/runtime/intel_npu/remote_properties.hpp"
#include "zero_init.hpp"
#include "zero_types.hpp"
diff --git a/src/plugins/intel_npu/src/backend/include/zero_executor.hpp b/src/plugins/intel_npu/src/backend/include/zero_executor.hpp
index c3f4cc14eb4..eeb96defc16 100644
--- a/src/plugins/intel_npu/src/backend/include/zero_executor.hpp
+++ b/src/plugins/intel_npu/src/backend/include/zero_executor.hpp
@@ -9,8 +9,8 @@
#include <mutex>
+#include "intel_npu/common/npu.hpp"
#include "intel_npu/utils/logger/logger.hpp"
-#include "npu.hpp"
#include "openvino/runtime/properties.hpp"
#include "zero_init.hpp"
#include "zero_wrappers.hpp"
diff --git a/src/plugins/intel_npu/src/backend/include/zero_host_tensor.hpp b/src/plugins/intel_npu/src/backend/include/zero_host_tensor.hpp
index ce28bf57254..52000930e2a 100644
--- a/src/plugins/intel_npu/src/backend/include/zero_host_tensor.hpp
+++ b/src/plugins/intel_npu/src/backend/include/zero_host_tensor.hpp
@@ -4,7 +4,7 @@
#pragma once
-#include "intel_npu/al/config/config.hpp"
+#include "intel_npu/config/config.hpp"
#include "openvino/runtime/itensor.hpp"
#include "zero_init.hpp"
#include "zero_remote_tensor.hpp"
diff --git a/src/plugins/intel_npu/src/backend/include/zero_infer_request.hpp b/src/plugins/intel_npu/src/backend/include/zero_infer_request.hpp
index 6d0b343bf8d..c4860a83d9e 100644
--- a/src/plugins/intel_npu/src/backend/include/zero_infer_request.hpp
+++ b/src/plugins/intel_npu/src/backend/include/zero_infer_request.hpp
@@ -7,8 +7,9 @@
#include <ze_api.h>
#include <ze_graph_ext.h>
+#include "intel_npu/common/npu.hpp"
+#include "intel_npu/common/sync_infer_request.hpp"
#include "intel_npu/utils/logger/logger.hpp"
-#include "npu.hpp"
#include "zero_executor.hpp"
#include "zero_pipeline.hpp"
#include "zero_profiling.hpp"
diff --git a/src/plugins/intel_npu/src/backend/include/zero_profiling.hpp b/src/plugins/intel_npu/src/backend/include/zero_profiling.hpp
index 53263d9491d..505a7f0185e 100644
--- a/src/plugins/intel_npu/src/backend/include/zero_profiling.hpp
+++ b/src/plugins/intel_npu/src/backend/include/zero_profiling.hpp
@@ -10,7 +10,7 @@
#include <climits>
#include <map>
-#include "intel_npu/al/config/compiler.hpp"
+#include "intel_npu/config/compiler.hpp"
#include "intel_npu/utils/logger/logger.hpp"
#include "openvino/runtime/profiling_info.hpp"
#include "zero_types.hpp"
diff --git a/src/plugins/intel_npu/src/backend/include/zero_remote_tensor.hpp b/src/plugins/intel_npu/src/backend/include/zero_remote_tensor.hpp
index ca65d99eff8..0211bd5bd08 100644
--- a/src/plugins/intel_npu/src/backend/include/zero_remote_tensor.hpp
+++ b/src/plugins/intel_npu/src/backend/include/zero_remote_tensor.hpp
@@ -8,8 +8,8 @@
#include <memory>
#include <string>
+#include "intel_npu/common/remote_tensor.hpp"
#include "openvino/runtime/intel_npu/remote_properties.hpp"
-#include "remote_tensor.hpp"
#include "zero_init.hpp"
namespace intel_npu {
diff --git a/src/plugins/intel_npu/src/backend/include/zero_types.hpp b/src/plugins/intel_npu/src/backend/include/zero_types.hpp
index 32c67988bfb..2b8738b245a 100644
--- a/src/plugins/intel_npu/src/backend/include/zero_types.hpp
+++ b/src/plugins/intel_npu/src/backend/include/zero_types.hpp
@@ -11,7 +11,7 @@
#include <string_view>
-#include "intel_npu/al/config/runtime.hpp"
+#include "intel_npu/config/runtime.hpp"
/**
* @brief Last version of Table of Graph Extension functions used within plugin
diff --git a/src/plugins/intel_npu/src/backend/include/zero_utils.hpp b/src/plugins/intel_npu/src/backend/include/zero_utils.hpp
index af10fe88fe7..4df4a9c502b 100644
--- a/src/plugins/intel_npu/src/backend/include/zero_utils.hpp
+++ b/src/plugins/intel_npu/src/backend/include/zero_utils.hpp
@@ -8,7 +8,7 @@
#include <ze_api.h>
#include <ze_graph_ext.h>
-#include "intel_npu/al/config/runtime.hpp"
+#include "intel_npu/config/runtime.hpp"
#include "intel_npu/utils/logger/logger.hpp"
#include "intel_npu/utils/zero/zero_result.hpp"
diff --git a/src/plugins/intel_npu/src/backend/src/zero_backend.cpp b/src/plugins/intel_npu/src/backend/src/zero_backend.cpp
index ccb232b16c7..01e425aba61 100644
--- a/src/plugins/intel_npu/src/backend/src/zero_backend.cpp
+++ b/src/plugins/intel_npu/src/backend/src/zero_backend.cpp
@@ -6,7 +6,7 @@
#include <vector>
-#include "intel_npu/al/config/common.hpp"
+#include "intel_npu/config/common.hpp"
#include "zero_device.hpp"
namespace intel_npu {
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 2df37a59ae1..7fd0eaf31b1 100644
--- a/src/plugins/intel_npu/src/backend/src/zero_device.cpp
+++ b/src/plugins/intel_npu/src/backend/src/zero_device.cpp
@@ -4,7 +4,7 @@
#include "zero_device.hpp"
-#include "intel_npu/al/itt.hpp"
+#include "intel_npu/common/itt.hpp"
#include "intel_npu/utils/zero/zero_api.hpp"
#include "zero_executor.hpp"
#include "zero_host_tensor.hpp"
diff --git a/src/plugins/intel_npu/src/backend/src/zero_executor.cpp b/src/plugins/intel_npu/src/backend/src/zero_executor.cpp
index 3655f0b611d..2d6779aed56 100644
--- a/src/plugins/intel_npu/src/backend/src/zero_executor.cpp
+++ b/src/plugins/intel_npu/src/backend/src/zero_executor.cpp
@@ -11,9 +11,9 @@
#include <sstream>
#include <string>
-#include "intel_npu/al/config/common.hpp"
-#include "intel_npu/al/itt.hpp"
-#include "intel_npu/al/prefix.hpp"
+#include "intel_npu/common/itt.hpp"
+#include "intel_npu/config/common.hpp"
+#include "intel_npu/prefix.hpp"
#include "openvino/runtime/properties.hpp"
#include "ze_command_queue_npu_ext.h"
#include "zero_device.hpp"
diff --git a/src/plugins/intel_npu/src/backend/src/zero_infer_request.cpp b/src/plugins/intel_npu/src/backend/src/zero_infer_request.cpp
index 2c954151a4f..7a4754fb0bd 100644
--- a/src/plugins/intel_npu/src/backend/src/zero_infer_request.cpp
+++ b/src/plugins/intel_npu/src/backend/src/zero_infer_request.cpp
@@ -4,11 +4,11 @@
#include "zero_infer_request.hpp"
-#include "intel_npu/al/config/common.hpp"
-#include "intel_npu/al/config/compiler.hpp"
-#include "intel_npu/al/config/runtime.hpp"
-#include "intel_npu/al/itt.hpp"
-#include "intel_npu/al/prefix.hpp"
+#include "intel_npu/common/itt.hpp"
+#include "intel_npu/config/common.hpp"
+#include "intel_npu/config/compiler.hpp"
+#include "intel_npu/config/runtime.hpp"
+#include "intel_npu/prefix.hpp"
#include "intel_npu/utils/zero/zero_api.hpp"
#include "openvino/op/util/op_types.hpp"
#include "openvino/runtime/intel_npu/remote_properties.hpp"
diff --git a/src/plugins/intel_npu/src/backend/src/zero_init.cpp b/src/plugins/intel_npu/src/backend/src/zero_init.cpp
index 39d0613ec64..17b916f232a 100644
--- a/src/plugins/intel_npu/src/backend/src/zero_init.cpp
+++ b/src/plugins/intel_npu/src/backend/src/zero_init.cpp
@@ -4,7 +4,7 @@
#include "zero_init.hpp"
-#include "intel_npu/al/itt.hpp"
+#include "intel_npu/common/itt.hpp"
#include "intel_npu/utils/zero/zero_api.hpp"
#include "ze_api.h"
#include "ze_command_queue_npu_ext.h"
diff --git a/src/plugins/intel_npu/src/backend/src/zero_pipeline.cpp b/src/plugins/intel_npu/src/backend/src/zero_pipeline.cpp
index cfc80d48c50..009eee6541e 100644
--- a/src/plugins/intel_npu/src/backend/src/zero_pipeline.cpp
+++ b/src/plugins/intel_npu/src/backend/src/zero_pipeline.cpp
@@ -7,8 +7,8 @@
#include <ze_api.h>
#include <ze_graph_ext.h>
-#include "intel_npu/al/itt.hpp"
-#include "intel_npu/al/prefix.hpp"
+#include "intel_npu/common/itt.hpp"
+#include "intel_npu/prefix.hpp"
#include "intel_npu/utils/logger/logger.hpp"
#include "intel_npu/utils/zero/zero_api.hpp"
#include "zero_types.hpp"
diff --git a/src/plugins/intel_npu/src/backend/src/zero_profiling.cpp b/src/plugins/intel_npu/src/backend/src/zero_profiling.cpp
index a99c9315b74..525ffb2ce96 100644
--- a/src/plugins/intel_npu/src/backend/src/zero_profiling.cpp
+++ b/src/plugins/intel_npu/src/backend/src/zero_profiling.cpp
@@ -6,8 +6,8 @@
#include <ze_graph_profiling_ext.h>
-#include "intel_npu/al/config/compiler.hpp"
-#include "intel_npu/al/profiling.hpp"
+#include "intel_npu/config/compiler.hpp"
+#include "intel_npu/profiling.hpp"
#include "intel_npu/utils/zero/zero_api.hpp"
#include "zero_profiling.hpp"
#include "zero_utils.hpp"
diff --git a/src/plugins/intel_npu/src/backend/src/zero_remote_tensor.cpp b/src/plugins/intel_npu/src/backend/src/zero_remote_tensor.cpp
index e47b454e11c..e95b14c8777 100644
--- a/src/plugins/intel_npu/src/backend/src/zero_remote_tensor.cpp
+++ b/src/plugins/intel_npu/src/backend/src/zero_remote_tensor.cpp
@@ -6,7 +6,7 @@
#include <ze_api.h>
-#include "intel_npu/al/config/common.hpp"
+#include "intel_npu/config/common.hpp"
#include "intel_npu/utils/zero/zero_api.hpp"
#include "openvino/core/type/element_iterator.hpp"
#include "zero_utils.hpp"
diff --git a/src/plugins/intel_npu/src/backend/src/zero_wrappers.cpp b/src/plugins/intel_npu/src/backend/src/zero_wrappers.cpp
index 8478eccb774..e793dc7378d 100644
--- a/src/plugins/intel_npu/src/backend/src/zero_wrappers.cpp
+++ b/src/plugins/intel_npu/src/backend/src/zero_wrappers.cpp
@@ -4,7 +4,7 @@
#include "zero_wrappers.hpp"
-#include "intel_npu/al/config/common.hpp"
+#include "intel_npu/config/common.hpp"
#include "intel_npu/utils/zero/zero_api.hpp"
#include "zero_types.hpp"
diff --git a/src/plugins/intel_npu/src/common/CMakeLists.txt b/src/plugins/intel_npu/src/common/CMakeLists.txt
new file mode 100644
index 00000000000..2d1f5d9cbb3
--- /dev/null
+++ b/src/plugins/intel_npu/src/common/CMakeLists.txt
@@ -0,0 +1,36 @@
+# Copyright (C) 2018-2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+#
+
+set(TARGET_NAME openvino_npu_common)
+
+file(GLOB_RECURSE SOURCES *.cpp *.hpp *.h)
+source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${SOURCES})
+
+add_library(${TARGET_NAME} STATIC ${SOURCES})
+add_library(openvino::npu_common ALIAS ${TARGET_NAME})
+set_target_properties(${TARGET_NAME} PROPERTIES EXPORT_NAME npu_common)
+
+target_include_directories(${TARGET_NAME}
+ PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+)
+
+target_link_libraries(${TARGET_NAME}
+ PUBLIC
+ openvino::npu_al
+ openvino::npu_logger_utils
+ openvino::runtime::dev
+)
+
+set_target_properties(${TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO})
+ov_add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME})
+
+#
+# targets install
+#
+ov_install_static_lib(${TARGET_NAME} ${NPU_PLUGIN_COMPONENT})
+
+ov_developer_package_export_targets(TARGET openvino::npu_common
+ INSTALL_INCLUDE_DIRECTORIES
+ ${CMAKE_CURRENT_SOURCE_DIR}/include)
diff --git a/src/plugins/intel_npu/src/al/include/device_helpers.hpp b/src/plugins/intel_npu/src/common/include/intel_npu/common/device_helpers.hpp
similarity index 87%
rename from src/plugins/intel_npu/src/al/include/device_helpers.hpp
rename to src/plugins/intel_npu/src/common/include/intel_npu/common/device_helpers.hpp
index 43b9ccf93ce..f9d262f65fb 100644
--- a/src/plugins/intel_npu/src/al/include/device_helpers.hpp
+++ b/src/plugins/intel_npu/src/common/include/intel_npu/common/device_helpers.hpp
@@ -7,7 +7,7 @@
#include <cstdint>
#include <map>
-#include "npu_private_properties.hpp"
+#include "intel_npu/npu_private_properties.hpp"
namespace utils {
bool isNPUDevice(const uint32_t deviceId);
diff --git a/src/plugins/intel_npu/src/al/include/intel_npu/al/icompiled_model.hpp b/src/plugins/intel_npu/src/common/include/intel_npu/common/icompiled_model.hpp
similarity index 92%
rename from src/plugins/intel_npu/src/al/include/intel_npu/al/icompiled_model.hpp
rename to src/plugins/intel_npu/src/common/include/intel_npu/common/icompiled_model.hpp
index 6d362547785..eb6a3de57e4 100644
--- a/src/plugins/intel_npu/src/al/include/intel_npu/al/icompiled_model.hpp
+++ b/src/plugins/intel_npu/src/common/include/intel_npu/common/icompiled_model.hpp
@@ -7,8 +7,8 @@
#include <memory>
#include <vector>
-#include "intel_npu/al/config/common.hpp"
-#include "intel_npu/al/icompiler.hpp"
+#include "intel_npu/config/common.hpp"
+#include "intel_npu/icompiler.hpp"
#include "openvino/runtime/icompiled_model.hpp"
namespace intel_npu {
diff --git a/src/plugins/intel_npu/src/al/include/intel_npu/al/itt.hpp b/src/plugins/intel_npu/src/common/include/intel_npu/common/itt.hpp
similarity index 100%
rename from src/plugins/intel_npu/src/al/include/intel_npu/al/itt.hpp
rename to src/plugins/intel_npu/src/common/include/intel_npu/common/itt.hpp
diff --git a/src/plugins/intel_npu/src/al/include/npu.hpp b/src/plugins/intel_npu/src/common/include/intel_npu/common/npu.hpp
similarity index 96%
rename from src/plugins/intel_npu/src/al/include/npu.hpp
rename to src/plugins/intel_npu/src/common/include/intel_npu/common/npu.hpp
index 570eedc5fa3..3259a51b25b 100644
--- a/src/plugins/intel_npu/src/al/include/npu.hpp
+++ b/src/plugins/intel_npu/src/common/include/intel_npu/common/npu.hpp
@@ -6,13 +6,13 @@
#include <cstdint>
-#include "intel_npu/al/config/config.hpp"
-#include "intel_npu/al/icompiled_model.hpp"
-#include "intel_npu/al/icompiler.hpp"
+#include "intel_npu/common/icompiled_model.hpp"
+#include "intel_npu/common/sync_infer_request.hpp"
+#include "intel_npu/config/config.hpp"
+#include "intel_npu/icompiler.hpp"
#include "openvino/runtime/intel_npu/remote_properties.hpp"
#include "openvino/runtime/iremote_context.hpp"
#include "openvino/runtime/properties.hpp"
-#include "sync_infer_request.hpp"
namespace intel_npu {
diff --git a/src/plugins/intel_npu/src/al/include/remote_tensor.hpp b/src/plugins/intel_npu/src/common/include/intel_npu/common/remote_tensor.hpp
similarity index 97%
rename from src/plugins/intel_npu/src/al/include/remote_tensor.hpp
rename to src/plugins/intel_npu/src/common/include/intel_npu/common/remote_tensor.hpp
index 3f4df1868e7..d485052c989 100644
--- a/src/plugins/intel_npu/src/al/include/remote_tensor.hpp
+++ b/src/plugins/intel_npu/src/common/include/intel_npu/common/remote_tensor.hpp
@@ -8,7 +8,7 @@
#include <memory>
#include <string>
-#include "intel_npu/al/config/config.hpp"
+#include "intel_npu/config/config.hpp"
#include "openvino/runtime/iremote_context.hpp"
#include "openvino/runtime/iremote_tensor.hpp"
diff --git a/src/plugins/intel_npu/src/al/include/sync_infer_request.hpp b/src/plugins/intel_npu/src/common/include/intel_npu/common/sync_infer_request.hpp
similarity index 98%
rename from src/plugins/intel_npu/src/al/include/sync_infer_request.hpp
rename to src/plugins/intel_npu/src/common/include/intel_npu/common/sync_infer_request.hpp
index ade70f9b67d..99f9ce7cb0e 100644
--- a/src/plugins/intel_npu/src/al/include/sync_infer_request.hpp
+++ b/src/plugins/intel_npu/src/common/include/intel_npu/common/sync_infer_request.hpp
@@ -4,11 +4,11 @@
#pragma once
-#include "intel_npu/al/icompiled_model.hpp"
-#include "intel_npu/al/icompiler.hpp"
+#include "intel_npu/common/icompiled_model.hpp"
+#include "intel_npu/common/variable_state.hpp"
+#include "intel_npu/icompiler.hpp"
#include "openvino/runtime/iinfer_request.hpp"
#include "openvino/runtime/iplugin.hpp"
-#include "variable_state.hpp"
namespace intel_npu {
diff --git a/src/plugins/intel_npu/src/al/include/variable_state.hpp b/src/plugins/intel_npu/src/common/include/intel_npu/common/variable_state.hpp
similarity index 100%
rename from src/plugins/intel_npu/src/al/include/variable_state.hpp
rename to src/plugins/intel_npu/src/common/include/intel_npu/common/variable_state.hpp
diff --git a/src/plugins/intel_npu/src/al/src/device_helpers.cpp b/src/plugins/intel_npu/src/common/src/device_helpers.cpp
similarity index 95%
rename from src/plugins/intel_npu/src/al/src/device_helpers.cpp
rename to src/plugins/intel_npu/src/common/src/device_helpers.cpp
index f06c74971bb..32d405ca4bc 100644
--- a/src/plugins/intel_npu/src/al/src/device_helpers.cpp
+++ b/src/plugins/intel_npu/src/common/src/device_helpers.cpp
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//
-#include "device_helpers.hpp"
+#include "intel_npu/common/device_helpers.hpp"
#include "openvino/core/except.hpp"
diff --git a/src/plugins/intel_npu/src/al/src/npu.cpp b/src/plugins/intel_npu/src/common/src/npu.cpp
similarity index 97%
rename from src/plugins/intel_npu/src/al/src/npu.cpp
rename to src/plugins/intel_npu/src/common/src/npu.cpp
index 8912a4e6e4f..9f1fc7be003 100644
--- a/src/plugins/intel_npu/src/al/src/npu.cpp
+++ b/src/plugins/intel_npu/src/common/src/npu.cpp
@@ -2,9 +2,9 @@
// SPDX-License-Identifier: Apache-2.0
//
-#include "npu.hpp"
+#include "intel_npu/common/npu.hpp"
-#include "intel_npu/al/itt.hpp"
+#include "intel_npu/common/itt.hpp"
#include "openvino/util/shared_object.hpp"
namespace intel_npu {
diff --git a/src/plugins/intel_npu/src/al/src/remote_tensor.cpp b/src/plugins/intel_npu/src/common/src/remote_tensor.cpp
similarity index 96%
rename from src/plugins/intel_npu/src/al/src/remote_tensor.cpp
rename to src/plugins/intel_npu/src/common/src/remote_tensor.cpp
index 1055e6a57dc..2d81de4aae6 100644
--- a/src/plugins/intel_npu/src/al/src/remote_tensor.cpp
+++ b/src/plugins/intel_npu/src/common/src/remote_tensor.cpp
@@ -2,9 +2,9 @@
// SPDX-License-Identifier: Apache-2.0
//
-#include "remote_tensor.hpp"
+#include "intel_npu/common/remote_tensor.hpp"
-#include "intel_npu/al/config/common.hpp"
+#include "intel_npu/config/common.hpp"
#include "openvino/core/type/element_iterator.hpp"
#include "openvino/runtime/intel_npu/remote_properties.hpp"
diff --git a/src/plugins/intel_npu/src/al/src/sync_infer_request.cpp b/src/plugins/intel_npu/src/common/src/sync_infer_request.cpp
similarity index 99%
rename from src/plugins/intel_npu/src/al/src/sync_infer_request.cpp
rename to src/plugins/intel_npu/src/common/src/sync_infer_request.cpp
index 04e9ce0d9bb..0ae0832fe29 100644
--- a/src/plugins/intel_npu/src/al/src/sync_infer_request.cpp
+++ b/src/plugins/intel_npu/src/common/src/sync_infer_request.cpp
@@ -2,9 +2,9 @@
// SPDX-License-Identifier: Apache-2.0
//
-#include "sync_infer_request.hpp"
+#include "intel_npu/common/sync_infer_request.hpp"
-#include "intel_npu/al/prefix.hpp"
+#include "intel_npu/prefix.hpp"
#include "openvino/op/util/op_types.hpp"
#include "openvino/runtime/make_tensor.hpp"
#include "openvino/runtime/plugin_itt.hpp"
diff --git a/src/plugins/intel_npu/src/compiler/CMakeLists.txt b/src/plugins/intel_npu/src/compiler/CMakeLists.txt
index 3f478de4f3e..5c81e00945b 100644
--- a/src/plugins/intel_npu/src/compiler/CMakeLists.txt
+++ b/src/plugins/intel_npu/src/compiler/CMakeLists.txt
@@ -24,6 +24,7 @@ target_include_directories(${TARGET_NAME}
target_link_libraries(${TARGET_NAME}
PUBLIC
openvino::npu_al
+ openvino::npu_common
PRIVATE
openvino_npu_zero_result_parser
openvino_npu_level_zero_backend
diff --git a/src/plugins/intel_npu/src/compiler/include/driver_compiler_adapter.hpp b/src/plugins/intel_npu/src/compiler/include/driver_compiler_adapter.hpp
index 99de755e1c4..addd9ca5308 100644
--- a/src/plugins/intel_npu/src/compiler/include/driver_compiler_adapter.hpp
+++ b/src/plugins/intel_npu/src/compiler/include/driver_compiler_adapter.hpp
@@ -6,9 +6,9 @@
#include <ze_graph_ext.h>
-#include "intel_npu/al/icompiler.hpp"
+#include "intel_npu/common/npu.hpp"
+#include "intel_npu/icompiler.hpp"
#include "intel_npu/utils/logger/logger.hpp"
-#include "npu.hpp"
namespace intel_npu {
namespace driverCompilerAdapter {
diff --git a/src/plugins/intel_npu/src/compiler/include/zero_compiler_in_driver.hpp b/src/plugins/intel_npu/src/compiler/include/zero_compiler_in_driver.hpp
index 65f7e8e3bee..d681e43fa5b 100644
--- a/src/plugins/intel_npu/src/compiler/include/zero_compiler_in_driver.hpp
+++ b/src/plugins/intel_npu/src/compiler/include/zero_compiler_in_driver.hpp
@@ -8,7 +8,7 @@
#include <type_traits>
#include <utility>
-#include "intel_npu/al/icompiler.hpp"
+#include "intel_npu/icompiler.hpp"
#include "intel_npu/utils/logger/logger.hpp"
#include "intel_npu/utils/zero/zero_api.hpp"
#include "zero_executor.hpp"
diff --git a/src/plugins/intel_npu/src/compiler/src/driver_compiler_adapter.cpp b/src/plugins/intel_npu/src/compiler/src/driver_compiler_adapter.cpp
index ad7efd701cf..84bca751064 100644
--- a/src/plugins/intel_npu/src/compiler/src/driver_compiler_adapter.cpp
+++ b/src/plugins/intel_npu/src/compiler/src/driver_compiler_adapter.cpp
@@ -5,7 +5,7 @@
#include "driver_compiler_adapter.hpp"
#include "graph_transformations.hpp"
-#include "intel_npu/al/config/common.hpp"
+#include "intel_npu/config/common.hpp"
#include "intel_npu/utils/zero/zero_api.hpp"
#include "intel_npu/utils/zero/zero_result.hpp"
#include "ze_intel_npu_uuid.h"
diff --git a/src/plugins/intel_npu/src/compiler/src/zero_compiler_in_driver.cpp b/src/plugins/intel_npu/src/compiler/src/zero_compiler_in_driver.cpp
index d768a4322f7..8d3afb4aa51 100644
--- a/src/plugins/intel_npu/src/compiler/src/zero_compiler_in_driver.cpp
+++ b/src/plugins/intel_npu/src/compiler/src/zero_compiler_in_driver.cpp
@@ -8,11 +8,11 @@
#include <string_view>
#include "graph_transformations.hpp"
-#include "intel_npu/al/config/common.hpp"
-#include "intel_npu/al/config/compiler.hpp"
-#include "intel_npu/al/config/runtime.hpp"
-#include "intel_npu/al/itt.hpp"
-#include "intel_npu/al/prefix.hpp"
+#include "intel_npu/common/itt.hpp"
+#include "intel_npu/config/common.hpp"
+#include "intel_npu/config/compiler.hpp"
+#include "intel_npu/config/runtime.hpp"
+#include "intel_npu/prefix.hpp"
#include "intel_npu/utils/zero/zero_result.hpp"
#include "openvino/core/model.hpp"
diff --git a/src/plugins/intel_npu/src/plugin/CMakeLists.txt b/src/plugins/intel_npu/src/plugin/CMakeLists.txt
index 749819b457c..2e80ed41f82 100644
--- a/src/plugins/intel_npu/src/plugin/CMakeLists.txt
+++ b/src/plugins/intel_npu/src/plugin/CMakeLists.txt
@@ -49,6 +49,7 @@ endif()
target_link_libraries(${TARGET_NAME}
PRIVATE
openvino::npu_al
+ openvino::npu_common
openvino::npu_logger_utils
openvino::runtime
openvino::runtime::dev
@@ -60,11 +61,13 @@ target_include_directories(${TARGET_NAME}
PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/>
)
-target_include_directories(${TARGET_NAME}
- SYSTEM PRIVATE
- $<TARGET_PROPERTY:LevelZero::LevelZero,INTERFACE_INCLUDE_DIRECTORIES>
- $<TARGET_PROPERTY:LevelZero::NPUExt,INTERFACE_INCLUDE_DIRECTORIES>
-)
+if(ENABLE_ZEROAPI_BACKEND)
+ target_include_directories(${TARGET_NAME}
+ SYSTEM PRIVATE
+ $<TARGET_PROPERTY:LevelZero::LevelZero,INTERFACE_INCLUDE_DIRECTORIES>
+ $<TARGET_PROPERTY:LevelZero::NPUExt,INTERFACE_INCLUDE_DIRECTORIES>
+ )
+endif()
cross_compiled_file(${TARGET_NAME}
ARCH AVX2 ANY
diff --git a/src/plugins/intel_npu/src/plugin/include/async_infer_request.hpp b/src/plugins/intel_npu/src/plugin/include/async_infer_request.hpp
index 51763e16f90..54466134435 100644
--- a/src/plugins/intel_npu/src/plugin/include/async_infer_request.hpp
+++ b/src/plugins/intel_npu/src/plugin/include/async_infer_request.hpp
@@ -4,8 +4,8 @@
#pragma once
+#include "intel_npu/common/sync_infer_request.hpp"
#include "openvino/runtime/iasync_infer_request.hpp"
-#include "sync_infer_request.hpp"
namespace intel_npu {
diff --git a/src/plugins/intel_npu/src/plugin/include/backends.hpp b/src/plugins/intel_npu/src/plugin/include/backends.hpp
index 177c0b96eb2..f8568f67694 100644
--- a/src/plugins/intel_npu/src/plugin/include/backends.hpp
+++ b/src/plugins/intel_npu/src/plugin/include/backends.hpp
@@ -12,9 +12,9 @@
#include "openvino/runtime/so_ptr.hpp"
// Plugin
+#include "intel_npu/common/npu.hpp"
+#include "intel_npu/npu_private_properties.hpp"
#include "intel_npu/utils/logger/logger.hpp"
-#include "npu.hpp"
-#include "npu_private_properties.hpp"
namespace intel_npu {
diff --git a/src/plugins/intel_npu/src/plugin/include/compiled_model.hpp b/src/plugins/intel_npu/src/plugin/include/compiled_model.hpp
index 1e4a2463750..8b01b2246f1 100644
--- a/src/plugins/intel_npu/src/plugin/include/compiled_model.hpp
+++ b/src/plugins/intel_npu/src/plugin/include/compiled_model.hpp
@@ -6,9 +6,9 @@
#include <optional>
-#include "intel_npu/al/icompiled_model.hpp"
+#include "intel_npu/common/icompiled_model.hpp"
+#include "intel_npu/common/npu.hpp"
#include "intel_npu/utils/logger/logger.hpp"
-#include "npu.hpp"
#include "openvino/runtime/so_ptr.hpp"
namespace intel_npu {
diff --git a/src/plugins/intel_npu/src/plugin/include/compiler.hpp b/src/plugins/intel_npu/src/plugin/include/compiler.hpp
index 8a82647f12b..22f21ae2570 100644
--- a/src/plugins/intel_npu/src/plugin/include/compiler.hpp
+++ b/src/plugins/intel_npu/src/plugin/include/compiler.hpp
@@ -7,9 +7,9 @@
#pragma once
#include "backends.hpp"
-#include "intel_npu/al/icompiler.hpp"
+#include "intel_npu/icompiler.hpp"
+#include "intel_npu/npu_private_properties.hpp" // AL
#include "intel_npu/utils/logger/logger.hpp"
-#include "npu_private_properties.hpp" // AL
#include "openvino/runtime/so_ptr.hpp"
namespace intel_npu {
diff --git a/src/plugins/intel_npu/src/plugin/include/metrics.hpp b/src/plugins/intel_npu/src/plugin/include/metrics.hpp
index e09966ba270..541bc39a6cd 100644
--- a/src/plugins/intel_npu/src/plugin/include/metrics.hpp
+++ b/src/plugins/intel_npu/src/plugin/include/metrics.hpp
@@ -9,8 +9,8 @@
#include <vector>
#include "backends.hpp"
-#include "npu.hpp"
-#include "npu_private_properties.hpp"
+#include "intel_npu/common/npu.hpp"
+#include "intel_npu/npu_private_properties.hpp"
#include "openvino/runtime/intel_npu/properties.hpp"
#include "openvino/runtime/internal_properties.hpp"
#include "openvino/runtime/properties.hpp"
diff --git a/src/plugins/intel_npu/src/plugin/include/plugin.hpp b/src/plugins/intel_npu/src/plugin/include/plugin.hpp
index 360dd0adaf4..b3ad816ff2f 100644
--- a/src/plugins/intel_npu/src/plugin/include/plugin.hpp
+++ b/src/plugins/intel_npu/src/plugin/include/plugin.hpp
@@ -9,11 +9,11 @@
#include <string>
#include "backends.hpp"
-#include "intel_npu/al/config/config.hpp"
-#include "intel_npu/al/icompiler.hpp"
+#include "intel_npu/common/npu.hpp"
+#include "intel_npu/config/config.hpp"
+#include "intel_npu/icompiler.hpp"
#include "intel_npu/utils/logger/logger.hpp"
#include "metrics.hpp"
-#include "npu.hpp"
#include "openvino/runtime/iplugin.hpp"
#include "openvino/runtime/so_ptr.hpp"
diff --git a/src/plugins/intel_npu/src/plugin/include/remote_context.hpp b/src/plugins/intel_npu/src/plugin/include/remote_context.hpp
index 2fce44526c3..b6b8df59153 100644
--- a/src/plugins/intel_npu/src/plugin/include/remote_context.hpp
+++ b/src/plugins/intel_npu/src/plugin/include/remote_context.hpp
@@ -9,7 +9,7 @@
#include <string>
#include "backends.hpp"
-#include "intel_npu/al/config/config.hpp"
+#include "intel_npu/config/config.hpp"
#include "openvino/runtime/iremote_context.hpp"
namespace intel_npu {
diff --git a/src/plugins/intel_npu/src/plugin/npuw/base_sync_infer_request.cpp b/src/plugins/intel_npu/src/plugin/npuw/base_sync_infer_request.cpp
index b52b61d44a2..02422e8c72a 100644
--- a/src/plugins/intel_npu/src/plugin/npuw/base_sync_infer_request.cpp
+++ b/src/plugins/intel_npu/src/plugin/npuw/base_sync_infer_request.cpp
@@ -5,7 +5,7 @@
#include "base_sync_infer_request.hpp"
#include "compiled_model.hpp"
-#include "intel_npu/al/config/npuw.hpp"
+#include "intel_npu/config/npuw.hpp"
#include "logging.hpp"
#include "util.hpp"
diff --git a/src/plugins/intel_npu/src/plugin/npuw/compiled_model.cpp b/src/plugins/intel_npu/src/plugin/npuw/compiled_model.cpp
index 6ae61fc4241..c6ef93ff104 100644
--- a/src/plugins/intel_npu/src/plugin/npuw/compiled_model.cpp
+++ b/src/plugins/intel_npu/src/plugin/npuw/compiled_model.cpp
@@ -7,9 +7,9 @@
#include <memory>
#include "accuracy/comparator.hpp"
+#include "intel_npu/npu_private_properties.hpp"
#include "just_sync_infer_request.hpp"
#include "logging.hpp"
-#include "npu_private_properties.hpp"
#include "openvino/core/parallel.hpp"
#include "openvino/op/util/op_types.hpp"
#include "openvino/pass/constant_folding.hpp"
@@ -23,10 +23,9 @@
#include "util.hpp"
// required for get_properties_per_device()
-#include <intel_npu/al/config/config.hpp>
-#include <intel_npu/al/config/npuw.hpp>
-#include <npuw_private_properties.hpp>
-
+#include "intel_npu/config/config.hpp"
+#include "intel_npu/config/npuw.hpp"
+#include "intel_npu/npuw_private_properties.hpp"
#include "openvino/runtime/device_id_parser.hpp"
#include "openvino/runtime/internal_properties.hpp"
#include "openvino/runtime/properties.hpp"
diff --git a/src/plugins/intel_npu/src/plugin/npuw/compiled_model.hpp b/src/plugins/intel_npu/src/plugin/npuw/compiled_model.hpp
index 7a02ae1c8a4..9f07998166e 100644
--- a/src/plugins/intel_npu/src/plugin/npuw/compiled_model.hpp
+++ b/src/plugins/intel_npu/src/plugin/npuw/compiled_model.hpp
@@ -7,8 +7,8 @@
#include <optional>
#include "common.hpp"
-#include "intel_npu/al/config/config.hpp"
-#include "intel_npu/al/config/npuw.hpp"
+#include "intel_npu/config/config.hpp"
+#include "intel_npu/config/npuw.hpp"
#include "openvino/openvino.hpp"
#include "openvino/runtime/icompiled_model.hpp"
#include "openvino/runtime/so_ptr.hpp"
diff --git a/src/plugins/intel_npu/src/plugin/npuw/partitioning/online/compiler.cpp b/src/plugins/intel_npu/src/plugin/npuw/partitioning/online/compiler.cpp
index 173091011d3..89a0e0d2da9 100644
--- a/src/plugins/intel_npu/src/plugin/npuw/partitioning/online/compiler.cpp
+++ b/src/plugins/intel_npu/src/plugin/npuw/partitioning/online/compiler.cpp
@@ -10,8 +10,8 @@
#include "../../logging.hpp"
#include "../../util.hpp"
#include "group.hpp"
-#include "intel_npu/al/config/config.hpp"
-#include "intel_npu/al/config/npuw.hpp"
+#include "intel_npu/config/config.hpp"
+#include "intel_npu/config/npuw.hpp"
#include "pugixml.hpp"
#include "snapshot.hpp"
diff --git a/src/plugins/intel_npu/src/plugin/npuw/partitioning/online/compiler.hpp b/src/plugins/intel_npu/src/plugin/npuw/partitioning/online/compiler.hpp
index 69527222612..d2ddcdd5c55 100644
--- a/src/plugins/intel_npu/src/plugin/npuw/partitioning/online/compiler.hpp
+++ b/src/plugins/intel_npu/src/plugin/npuw/partitioning/online/compiler.hpp
@@ -7,7 +7,7 @@
#include <memory>
#include "../partitioning.hpp" // ov::npuw::Ensemble
-#include "intel_npu/al/config/config.hpp"
+#include "intel_npu/config/config.hpp"
#include "openvino/openvino.hpp"
namespace ov {
diff --git a/src/plugins/intel_npu/src/plugin/npuw/partitioning/partitioning.cpp b/src/plugins/intel_npu/src/plugin/npuw/partitioning/partitioning.cpp
index 6c7f996acca..c4eb5feb732 100644
--- a/src/plugins/intel_npu/src/plugin/npuw/partitioning/partitioning.cpp
+++ b/src/plugins/intel_npu/src/plugin/npuw/partitioning/partitioning.cpp
@@ -8,7 +8,7 @@
#include "../logging.hpp"
#include "../util.hpp"
-#include "intel_npu/al/config/npuw.hpp"
+#include "intel_npu/config/npuw.hpp"
#include "online/compiler.hpp"
#include "online/utils/utils.hpp" // getMetaDesc
#include "openvino/core/parallel.hpp"
diff --git a/src/plugins/intel_npu/src/plugin/npuw/partitioning/partitioning.hpp b/src/plugins/intel_npu/src/plugin/npuw/partitioning/partitioning.hpp
index 5343ba26e6e..d613e9dcc4a 100644
--- a/src/plugins/intel_npu/src/plugin/npuw/partitioning/partitioning.hpp
+++ b/src/plugins/intel_npu/src/plugin/npuw/partitioning/partitioning.hpp
@@ -11,7 +11,7 @@
#include "../lazy_tensor.hpp"
#include "../spatial.hpp"
-#include "intel_npu/al/config/config.hpp"
+#include "intel_npu/config/config.hpp"
#include "openvino/openvino.hpp"
namespace ov {
diff --git a/src/plugins/intel_npu/src/plugin/npuw/util.cpp b/src/plugins/intel_npu/src/plugin/npuw/util.cpp
index da62d040c06..dfef4defb48 100644
--- a/src/plugins/intel_npu/src/plugin/npuw/util.cpp
+++ b/src/plugins/intel_npu/src/plugin/npuw/util.cpp
@@ -4,7 +4,7 @@
#include "util.hpp"
-#include <intel_npu/al/config/config.hpp>
+#include <intel_npu/config/config.hpp>
#include <iomanip>
#include <openvino/core/parallel.hpp>
#include <openvino/core/type/bfloat16.hpp>
diff --git a/src/plugins/intel_npu/src/plugin/src/backends.cpp b/src/plugins/intel_npu/src/plugin/src/backends.cpp
index 9b090e4ec91..9212506e7ec 100644
--- a/src/plugins/intel_npu/src/plugin/src/backends.cpp
+++ b/src/plugins/intel_npu/src/plugin/src/backends.cpp
@@ -7,8 +7,8 @@
#include <fstream>
#include <memory>
-#include "device_helpers.hpp"
-#include "intel_npu/al/config/common.hpp"
+#include "intel_npu/common/device_helpers.hpp"
+#include "intel_npu/config/common.hpp"
#if defined(ENABLE_ZEROAPI_BACKEND)
# include "zero_backend.hpp"
diff --git a/src/plugins/intel_npu/src/plugin/src/compiled_model.cpp b/src/plugins/intel_npu/src/plugin/src/compiled_model.cpp
index 91aa19499d9..bae0cb545b3 100644
--- a/src/plugins/intel_npu/src/plugin/src/compiled_model.cpp
+++ b/src/plugins/intel_npu/src/plugin/src/compiled_model.cpp
@@ -8,12 +8,12 @@
#include <string_view>
#include "async_infer_request.hpp"
-#include "intel_npu/al/config/common.hpp"
-#include "intel_npu/al/config/compiler.hpp"
-#include "intel_npu/al/config/config.hpp"
-#include "intel_npu/al/config/runtime.hpp"
-#include "intel_npu/al/icompiler.hpp"
-#include "intel_npu/al/itt.hpp"
+#include "intel_npu/common/itt.hpp"
+#include "intel_npu/config/common.hpp"
+#include "intel_npu/config/compiler.hpp"
+#include "intel_npu/config/config.hpp"
+#include "intel_npu/config/runtime.hpp"
+#include "intel_npu/icompiler.hpp"
#include "openvino/pass/constant_folding.hpp"
#include "openvino/pass/manager.hpp"
#include "openvino/runtime/properties.hpp"
diff --git a/src/plugins/intel_npu/src/plugin/src/compiler.cpp b/src/plugins/intel_npu/src/plugin/src/compiler.cpp
index 6b5a5e11276..3e270e7ed45 100644
--- a/src/plugins/intel_npu/src/plugin/src/compiler.cpp
+++ b/src/plugins/intel_npu/src/plugin/src/compiler.cpp
@@ -4,10 +4,10 @@
#include "compiler.hpp"
-#include "intel_npu/al/config/compiler.hpp"
-#include "intel_npu/al/itt.hpp"
+#include "intel_npu/common/itt.hpp"
+#include "intel_npu/config/compiler.hpp"
+#include "intel_npu/npu_private_properties.hpp"
#include "intel_npu/utils/logger/logger.hpp"
-#include "npu_private_properties.hpp"
#ifdef ENABLE_DRIVER_COMPILER_ADAPTER
# include "driver_compiler_adapter.hpp"
diff --git a/src/plugins/intel_npu/src/plugin/src/metrics.cpp b/src/plugins/intel_npu/src/plugin/src/metrics.cpp
index 15c7bb2bd32..b6853bc5a9d 100644
--- a/src/plugins/intel_npu/src/plugin/src/metrics.cpp
+++ b/src/plugins/intel_npu/src/plugin/src/metrics.cpp
@@ -5,8 +5,8 @@
// Plugin
#include "metrics.hpp"
-#include "device_helpers.hpp"
-#include "npu_private_properties.hpp"
+#include "intel_npu/common/device_helpers.hpp"
+#include "intel_npu/npu_private_properties.hpp"
#include "openvino/runtime/intel_npu/properties.hpp"
namespace intel_npu {
diff --git a/src/plugins/intel_npu/src/plugin/src/plugin.cpp b/src/plugins/intel_npu/src/plugin/src/plugin.cpp
index 834f45ffd15..f63bcc8bf3b 100644
--- a/src/plugins/intel_npu/src/plugin/src/plugin.cpp
+++ b/src/plugins/intel_npu/src/plugin/src/plugin.cpp
@@ -8,12 +8,12 @@
#include "compiled_model.hpp"
#include "compiler.hpp"
-#include "device_helpers.hpp"
-#include "intel_npu/al/config/common.hpp"
-#include "intel_npu/al/config/compiler.hpp"
-#include "intel_npu/al/config/npuw.hpp"
-#include "intel_npu/al/config/runtime.hpp"
-#include "intel_npu/al/itt.hpp"
+#include "intel_npu/common/device_helpers.hpp"
+#include "intel_npu/common/itt.hpp"
+#include "intel_npu/config/common.hpp"
+#include "intel_npu/config/compiler.hpp"
+#include "intel_npu/config/npuw.hpp"
+#include "intel_npu/config/runtime.hpp"
#include "npuw/compiled_model.hpp"
#include "openvino/op/constant.hpp"
#include "openvino/op/parameter.hpp"
@@ -21,6 +21,7 @@
#include "openvino/runtime/properties.hpp"
#include "remote_context.hpp"
+
using namespace intel_npu;
namespace {
diff --git a/src/plugins/intel_npu/src/plugin/src/remote_context.cpp b/src/plugins/intel_npu/src/plugin/src/remote_context.cpp
index 9539826f985..938057668a7 100644
--- a/src/plugins/intel_npu/src/plugin/src/remote_context.cpp
+++ b/src/plugins/intel_npu/src/plugin/src/remote_context.cpp
@@ -4,7 +4,7 @@
#include "remote_context.hpp"
-#include "intel_npu/al/config/common.hpp"
+#include "intel_npu/config/common.hpp"
#include "openvino/runtime/intel_npu/remote_properties.hpp"
using namespace ov::intel_npu;
diff --git a/src/plugins/intel_npu/src/utils/src/zero/CMakeLists.txt b/src/plugins/intel_npu/src/utils/src/zero/CMakeLists.txt
index 74072d21581..7e99bcf0a46 100644
--- a/src/plugins/intel_npu/src/utils/src/zero/CMakeLists.txt
+++ b/src/plugins/intel_npu/src/utils/src/zero/CMakeLists.txt
@@ -20,7 +20,6 @@ target_include_directories(
target_link_libraries(
${TARGET_NAME}
- PUBLIC openvino::npu_al
PRIVATE openvino::runtime openvino::runtime::dev)
#
# targets install
diff --git a/src/plugins/intel_npu/tests/functional/CMakeLists.txt b/src/plugins/intel_npu/tests/functional/CMakeLists.txt
index 1d8bf947e63..eac8166b02b 100644
--- a/src/plugins/intel_npu/tests/functional/CMakeLists.txt
+++ b/src/plugins/intel_npu/tests/functional/CMakeLists.txt
@@ -42,6 +42,7 @@ ov_add_test_target(
openvino::format_reader
openvino::reference
openvino::runtime
+ openvino::npu_common
openvino::npu_al)
if(WIN32)
diff --git a/src/plugins/intel_npu/tests/functional/behavior/batched_tensors_tests/batched_run.cpp b/src/plugins/intel_npu/tests/functional/behavior/batched_tensors_tests/batched_run.cpp
index 3d7d4eb89ef..86a4e636887 100644
--- a/src/plugins/intel_npu/tests/functional/behavior/batched_tensors_tests/batched_run.cpp
+++ b/src/plugins/intel_npu/tests/functional/behavior/batched_tensors_tests/batched_run.cpp
@@ -6,7 +6,7 @@
#include "common/npu_test_env_cfg.hpp"
#include "common/utils.hpp"
-#include "intel_npu/al/config/common.hpp"
+#include "intel_npu/config/common.hpp"
using namespace ov::test::behavior;
diff --git a/src/plugins/intel_npu/tests/functional/behavior/batched_tensors_tests/batched_run.hpp b/src/plugins/intel_npu/tests/functional/behavior/batched_tensors_tests/batched_run.hpp
index 05e580ab996..804ad9b9e05 100644
--- a/src/plugins/intel_npu/tests/functional/behavior/batched_tensors_tests/batched_run.hpp
+++ b/src/plugins/intel_npu/tests/functional/behavior/batched_tensors_tests/batched_run.hpp
@@ -12,7 +12,7 @@
#include "common/npu_test_env_cfg.hpp"
#include "common/utils.hpp"
#include "functional_test_utils/ov_plugin_cache.hpp"
-#include "npu_private_properties.hpp"
+#include "intel_npu/npu_private_properties.hpp"
#include "openvino/core/any.hpp"
#include "openvino/core/node_vector.hpp"
#include "openvino/core/type/element_iterator.hpp"
diff --git a/src/plugins/intel_npu/tests/functional/behavior/fail_gracefully_forward_compatibility.cpp b/src/plugins/intel_npu/tests/functional/behavior/fail_gracefully_forward_compatibility.cpp
index 95405abc0f2..8856425feac 100644
--- a/src/plugins/intel_npu/tests/functional/behavior/fail_gracefully_forward_compatibility.cpp
+++ b/src/plugins/intel_npu/tests/functional/behavior/fail_gracefully_forward_compatibility.cpp
@@ -3,9 +3,10 @@
//
#include "behavior/fail_gracefully_forward_compatibility.hpp"
-#include "common/utils.hpp"
+
#include "common/npu_test_env_cfg.hpp"
-#include "intel_npu/al/config/common.hpp"
+#include "common/utils.hpp"
+#include "intel_npu/config/common.hpp"
using namespace ov::test::behavior;
@@ -17,7 +18,8 @@ namespace {
const std::vector<ov::AnyMap> configs = {{}};
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTest, FailGracefullyTest,
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTest,
+ FailGracefullyTest,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(configs)),
FailGracefullyTest::getTestCaseName);
diff --git a/src/plugins/intel_npu/tests/functional/behavior/fail_gracefully_forward_compatibility.hpp b/src/plugins/intel_npu/tests/functional/behavior/fail_gracefully_forward_compatibility.hpp
index 196844cd983..2b22475d074 100644
--- a/src/plugins/intel_npu/tests/functional/behavior/fail_gracefully_forward_compatibility.hpp
+++ b/src/plugins/intel_npu/tests/functional/behavior/fail_gracefully_forward_compatibility.hpp
@@ -4,23 +4,22 @@
#pragma once
-#include "base/ov_behavior_test_utils.hpp"
-#include "common/npu_test_env_cfg.hpp"
-#include "common_test_utils/node_builders/constant.hpp"
-#include "functional_test_utils/ov_plugin_cache.hpp"
-
#include <gmock/gmock-matchers.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
-#include <exception>
+#include <exception>
#include <openvino/core/any.hpp>
#include <openvino/core/node_vector.hpp>
#include <openvino/op/op.hpp>
#include <openvino/runtime/compiled_model.hpp>
#include <openvino/runtime/core.hpp>
-#include "intel_npu/al/config/common.hpp"
+#include "base/ov_behavior_test_utils.hpp"
+#include "common/npu_test_env_cfg.hpp"
+#include "common_test_utils/node_builders/constant.hpp"
+#include "functional_test_utils/ov_plugin_cache.hpp"
+#include "intel_npu/config/common.hpp"
using CompilationParams = std::tuple<std::string, // Device name
ov::AnyMap // Config
@@ -38,7 +37,7 @@ public:
OPENVINO_OP("UnsupportedTestOperation");
UnsupportedTestOperation() = default;
- explicit UnsupportedTestOperation(const ov::Output<ov::Node>& arg): Op({arg}) {
+ explicit UnsupportedTestOperation(const ov::Output<ov::Node>& arg) : Op({arg}) {
constructor_validate_and_infer_types();
}
@@ -57,9 +56,8 @@ public:
}
};
-class FailGracefullyTest :
- public ov::test::behavior::OVPluginTestBase,
- public testing::WithParamInterface<CompilationParams> {
+class FailGracefullyTest : public ov::test::behavior::OVPluginTestBase,
+ public testing::WithParamInterface<CompilationParams> {
protected:
std::shared_ptr<ov::Core> core = utils::PluginCache::get().core();
ov::AnyMap configuration;
diff --git a/src/plugins/intel_npu/tests/functional/behavior/infer_request_run.cpp b/src/plugins/intel_npu/tests/functional/behavior/infer_request_run.cpp
index 433af189a79..5d023fe9d0b 100644
--- a/src/plugins/intel_npu/tests/functional/behavior/infer_request_run.cpp
+++ b/src/plugins/intel_npu/tests/functional/behavior/infer_request_run.cpp
@@ -6,8 +6,8 @@
#include "common/npu_test_env_cfg.hpp"
#include "common/utils.hpp"
-#include "intel_npu/al/config/common.hpp"
-#include "npu_private_properties.hpp"
+#include "intel_npu/config/common.hpp"
+#include "intel_npu/npu_private_properties.hpp"
using namespace ov::test::behavior;
diff --git a/src/plugins/intel_npu/tests/functional/behavior/infer_request_run.hpp b/src/plugins/intel_npu/tests/functional/behavior/infer_request_run.hpp
index 6b7372223c6..20be5ed25ed 100644
--- a/src/plugins/intel_npu/tests/functional/behavior/infer_request_run.hpp
+++ b/src/plugins/intel_npu/tests/functional/behavior/infer_request_run.hpp
@@ -16,7 +16,7 @@
#include "common/npu_test_env_cfg.hpp"
#include "common/utils.hpp"
#include "functional_test_utils/ov_plugin_cache.hpp"
-#include "npu_private_properties.hpp"
+#include "intel_npu/npu_private_properties.hpp"
#include "openvino/core/any.hpp"
#include "openvino/core/node_vector.hpp"
#include "openvino/op/op.hpp"
diff --git a/src/plugins/intel_npu/tests/functional/behavior/npu_driver_compiler_adapter/custom_stream.cpp b/src/plugins/intel_npu/tests/functional/behavior/npu_driver_compiler_adapter/custom_stream.cpp
index 5adc454e81f..3950caa379c 100644
--- a/src/plugins/intel_npu/tests/functional/behavior/npu_driver_compiler_adapter/custom_stream.cpp
+++ b/src/plugins/intel_npu/tests/functional/behavior/npu_driver_compiler_adapter/custom_stream.cpp
@@ -9,7 +9,7 @@
#include "common/npu_test_env_cfg.hpp"
#include "common_test_utils/node_builders/constant.hpp"
#include "graph_transformations.hpp"
-#include "intel_npu/al/config/common.hpp"
+#include "intel_npu/config/common.hpp"
#include "openvino/opsets/opset11.hpp"
using CompilationParams = std::tuple<std::string, // Device name
diff --git a/src/plugins/intel_npu/tests/functional/behavior/npu_driver_compiler_adapter/downgrade_interpolate11.cpp b/src/plugins/intel_npu/tests/functional/behavior/npu_driver_compiler_adapter/downgrade_interpolate11.cpp
index 3f159c20b9d..581ae43ab2b 100644
--- a/src/plugins/intel_npu/tests/functional/behavior/npu_driver_compiler_adapter/downgrade_interpolate11.cpp
+++ b/src/plugins/intel_npu/tests/functional/behavior/npu_driver_compiler_adapter/downgrade_interpolate11.cpp
@@ -3,17 +3,19 @@
//
#include "downgrade_interpolate11.hpp"
-#include "common/utils.hpp"
+
#include "common/npu_test_env_cfg.hpp"
-#include "intel_npu/al/config/common.hpp"
+#include "common/utils.hpp"
+#include "intel_npu/config/common.hpp"
using namespace ov::test::behavior;
const std::vector<ov::AnyMap> configs = {
- {{ov::intel_npu::compiler_type(ov::intel_npu::CompilerType::DRIVER)}},
+ {{ov::intel_npu::compiler_type(ov::intel_npu::CompilerType::DRIVER)}},
};
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTest, DriverCompilerAdapterDowngradeInterpolate11TestNPU,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTest,
+ DriverCompilerAdapterDowngradeInterpolate11TestNPU,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(configs)),
DriverCompilerAdapterDowngradeInterpolate11TestNPU::getTestCaseName);
diff --git a/src/plugins/intel_npu/tests/functional/behavior/npu_driver_compiler_adapter/expected_throw.cpp b/src/plugins/intel_npu/tests/functional/behavior/npu_driver_compiler_adapter/expected_throw.cpp
index 119c9c36e51..1ea360e8f7a 100644
--- a/src/plugins/intel_npu/tests/functional/behavior/npu_driver_compiler_adapter/expected_throw.cpp
+++ b/src/plugins/intel_npu/tests/functional/behavior/npu_driver_compiler_adapter/expected_throw.cpp
@@ -3,14 +3,16 @@
//
#include "expected_throw.hpp"
+
#include "common/utils.hpp"
-#include "intel_npu/al/config/common.hpp"
+#include "intel_npu/config/common.hpp"
using namespace ov::test::behavior;
const std::vector<ov::AnyMap> configs = {{{ov::intel_npu::compiler_type(ov::intel_npu::CompilerType::DRIVER)}}};
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTest, DriverCompilerAdapterExpectedThrowNPU,
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTest,
+ DriverCompilerAdapterExpectedThrowNPU,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(configs)),
DriverCompilerAdapterExpectedThrowNPU::getTestCaseName);
diff --git a/src/plugins/intel_npu/tests/functional/behavior/npu_driver_compiler_adapter/inputs_outputs.cpp b/src/plugins/intel_npu/tests/functional/behavior/npu_driver_compiler_adapter/inputs_outputs.cpp
index 138640ed4c6..7e6bd10d893 100644
--- a/src/plugins/intel_npu/tests/functional/behavior/npu_driver_compiler_adapter/inputs_outputs.cpp
+++ b/src/plugins/intel_npu/tests/functional/behavior/npu_driver_compiler_adapter/inputs_outputs.cpp
@@ -3,17 +3,19 @@
//
#include "inputs_outputs.hpp"
-#include "common/utils.hpp"
+
#include "common/npu_test_env_cfg.hpp"
-#include "intel_npu/al/config/common.hpp"
+#include "common/utils.hpp"
+#include "intel_npu/config/common.hpp"
using namespace ov::test::behavior;
const std::vector<ov::AnyMap> configs = {
- {{ov::intel_npu::compiler_type(ov::intel_npu::CompilerType::DRIVER)}},
+ {{ov::intel_npu::compiler_type(ov::intel_npu::CompilerType::DRIVER)}},
};
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTest, DriverCompilerAdapterInputsOutputsTestNPU,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTest,
+ DriverCompilerAdapterInputsOutputsTestNPU,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(configs)),
DriverCompilerAdapterInputsOutputsTestNPU::getTestCaseName);
diff --git a/src/plugins/intel_npu/tests/functional/behavior/npu_driver_compiler_adapter/properties_compatibility.cpp b/src/plugins/intel_npu/tests/functional/behavior/npu_driver_compiler_adapter/properties_compatibility.cpp
index 8f1d58945c1..b74ceec4809 100644
--- a/src/plugins/intel_npu/tests/functional/behavior/npu_driver_compiler_adapter/properties_compatibility.cpp
+++ b/src/plugins/intel_npu/tests/functional/behavior/npu_driver_compiler_adapter/properties_compatibility.cpp
@@ -4,7 +4,7 @@
#include "base/ov_behavior_test_utils.hpp"
#include "common/npu_test_env_cfg.hpp"
-#include "intel_npu/al/config/common.hpp"
+#include "intel_npu/config/common.hpp"
#include "shared_test_classes/subgraph/split_conv_concat.hpp"
using CompilationParams = std::tuple<std::string, // Device name
diff --git a/src/plugins/intel_npu/tests/functional/behavior/npu_driver_compiler_adapter/query_network.cpp b/src/plugins/intel_npu/tests/functional/behavior/npu_driver_compiler_adapter/query_network.cpp
index 9129cd33316..8242e87ec85 100644
--- a/src/plugins/intel_npu/tests/functional/behavior/npu_driver_compiler_adapter/query_network.cpp
+++ b/src/plugins/intel_npu/tests/functional/behavior/npu_driver_compiler_adapter/query_network.cpp
@@ -3,14 +3,16 @@
//
#include <gtest/gtest.h>
+
#include <openvino/op/op.hpp>
+
#include "base/ov_behavior_test_utils.hpp"
-#include "common/utils.hpp"
#include "common/npu_test_env_cfg.hpp"
+#include "common/utils.hpp"
#include "common_test_utils/node_builders/constant.hpp"
#include "common_test_utils/subgraph_builders/conv_pool_relu.hpp"
#include "common_test_utils/subgraph_builders/conv_pool_relu_non_zero.hpp"
-#include "intel_npu/al/config/common.hpp"
+#include "intel_npu/config/common.hpp"
using CompilationParams = std::tuple<std::string, // Device name
ov::AnyMap // Config
@@ -25,7 +27,7 @@ public:
OPENVINO_OP("UnsupportedTestOp");
UnsupportedTestOp() = default;
- explicit UnsupportedTestOp(const ov::Output<ov::Node>& arg): Op({arg}) {
+ explicit UnsupportedTestOp(const ov::Output<ov::Node>& arg) : Op({arg}) {
constructor_validate_and_infer_types();
}
@@ -58,9 +60,8 @@ std::shared_ptr<ov::Model> createModelWithUnknownNode() {
return std::make_shared<ov::Model>(results, ov::ParameterVector{params}, "CustomOpModel");
}
-class QueryNetworkTestNPU :
- public ov::test::behavior::OVPluginTestBase,
- public testing::WithParamInterface<CompilationParams> {
+class QueryNetworkTestNPU : public ov::test::behavior::OVPluginTestBase,
+ public testing::WithParamInterface<CompilationParams> {
public:
ov::SupportedOpsMap testQueryNetwork(std::shared_ptr<ov::Model> model) {
std::shared_ptr<ov::Core> core = utils::PluginCache::get().core();
@@ -105,26 +106,27 @@ protected:
const std::vector<ov::AnyMap> configs = {{}};
-using QueryNetworkTestSuite1NPU = QueryNetworkTestNPU;
-
-// Test query with a supported OpenVINO model
-TEST_P(QueryNetworkTestSuite1NPU, TestQueryNetworkSupported) {
- const auto supportedModel = ov::test::utils::make_conv_pool_relu();
- ov::SupportedOpsMap result;
- EXPECT_NO_THROW(result = testQueryNetwork(supportedModel));
- std::unordered_set<std::string> expected, actual;
- for (auto& op : supportedModel->get_ops()) {
- expected.insert(op->get_friendly_name());
- }
- for (auto& name : result) {
- actual.insert(name.first);
- }
- EXPECT_EQ(expected, actual);
-}
-
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTest, QueryNetworkTestSuite1NPU,
- ::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
- ::testing::ValuesIn(configs)),
+using QueryNetworkTestSuite1NPU = QueryNetworkTestNPU;
+
+// Test query with a supported OpenVINO model
+TEST_P(QueryNetworkTestSuite1NPU, TestQueryNetworkSupported) {
+ const auto supportedModel = ov::test::utils::make_conv_pool_relu();
+ ov::SupportedOpsMap result;
+ EXPECT_NO_THROW(result = testQueryNetwork(supportedModel));
+ std::unordered_set<std::string> expected, actual;
+ for (auto& op : supportedModel->get_ops()) {
+ expected.insert(op->get_friendly_name());
+ }
+ for (auto& name : result) {
+ actual.insert(name.first);
+ }
+ EXPECT_EQ(expected, actual);
+}
+
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTest,
+ QueryNetworkTestSuite1NPU,
+ ::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
+ ::testing::ValuesIn(configs)),
QueryNetworkTestNPU::getTestCaseName);
using QueryNetworkTestSuite2NPU = QueryNetworkTestNPU;
@@ -149,7 +151,8 @@ TEST_P(QueryNetworkTestSuite2NPU, DISABLED_TestQueryNetworkUnsupported) {
}
}
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTest, QueryNetworkTestSuite2NPU,
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTest,
+ QueryNetworkTestSuite2NPU,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(configs)),
QueryNetworkTestNPU::getTestCaseName);
diff --git a/src/plugins/intel_npu/tests/functional/behavior/npuw/behavior_tests.hpp b/src/plugins/intel_npu/tests/functional/behavior/npuw/behavior_tests.hpp
index 85658ac4a42..2f579a3593a 100644
--- a/src/plugins/intel_npu/tests/functional/behavior/npuw/behavior_tests.hpp
+++ b/src/plugins/intel_npu/tests/functional/behavior/npuw/behavior_tests.hpp
@@ -3,19 +3,18 @@
//
#pragma once
+#include <gtest/gtest.h>
+
#include <memory>
#include <random>
-#include <gtest/gtest.h>
-
+#include "generators/model_generator.hpp"
+#include "intel_npu/npuw_private_properties.hpp"
+#include "mocks/mock_plugins.hpp"
+#include "mocks/register_in_ov.hpp"
#include "openvino/runtime/core.hpp"
#include "openvino/runtime/iplugin.hpp"
#include "openvino/runtime/make_tensor.hpp"
-#include "npuw_private_properties.hpp"
-
-#include "mocks/mock_plugins.hpp"
-#include "mocks/register_in_ov.hpp"
-#include "generators/model_generator.hpp"
namespace ov {
namespace npuw {
@@ -60,8 +59,7 @@ ov::Tensor make_random_tensor(ov::element::Type type,
ov::Shape shape,
T rand_min = std::numeric_limits<uint8_t>::min(),
T rand_max = std::numeric_limits<uint8_t>::max()) {
- size_t tensor_size =
- std::accumulate(shape.begin(), shape.end(), std::size_t(1), std::multiplies<size_t>());
+ size_t tensor_size = std::accumulate(shape.begin(), shape.end(), std::size_t(1), std::multiplies<size_t>());
auto tensor = ov::Tensor(type, shape);
auto data = tensor.data<T>();
@@ -73,7 +71,7 @@ ov::Tensor make_random_tensor(ov::element::Type type,
return tensor;
}
-template<typename T>
+template <typename T>
void set_random_inputs(ov::InferRequest infer_request) {
for (const auto& input : infer_request.get_compiled_model().inputs()) {
// TODO: Extend template header to two types.
diff --git a/src/plugins/intel_npu/tests/functional/behavior/npuw/mocks/mock_plugins.cpp b/src/plugins/intel_npu/tests/functional/behavior/npuw/mocks/mock_plugins.cpp
index 950d80b2793..a7f285657b5 100644
--- a/src/plugins/intel_npu/tests/functional/behavior/npuw/mocks/mock_plugins.cpp
+++ b/src/plugins/intel_npu/tests/functional/behavior/npuw/mocks/mock_plugins.cpp
@@ -2,26 +2,26 @@
// SPDX-License-Identifier: Apache-2.0
//
-#include <gtest/gtest.h>
+#include "mock_plugins.hpp"
+
#include <gmock/gmock.h>
+#include <gtest/gtest.h>
#include <memory>
#include <utility>
-#include "mock_plugins.hpp"
+#include "intel_npu/npu_private_properties.hpp"
+#include "intel_npu/npuw_private_properties.hpp"
#include "openvino/core/version.hpp"
#include "openvino/pass/serialize.hpp"
#include "openvino/runtime/make_tensor.hpp"
-#include "npu_private_properties.hpp"
-#include "npuw_private_properties.hpp"
-
namespace ov {
namespace npuw {
namespace tests {
// Need to also mock async infer request or use infer() call to indicate that start_async() was called.
MockInferRequestBase::MockInferRequestBase(const std::shared_ptr<const MockCompiledModel>& compiled_model)
- : ov::ISyncInferRequest(compiled_model) {
+ : ov::ISyncInferRequest(compiled_model) {
OPENVINO_ASSERT(compiled_model);
}
@@ -39,7 +39,6 @@ void MockInferRequestBase::create_implementation() {
set_tensor(outputs[i], ov::get_tensor_impl(out_tensors[i]));
}
-
ON_CALL(*this, query_state()).WillByDefault([]() -> std::vector<ov::SoPtr<ov::IVariableState>> {
OPENVINO_NOT_IMPLEMENTED;
});
@@ -48,17 +47,16 @@ void MockInferRequestBase::create_implementation() {
});
}
-
-MockCompiledModelBase::MockCompiledModelBase(const std::shared_ptr<const ov::Model>& model,
- std::shared_ptr<ov::IPlugin> plugin,
- const ov::AnyMap& config,
- std::shared_ptr<std::map<int, std::pair<std::function<void(MockInferRequest&)>, bool>>> infer_reqs_to_expectations_ptr)
- : ov::ICompiledModel(model, plugin),
- m_infer_reqs_to_expectations_ptr(infer_reqs_to_expectations_ptr),
- m_model(model),
- m_config(config) {
- }
-
+MockCompiledModelBase::MockCompiledModelBase(
+ const std::shared_ptr<const ov::Model>& model,
+ std::shared_ptr<ov::IPlugin> plugin,
+ const ov::AnyMap& config,
+ std::shared_ptr<std::map<int, std::pair<std::function<void(MockInferRequest&)>, bool>>>
+ infer_reqs_to_expectations_ptr)
+ : ov::ICompiledModel(model, plugin),
+ m_infer_reqs_to_expectations_ptr(infer_reqs_to_expectations_ptr),
+ m_model(model),
+ m_config(config) {}
void MockCompiledModelBase::create_implementation() {
ON_CALL(*this, inputs()).WillByDefault(testing::ReturnRefOfCopy(m_model->inputs()));
@@ -81,13 +79,12 @@ void MockCompiledModelBase::create_implementation() {
return decltype(ov::supported_properties)::value_type(supported_properties);
} else if (name == ov::num_streams) {
if (this->m_config.count(ov::internal::exclusive_async_requests.name())) {
- auto exclusive_async_requests =
- m_config.at(ov::internal::exclusive_async_requests.name()).as<bool>();
+ auto exclusive_async_requests = m_config.at(ov::internal::exclusive_async_requests.name()).as<bool>();
if (exclusive_async_requests)
return ov::streams::Num(1);
}
return this->m_config.count(ov::num_streams.name()) ? m_config.at(ov::num_streams.name())
- : ov::streams::Num(1);
+ : ov::streams::Num(1);
} else if (name == ov::enable_profiling) {
return this->m_config.count(ov::enable_profiling.name()) ? m_config.at(ov::enable_profiling.name()) : false;
} else {
@@ -96,11 +93,10 @@ void MockCompiledModelBase::create_implementation() {
});
ON_CALL(*this, create_sync_infer_request).WillByDefault([this]() {
std::lock_guard<std::mutex> lock(m_mock_creation_mutex);
- auto mock_sync_infer_request = std::make_shared<MockInferRequest>(
- std::dynamic_pointer_cast<const MockCompiledModel>(shared_from_this()));
+ auto mock_sync_infer_request =
+ std::make_shared<MockInferRequest>(std::dynamic_pointer_cast<const MockCompiledModel>(shared_from_this()));
mock_sync_infer_request->create_implementation();
- if (m_infer_reqs_to_expectations_ptr &&
- m_infer_reqs_to_expectations_ptr->count(m_num_created_infer_requests)) {
+ if (m_infer_reqs_to_expectations_ptr && m_infer_reqs_to_expectations_ptr->count(m_num_created_infer_requests)) {
auto& expectation_and_status = (*m_infer_reqs_to_expectations_ptr)[m_num_created_infer_requests];
auto& expectation = expectation_and_status.first;
auto& status = expectation_and_status.second;
@@ -114,8 +110,7 @@ void MockCompiledModelBase::create_implementation() {
});
}
-
-template<typename DeviceType>
+template <typename DeviceType>
MockPluginBase<DeviceType>::MockPluginBase() {
m_plugin_name = std::string("openvino_") + std::string(device_name) + std::string("_plugin");
const ov::Version version = {CI_BUILD_NUMBER, m_plugin_name.c_str()};
@@ -124,54 +119,55 @@ MockPluginBase<DeviceType>::MockPluginBase() {
}
namespace {
- ov::PropertyName RO_property(const std::string& propertyName) {
- return ov::PropertyName(propertyName, ov::PropertyMutability::RO);
- };
+ov::PropertyName RO_property(const std::string& propertyName) {
+ return ov::PropertyName(propertyName, ov::PropertyMutability::RO);
+};
- ov::PropertyName RW_property(const std::string& propertyName) {
- return ov::PropertyName(propertyName, ov::PropertyMutability::RW);
- };
-} // anonymous namespace
+ov::PropertyName RW_property(const std::string& propertyName) {
+ return ov::PropertyName(propertyName, ov::PropertyMutability::RW);
+};
+} // anonymous namespace
template <typename DeviceType>
void MockPluginBase<DeviceType>::create_implementation() {
ON_CALL(*this, compile_model(testing::A<const std::shared_ptr<const ov::Model>&>(), testing::_))
- .WillByDefault([this](const std::shared_ptr<const ov::Model>& model, const ov::AnyMap& properties) {
- std::lock_guard<std::mutex> lock(m_mock_creation_mutex);
+ .WillByDefault([this](const std::shared_ptr<const ov::Model>& model, const ov::AnyMap& properties) {
+ std::lock_guard<std::mutex> lock(m_mock_creation_mutex);
- std::shared_ptr<std::map<int, std::pair<std::function<void(MockInferRequest&)>, bool>>> infer_reqs_to_expectations;
- if (m_models_to_reqs_to_expectations.count(m_num_compiled_models)) {
- infer_reqs_to_expectations = m_models_to_reqs_to_expectations[m_num_compiled_models];
- }
+ std::shared_ptr<std::map<int, std::pair<std::function<void(MockInferRequest&)>, bool>>>
+ infer_reqs_to_expectations;
+ if (m_models_to_reqs_to_expectations.count(m_num_compiled_models)) {
+ infer_reqs_to_expectations = m_models_to_reqs_to_expectations[m_num_compiled_models];
+ }
- auto mock_compiled_model = std::make_shared<MockCompiledModel>(
- model, shared_from_this(), properties,
- infer_reqs_to_expectations);
+ auto mock_compiled_model =
+ std::make_shared<MockCompiledModel>(model, shared_from_this(), properties, infer_reqs_to_expectations);
- mock_compiled_model->create_implementation();
+ mock_compiled_model->create_implementation();
- if (m_models_to_expectations.count(m_num_compiled_models)) {
- auto& expectation_and_status = m_models_to_expectations[m_num_compiled_models];
- auto& expectation = expectation_and_status.first;
- auto& status = expectation_and_status.second;
- expectation(*mock_compiled_model);
- status = true; // Expectation will be checked
- }
+ if (m_models_to_expectations.count(m_num_compiled_models)) {
+ auto& expectation_and_status = m_models_to_expectations[m_num_compiled_models];
+ auto& expectation = expectation_and_status.first;
+ auto& status = expectation_and_status.second;
+ expectation(*mock_compiled_model);
+ status = true; // Expectation will be checked
+ }
- ++m_num_compiled_models;
+ ++m_num_compiled_models;
- return mock_compiled_model;
- });
+ return mock_compiled_model;
+ });
ON_CALL(*this, compile_model(testing::A<const std::string&>(), testing::_))
- .WillByDefault([](const std::string& model_path,
- const ov::AnyMap& properties) -> std::shared_ptr<ov::ICompiledModel> {
+ .WillByDefault(
+ [](const std::string& model_path, const ov::AnyMap& properties) -> std::shared_ptr<ov::ICompiledModel> {
OPENVINO_NOT_IMPLEMENTED;
});
ON_CALL(*this, compile_model(testing::A<const std::shared_ptr<const ov::Model>&>(), testing::_, testing::_))
- .WillByDefault([](const std::shared_ptr<const ov::Model>& model, const ov::AnyMap& properties,
- const ov::SoPtr<ov::IRemoteContext>& context) -> std::shared_ptr<ov::ICompiledModel> {
- OPENVINO_NOT_IMPLEMENTED;
- });
+ .WillByDefault([](const std::shared_ptr<const ov::Model>& model,
+ const ov::AnyMap& properties,
+ const ov::SoPtr<ov::IRemoteContext>& context) -> std::shared_ptr<ov::ICompiledModel> {
+ OPENVINO_NOT_IMPLEMENTED;
+ });
ON_CALL(*this, set_property).WillByDefault([this](const ov::AnyMap& properties) {
for (const auto& it : properties) {
if (it.first == ov::num_streams.name())
@@ -189,14 +185,12 @@ void MockPluginBase<DeviceType>::create_implementation() {
for (int i = 0; i < DeviceType::num_device_ids; ++i) {
device_ids.push_back(std::to_string(i));
};
- const static std::vector<ov::PropertyName> roProperties{
- RO_property(ov::supported_properties.name()), RO_property(ov::available_devices.name()),
- RO_property(ov::device::uuid.name()), RO_property(ov::device::capabilities.name())
- };
+ const static std::vector<ov::PropertyName> roProperties{RO_property(ov::supported_properties.name()),
+ RO_property(ov::available_devices.name()),
+ RO_property(ov::device::uuid.name()),
+ RO_property(ov::device::capabilities.name())};
// the whole config is RW before network is loaded.
- const static std::vector<ov::PropertyName> rwProperties{
- RW_property(ov::num_streams.name())
- };
+ const static std::vector<ov::PropertyName> rwProperties{RW_property(ov::num_streams.name())};
std::string device_id;
if (arguments.find(ov::device::id.name()) != arguments.end()) {
@@ -211,7 +205,7 @@ void MockPluginBase<DeviceType>::create_implementation() {
return decltype(ov::supported_properties)::value_type(supportedProperties);
} else if (name == ov::internal::supported_properties) {
return decltype(ov::internal::supported_properties)::value_type(
- {ov::PropertyName{ov::internal::exclusive_async_requests.name(), ov::PropertyMutability::RW}});
+ {ov::PropertyName{ov::internal::exclusive_async_requests.name(), ov::PropertyMutability::RW}});
} else if (name == ov::internal::exclusive_async_requests) {
return decltype(ov::internal::exclusive_async_requests)::value_type{exclusive_async_requests};
} else if (name == ov::device::uuid) {
@@ -240,45 +234,47 @@ void MockPluginBase<DeviceType>::create_implementation() {
OPENVINO_THROW("Unsupported property: ", name);
});
ON_CALL(*this, create_context)
- .WillByDefault([](const ov::AnyMap& remote_properties) -> ov::SoPtr<ov::IRemoteContext> {
- OPENVINO_NOT_IMPLEMENTED;
- });
+ .WillByDefault([](const ov::AnyMap& remote_properties) -> ov::SoPtr<ov::IRemoteContext> {
+ OPENVINO_NOT_IMPLEMENTED;
+ });
// This method is utilized for remote tensor allocation in NPUW JustInferRequest and Weight bank.
ON_CALL(*this, get_default_context)
- .WillByDefault([](const ov::AnyMap& remote_properties) -> ov::SoPtr<ov::IRemoteContext> {
- return std::make_shared<MockRemoteContext>(device_name);
- });
+ .WillByDefault([](const ov::AnyMap& remote_properties) -> ov::SoPtr<ov::IRemoteContext> {
+ return std::make_shared<MockRemoteContext>(device_name);
+ });
ON_CALL(*this, import_model(testing::_, testing::_))
- .WillByDefault([](std::istream& model, const ov::AnyMap& properties)
- -> std::shared_ptr<ov::ICompiledModel> {
- OPENVINO_NOT_IMPLEMENTED;
- });
+ .WillByDefault([](std::istream& model, const ov::AnyMap& properties) -> std::shared_ptr<ov::ICompiledModel> {
+ OPENVINO_NOT_IMPLEMENTED;
+ });
ON_CALL(*this, import_model(testing::_, testing::_, testing::_))
- .WillByDefault([](std::istream& model, const ov::SoPtr<ov::IRemoteContext>& context,
- const ov::AnyMap& properties) -> std::shared_ptr<ov::ICompiledModel> {
- OPENVINO_NOT_IMPLEMENTED;
- });
+ .WillByDefault([](std::istream& model,
+ const ov::SoPtr<ov::IRemoteContext>& context,
+ const ov::AnyMap& properties) -> std::shared_ptr<ov::ICompiledModel> {
+ OPENVINO_NOT_IMPLEMENTED;
+ });
ON_CALL(*this, query_model)
- .WillByDefault([](const std::shared_ptr<const ov::Model>& model, const ov::AnyMap& properties)
- -> ov::SupportedOpsMap{
+ .WillByDefault(
+ [](const std::shared_ptr<const ov::Model>& model, const ov::AnyMap& properties) -> ov::SupportedOpsMap {
OPENVINO_NOT_IMPLEMENTED;
});
}
template <typename DeviceType>
-void MockPluginBase<DeviceType>::set_expectations_to_comp_models(int model_idx, std::function<void(MockCompiledModel&)> expectations) {
+void MockPluginBase<DeviceType>::set_expectations_to_comp_models(int model_idx,
+ std::function<void(MockCompiledModel&)> expectations) {
m_models_to_expectations[model_idx] = std::pair<std::function<void(MockCompiledModel&)>, bool>(expectations, false);
}
template <typename DeviceType>
-void MockPluginBase<DeviceType>::set_expectations_to_infer_reqs(int model_idx, int req_idx,
+void MockPluginBase<DeviceType>::set_expectations_to_infer_reqs(int model_idx,
+ int req_idx,
std::function<void(MockInferRequest&)> expectations) {
if (!m_models_to_reqs_to_expectations.count(model_idx)) {
m_models_to_reqs_to_expectations[model_idx] =
- std::make_shared<std::map<int, std::pair<std::function<void(MockInferRequest&)>, bool>>>();
+ std::make_shared<std::map<int, std::pair<std::function<void(MockInferRequest&)>, bool>>>();
}
- m_models_to_reqs_to_expectations[model_idx]->insert(
- {req_idx, std::pair<std::function<void(MockInferRequest&)>, bool>(expectations, false)});
+ m_models_to_reqs_to_expectations[model_idx]->insert(
+ {req_idx, std::pair<std::function<void(MockInferRequest&)>, bool>(expectations, false)});
}
template <typename DeviceType>
@@ -287,7 +283,7 @@ MockPluginBase<DeviceType>::~MockPluginBase() {
auto idx = idx_to_expectation_and_status.first;
auto expectation_and_status = idx_to_expectation_and_status.second;
if (!expectation_and_status.second) {
- ADD_FAILURE() << DeviceType::name << ": Expectation for model[" << idx
+ ADD_FAILURE() << DeviceType::name << ": Expectation for model[" << idx
<< "] was set, but that model was not compiled";
}
}
@@ -298,9 +294,9 @@ MockPluginBase<DeviceType>::~MockPluginBase() {
auto expectation_and_status = req_to_expectation_and_status.second;
if (!expectation_and_status.second) {
auto model_idx = idx_to_reqs_to_expectation_and_status.first;
- ADD_FAILURE() << DeviceType::name << ": Expectation for request[" << req_idx
- << "] of model[" << model_idx << "] was set, but that request was "
- << "not created";
+ ADD_FAILURE() << DeviceType::name << ": Expectation for request[" << req_idx << "] of model["
+ << model_idx << "] was set, but that request was "
+ << "not created";
}
}
}
diff --git a/src/plugins/intel_npu/tests/functional/behavior/ov_infer_request/compile_and_infer.cpp b/src/plugins/intel_npu/tests/functional/behavior/ov_infer_request/compile_and_infer.cpp
index b26d0fc621a..5d308c34405 100644
--- a/src/plugins/intel_npu/tests/functional/behavior/ov_infer_request/compile_and_infer.cpp
+++ b/src/plugins/intel_npu/tests/functional/behavior/ov_infer_request/compile_and_infer.cpp
@@ -4,7 +4,7 @@
#include "overload/compile_and_infer.hpp"
-#include <npu_private_properties.hpp>
+#include <intel_npu/npu_private_properties.hpp>
#include "common/npu_test_env_cfg.hpp"
#include "common/utils.hpp"
diff --git a/src/plugins/intel_npu/tests/functional/behavior/ov_plugin/internal_properties_tests.cpp b/src/plugins/intel_npu/tests/functional/behavior/ov_plugin/internal_properties_tests.cpp
index 006b7a19fb6..76ba22b26a5 100644
--- a/src/plugins/intel_npu/tests/functional/behavior/ov_plugin/internal_properties_tests.cpp
+++ b/src/plugins/intel_npu/tests/functional/behavior/ov_plugin/internal_properties_tests.cpp
@@ -6,7 +6,7 @@
#include "overload/ov_plugin/internal_properties_tests.hpp"
#include "common/npu_test_env_cfg.hpp"
-#include "npu_private_properties.hpp"
+#include "intel_npu/npu_private_properties.hpp"
namespace ov::test::behavior {
diff --git a/src/plugins/intel_npu/tests/functional/behavior/remote_tensor_tests/d3dx12_core.h b/src/plugins/intel_npu/tests/functional/behavior/remote_tensor_tests/d3dx12_core.h
new file mode 100644
index 00000000000..e20327ccbe3
--- /dev/null
+++ b/src/plugins/intel_npu/tests/functional/behavior/remote_tensor_tests/d3dx12_core.h
@@ -0,0 +1,1389 @@
+//*********************************************************
+//
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License (MIT).
+//
+//*********************************************************
+
+#pragma once
+#ifdef _WIN32
+
+# ifndef __cplusplus
+# error D3DX12 requires C++
+# endif
+
+# include <string.h>
+
+# include "d3d12.h"
+# include "d3dx12_default.h"
+
+
+//------------------------------------------------------------------------------------------------
+# ifndef D3DX12_ASSERT
+# ifdef assert
+# define D3DX12_ASSERT(x) assert(x)
+# else
+# define D3DX12_ASSERT(x)
+# endif
+# endif
+
+//------------------------------------------------------------------------------------------------
+template <typename t_CommandListType>
+inline ID3D12CommandList* const* CommandListCast(t_CommandListType* const* pp) noexcept {
+ // This cast is useful for passing strongly typed command list pointers into
+ // ExecuteCommandLists.
+ // This cast is valid as long as the const-ness is respected. D3D12 APIs do
+ // respect the const-ness of their arguments.
+ return reinterpret_cast<ID3D12CommandList* const*>(pp);
+}
+
+//------------------------------------------------------------------------------------------------
+inline bool operator==(const D3D12_VIEWPORT& l, const D3D12_VIEWPORT& r) noexcept {
+ return l.TopLeftX == r.TopLeftX && l.TopLeftY == r.TopLeftY && l.Width == r.Width && l.Height == r.Height &&
+ l.MinDepth == r.MinDepth && l.MaxDepth == r.MaxDepth;
+}
+
+//------------------------------------------------------------------------------------------------
+inline bool operator!=(const D3D12_VIEWPORT& l, const D3D12_VIEWPORT& r) noexcept {
+ return !(l == r);
+}
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_RECT : public D3D12_RECT {
+ CD3DX12_RECT() = default;
+ explicit CD3DX12_RECT(const D3D12_RECT& o) noexcept : D3D12_RECT(o) {}
+ explicit CD3DX12_RECT(LONG Left, LONG Top, LONG Right, LONG Bottom) noexcept {
+ left = Left;
+ top = Top;
+ right = Right;
+ bottom = Bottom;
+ }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_VIEWPORT : public D3D12_VIEWPORT {
+ CD3DX12_VIEWPORT() = default;
+ explicit CD3DX12_VIEWPORT(const D3D12_VIEWPORT& o) noexcept : D3D12_VIEWPORT(o) {}
+ explicit CD3DX12_VIEWPORT(FLOAT topLeftX,
+ FLOAT topLeftY,
+ FLOAT width,
+ FLOAT height,
+ FLOAT minDepth = D3D12_MIN_DEPTH,
+ FLOAT maxDepth = D3D12_MAX_DEPTH) noexcept {
+ TopLeftX = topLeftX;
+ TopLeftY = topLeftY;
+ Width = width;
+ Height = height;
+ MinDepth = minDepth;
+ MaxDepth = maxDepth;
+ }
+ explicit CD3DX12_VIEWPORT(_In_ ID3D12Resource* pResource,
+ UINT mipSlice = 0,
+ FLOAT topLeftX = 0.0f,
+ FLOAT topLeftY = 0.0f,
+ FLOAT minDepth = D3D12_MIN_DEPTH,
+ FLOAT maxDepth = D3D12_MAX_DEPTH) noexcept {
+# if defined(_MSC_VER) || !defined(_WIN32)
+ const auto Desc = pResource->GetDesc();
+# else
+ D3D12_RESOURCE_DESC tmpDesc;
+ const auto& Desc = *pResource->GetDesc(&tmpDesc);
+# endif
+ const UINT64 SubresourceWidth = Desc.Width >> mipSlice;
+ const UINT64 SubresourceHeight = Desc.Height >> mipSlice;
+ switch (Desc.Dimension) {
+ case D3D12_RESOURCE_DIMENSION_BUFFER:
+ TopLeftX = topLeftX;
+ TopLeftY = 0.0f;
+ Width = float(Desc.Width) - topLeftX;
+ Height = 1.0f;
+ break;
+ case D3D12_RESOURCE_DIMENSION_TEXTURE1D:
+ TopLeftX = topLeftX;
+ TopLeftY = 0.0f;
+ Width = (SubresourceWidth ? float(SubresourceWidth) : 1.0f) - topLeftX;
+ Height = 1.0f;
+ break;
+ case D3D12_RESOURCE_DIMENSION_TEXTURE2D:
+ case D3D12_RESOURCE_DIMENSION_TEXTURE3D:
+ TopLeftX = topLeftX;
+ TopLeftY = topLeftY;
+ Width = (SubresourceWidth ? float(SubresourceWidth) : 1.0f) - topLeftX;
+ Height = (SubresourceHeight ? float(SubresourceHeight) : 1.0f) - topLeftY;
+ break;
+ default:
+ break;
+ }
+
+ MinDepth = minDepth;
+ MaxDepth = maxDepth;
+ }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_BOX : public D3D12_BOX {
+ CD3DX12_BOX() = default;
+ explicit CD3DX12_BOX(const D3D12_BOX& o) noexcept : D3D12_BOX(o) {}
+ explicit CD3DX12_BOX(LONG Left, LONG Right) noexcept {
+ left = static_cast<UINT>(Left);
+ top = 0;
+ front = 0;
+ right = static_cast<UINT>(Right);
+ bottom = 1;
+ back = 1;
+ }
+ explicit CD3DX12_BOX(LONG Left, LONG Top, LONG Right, LONG Bottom) noexcept {
+ left = static_cast<UINT>(Left);
+ top = static_cast<UINT>(Top);
+ front = 0;
+ right = static_cast<UINT>(Right);
+ bottom = static_cast<UINT>(Bottom);
+ back = 1;
+ }
+ explicit CD3DX12_BOX(LONG Left, LONG Top, LONG Front, LONG Right, LONG Bottom, LONG Back) noexcept {
+ left = static_cast<UINT>(Left);
+ top = static_cast<UINT>(Top);
+ front = static_cast<UINT>(Front);
+ right = static_cast<UINT>(Right);
+ bottom = static_cast<UINT>(Bottom);
+ back = static_cast<UINT>(Back);
+ }
+};
+inline bool operator==(const D3D12_BOX& l, const D3D12_BOX& r) noexcept {
+ return l.left == r.left && l.top == r.top && l.front == r.front && l.right == r.right && l.bottom == r.bottom &&
+ l.back == r.back;
+}
+inline bool operator!=(const D3D12_BOX& l, const D3D12_BOX& r) noexcept {
+ return !(l == r);
+}
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_DEPTH_STENCIL_DESC : public D3D12_DEPTH_STENCIL_DESC {
+ CD3DX12_DEPTH_STENCIL_DESC() = default;
+ explicit CD3DX12_DEPTH_STENCIL_DESC(const D3D12_DEPTH_STENCIL_DESC& o) noexcept : D3D12_DEPTH_STENCIL_DESC(o) {}
+ explicit CD3DX12_DEPTH_STENCIL_DESC(CD3DX12_DEFAULT) noexcept {
+ DepthEnable = TRUE;
+ DepthWriteMask = D3D12_DEPTH_WRITE_MASK_ALL;
+ DepthFunc = D3D12_COMPARISON_FUNC_LESS;
+ StencilEnable = FALSE;
+ StencilReadMask = D3D12_DEFAULT_STENCIL_READ_MASK;
+ StencilWriteMask = D3D12_DEFAULT_STENCIL_WRITE_MASK;
+ const D3D12_DEPTH_STENCILOP_DESC defaultStencilOp = {D3D12_STENCIL_OP_KEEP,
+ D3D12_STENCIL_OP_KEEP,
+ D3D12_STENCIL_OP_KEEP,
+ D3D12_COMPARISON_FUNC_ALWAYS};
+ FrontFace = defaultStencilOp;
+ BackFace = defaultStencilOp;
+ }
+ explicit CD3DX12_DEPTH_STENCIL_DESC(BOOL depthEnable,
+ D3D12_DEPTH_WRITE_MASK depthWriteMask,
+ D3D12_COMPARISON_FUNC depthFunc,
+ BOOL stencilEnable,
+ UINT8 stencilReadMask,
+ UINT8 stencilWriteMask,
+ D3D12_STENCIL_OP frontStencilFailOp,
+ D3D12_STENCIL_OP frontStencilDepthFailOp,
+ D3D12_STENCIL_OP frontStencilPassOp,
+ D3D12_COMPARISON_FUNC frontStencilFunc,
+ D3D12_STENCIL_OP backStencilFailOp,
+ D3D12_STENCIL_OP backStencilDepthFailOp,
+ D3D12_STENCIL_OP backStencilPassOp,
+ D3D12_COMPARISON_FUNC backStencilFunc) noexcept {
+ DepthEnable = depthEnable;
+ DepthWriteMask = depthWriteMask;
+ DepthFunc = depthFunc;
+ StencilEnable = stencilEnable;
+ StencilReadMask = stencilReadMask;
+ StencilWriteMask = stencilWriteMask;
+ FrontFace.StencilFailOp = frontStencilFailOp;
+ FrontFace.StencilDepthFailOp = frontStencilDepthFailOp;
+ FrontFace.StencilPassOp = frontStencilPassOp;
+ FrontFace.StencilFunc = frontStencilFunc;
+ BackFace.StencilFailOp = backStencilFailOp;
+ BackFace.StencilDepthFailOp = backStencilDepthFailOp;
+ BackFace.StencilPassOp = backStencilPassOp;
+ BackFace.StencilFunc = backStencilFunc;
+ }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_DEPTH_STENCIL_DESC1 : public D3D12_DEPTH_STENCIL_DESC1 {
+ CD3DX12_DEPTH_STENCIL_DESC1() = default;
+ explicit CD3DX12_DEPTH_STENCIL_DESC1(const D3D12_DEPTH_STENCIL_DESC1& o) noexcept : D3D12_DEPTH_STENCIL_DESC1(o) {}
+ explicit CD3DX12_DEPTH_STENCIL_DESC1(const D3D12_DEPTH_STENCIL_DESC& o) noexcept {
+ DepthEnable = o.DepthEnable;
+ DepthWriteMask = o.DepthWriteMask;
+ DepthFunc = o.DepthFunc;
+ StencilEnable = o.StencilEnable;
+ StencilReadMask = o.StencilReadMask;
+ StencilWriteMask = o.StencilWriteMask;
+ FrontFace.StencilFailOp = o.FrontFace.StencilFailOp;
+ FrontFace.StencilDepthFailOp = o.FrontFace.StencilDepthFailOp;
+ FrontFace.StencilPassOp = o.FrontFace.StencilPassOp;
+ FrontFace.StencilFunc = o.FrontFace.StencilFunc;
+ BackFace.StencilFailOp = o.BackFace.StencilFailOp;
+ BackFace.StencilDepthFailOp = o.BackFace.StencilDepthFailOp;
+ BackFace.StencilPassOp = o.BackFace.StencilPassOp;
+ BackFace.StencilFunc = o.BackFace.StencilFunc;
+ DepthBoundsTestEnable = FALSE;
+ }
+ explicit CD3DX12_DEPTH_STENCIL_DESC1(CD3DX12_DEFAULT) noexcept {
+ DepthEnable = TRUE;
+ DepthWriteMask = D3D12_DEPTH_WRITE_MASK_ALL;
+ DepthFunc = D3D12_COMPARISON_FUNC_LESS;
+ StencilEnable = FALSE;
+ StencilReadMask = D3D12_DEFAULT_STENCIL_READ_MASK;
+ StencilWriteMask = D3D12_DEFAULT_STENCIL_WRITE_MASK;
+ const D3D12_DEPTH_STENCILOP_DESC defaultStencilOp = {D3D12_STENCIL_OP_KEEP,
+ D3D12_STENCIL_OP_KEEP,
+ D3D12_STENCIL_OP_KEEP,
+ D3D12_COMPARISON_FUNC_ALWAYS};
+ FrontFace = defaultStencilOp;
+ BackFace = defaultStencilOp;
+ DepthBoundsTestEnable = FALSE;
+ }
+ explicit CD3DX12_DEPTH_STENCIL_DESC1(BOOL depthEnable,
+ D3D12_DEPTH_WRITE_MASK depthWriteMask,
+ D3D12_COMPARISON_FUNC depthFunc,
+ BOOL stencilEnable,
+ UINT8 stencilReadMask,
+ UINT8 stencilWriteMask,
+ D3D12_STENCIL_OP frontStencilFailOp,
+ D3D12_STENCIL_OP frontStencilDepthFailOp,
+ D3D12_STENCIL_OP frontStencilPassOp,
+ D3D12_COMPARISON_FUNC frontStencilFunc,
+ D3D12_STENCIL_OP backStencilFailOp,
+ D3D12_STENCIL_OP backStencilDepthFailOp,
+ D3D12_STENCIL_OP backStencilPassOp,
+ D3D12_COMPARISON_FUNC backStencilFunc,
+ BOOL depthBoundsTestEnable) noexcept {
+ DepthEnable = depthEnable;
+ DepthWriteMask = depthWriteMask;
+ DepthFunc = depthFunc;
+ StencilEnable = stencilEnable;
+ StencilReadMask = stencilReadMask;
+ StencilWriteMask = stencilWriteMask;
+ FrontFace.StencilFailOp = frontStencilFailOp;
+ FrontFace.StencilDepthFailOp = frontStencilDepthFailOp;
+ FrontFace.StencilPassOp = frontStencilPassOp;
+ FrontFace.StencilFunc = frontStencilFunc;
+ BackFace.StencilFailOp = backStencilFailOp;
+ BackFace.StencilDepthFailOp = backStencilDepthFailOp;
+ BackFace.StencilPassOp = backStencilPassOp;
+ BackFace.StencilFunc = backStencilFunc;
+ DepthBoundsTestEnable = depthBoundsTestEnable;
+ }
+ operator D3D12_DEPTH_STENCIL_DESC() const noexcept {
+ D3D12_DEPTH_STENCIL_DESC D;
+ D.DepthEnable = DepthEnable;
+ D.DepthWriteMask = DepthWriteMask;
+ D.DepthFunc = DepthFunc;
+ D.StencilEnable = StencilEnable;
+ D.StencilReadMask = StencilReadMask;
+ D.StencilWriteMask = StencilWriteMask;
+ D.FrontFace.StencilFailOp = FrontFace.StencilFailOp;
+ D.FrontFace.StencilDepthFailOp = FrontFace.StencilDepthFailOp;
+ D.FrontFace.StencilPassOp = FrontFace.StencilPassOp;
+ D.FrontFace.StencilFunc = FrontFace.StencilFunc;
+ D.BackFace.StencilFailOp = BackFace.StencilFailOp;
+ D.BackFace.StencilDepthFailOp = BackFace.StencilDepthFailOp;
+ D.BackFace.StencilPassOp = BackFace.StencilPassOp;
+ D.BackFace.StencilFunc = BackFace.StencilFunc;
+ return D;
+ }
+};
+
+//------------------------------------------------------------------------------------------------
+# if defined(D3D12_SDK_VERSION) && (D3D12_SDK_VERSION >= 606)
+struct CD3DX12_DEPTH_STENCIL_DESC2 : public D3D12_DEPTH_STENCIL_DESC2 {
+ CD3DX12_DEPTH_STENCIL_DESC2() = default;
+ explicit CD3DX12_DEPTH_STENCIL_DESC2(const D3D12_DEPTH_STENCIL_DESC2& o) noexcept : D3D12_DEPTH_STENCIL_DESC2(o) {}
+ explicit CD3DX12_DEPTH_STENCIL_DESC2(const D3D12_DEPTH_STENCIL_DESC1& o) noexcept {
+ DepthEnable = o.DepthEnable;
+ DepthWriteMask = o.DepthWriteMask;
+ DepthFunc = o.DepthFunc;
+ StencilEnable = o.StencilEnable;
+ FrontFace.StencilFailOp = o.FrontFace.StencilFailOp;
+ FrontFace.StencilDepthFailOp = o.FrontFace.StencilDepthFailOp;
+ FrontFace.StencilPassOp = o.FrontFace.StencilPassOp;
+ FrontFace.StencilFunc = o.FrontFace.StencilFunc;
+ FrontFace.StencilReadMask = o.StencilReadMask;
+ FrontFace.StencilWriteMask = o.StencilWriteMask;
+
+ BackFace.StencilFailOp = o.BackFace.StencilFailOp;
+ BackFace.StencilDepthFailOp = o.BackFace.StencilDepthFailOp;
+ BackFace.StencilPassOp = o.BackFace.StencilPassOp;
+ BackFace.StencilFunc = o.BackFace.StencilFunc;
+ BackFace.StencilReadMask = o.StencilReadMask;
+ BackFace.StencilWriteMask = o.StencilWriteMask;
+ DepthBoundsTestEnable = o.DepthBoundsTestEnable;
+ }
+ explicit CD3DX12_DEPTH_STENCIL_DESC2(const D3D12_DEPTH_STENCIL_DESC& o) noexcept {
+ DepthEnable = o.DepthEnable;
+ DepthWriteMask = o.DepthWriteMask;
+ DepthFunc = o.DepthFunc;
+ StencilEnable = o.StencilEnable;
+
+ FrontFace.StencilFailOp = o.FrontFace.StencilFailOp;
+ FrontFace.StencilDepthFailOp = o.FrontFace.StencilDepthFailOp;
+ FrontFace.StencilPassOp = o.FrontFace.StencilPassOp;
+ FrontFace.StencilFunc = o.FrontFace.StencilFunc;
+ FrontFace.StencilReadMask = o.StencilReadMask;
+ FrontFace.StencilWriteMask = o.StencilWriteMask;
+
+ BackFace.StencilFailOp = o.BackFace.StencilFailOp;
+ BackFace.StencilDepthFailOp = o.BackFace.StencilDepthFailOp;
+ BackFace.StencilPassOp = o.BackFace.StencilPassOp;
+ BackFace.StencilFunc = o.BackFace.StencilFunc;
+ BackFace.StencilReadMask = o.StencilReadMask;
+ BackFace.StencilWriteMask = o.StencilWriteMask;
+
+ DepthBoundsTestEnable = FALSE;
+ }
+ explicit CD3DX12_DEPTH_STENCIL_DESC2(CD3DX12_DEFAULT) noexcept {
+ DepthEnable = TRUE;
+ DepthWriteMask = D3D12_DEPTH_WRITE_MASK_ALL;
+ DepthFunc = D3D12_COMPARISON_FUNC_LESS;
+ StencilEnable = FALSE;
+ const D3D12_DEPTH_STENCILOP_DESC1 defaultStencilOp = {D3D12_STENCIL_OP_KEEP,
+ D3D12_STENCIL_OP_KEEP,
+ D3D12_STENCIL_OP_KEEP,
+ D3D12_COMPARISON_FUNC_ALWAYS,
+ D3D12_DEFAULT_STENCIL_READ_MASK,
+ D3D12_DEFAULT_STENCIL_WRITE_MASK};
+ FrontFace = defaultStencilOp;
+ BackFace = defaultStencilOp;
+ DepthBoundsTestEnable = FALSE;
+ }
+ explicit CD3DX12_DEPTH_STENCIL_DESC2(BOOL depthEnable,
+ D3D12_DEPTH_WRITE_MASK depthWriteMask,
+ D3D12_COMPARISON_FUNC depthFunc,
+ BOOL stencilEnable,
+ D3D12_STENCIL_OP frontStencilFailOp,
+ D3D12_STENCIL_OP frontStencilDepthFailOp,
+ D3D12_STENCIL_OP frontStencilPassOp,
+ D3D12_COMPARISON_FUNC frontStencilFunc,
+ UINT8 frontStencilReadMask,
+ UINT8 frontStencilWriteMask,
+ D3D12_STENCIL_OP backStencilFailOp,
+ D3D12_STENCIL_OP backStencilDepthFailOp,
+ D3D12_STENCIL_OP backStencilPassOp,
+ D3D12_COMPARISON_FUNC backStencilFunc,
+ UINT8 backStencilReadMask,
+ UINT8 backStencilWriteMask,
+ BOOL depthBoundsTestEnable) noexcept {
+ DepthEnable = depthEnable;
+ DepthWriteMask = depthWriteMask;
+ DepthFunc = depthFunc;
+ StencilEnable = stencilEnable;
+
+ FrontFace.StencilFailOp = frontStencilFailOp;
+ FrontFace.StencilDepthFailOp = frontStencilDepthFailOp;
+ FrontFace.StencilPassOp = frontStencilPassOp;
+ FrontFace.StencilFunc = frontStencilFunc;
+ FrontFace.StencilReadMask = frontStencilReadMask;
+ FrontFace.StencilWriteMask = frontStencilWriteMask;
+
+ BackFace.StencilFailOp = backStencilFailOp;
+ BackFace.StencilDepthFailOp = backStencilDepthFailOp;
+ BackFace.StencilPassOp = backStencilPassOp;
+ BackFace.StencilFunc = backStencilFunc;
+ BackFace.StencilReadMask = backStencilReadMask;
+ BackFace.StencilWriteMask = backStencilWriteMask;
+
+ DepthBoundsTestEnable = depthBoundsTestEnable;
+ }
+
+ operator D3D12_DEPTH_STENCIL_DESC() const noexcept {
+ D3D12_DEPTH_STENCIL_DESC D;
+ D.DepthEnable = DepthEnable;
+ D.DepthWriteMask = DepthWriteMask;
+ D.DepthFunc = DepthFunc;
+ D.StencilEnable = StencilEnable;
+ D.StencilReadMask = FrontFace.StencilReadMask;
+ D.StencilWriteMask = FrontFace.StencilWriteMask;
+ D.FrontFace.StencilFailOp = FrontFace.StencilFailOp;
+ D.FrontFace.StencilDepthFailOp = FrontFace.StencilDepthFailOp;
+ D.FrontFace.StencilPassOp = FrontFace.StencilPassOp;
+ D.FrontFace.StencilFunc = FrontFace.StencilFunc;
+ D.BackFace.StencilFailOp = BackFace.StencilFailOp;
+ D.BackFace.StencilDepthFailOp = BackFace.StencilDepthFailOp;
+ D.BackFace.StencilPassOp = BackFace.StencilPassOp;
+ D.BackFace.StencilFunc = BackFace.StencilFunc;
+ return D;
+ }
+};
+# endif // D3D12_SDK_VERSION >= 606
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_BLEND_DESC : public D3D12_BLEND_DESC {
+ CD3DX12_BLEND_DESC() = default;
+ explicit CD3DX12_BLEND_DESC(const D3D12_BLEND_DESC& o) noexcept : D3D12_BLEND_DESC(o) {}
+ explicit CD3DX12_BLEND_DESC(CD3DX12_DEFAULT) noexcept {
+ AlphaToCoverageEnable = FALSE;
+ IndependentBlendEnable = FALSE;
+ const D3D12_RENDER_TARGET_BLEND_DESC defaultRenderTargetBlendDesc = {
+ FALSE,
+ FALSE,
+ D3D12_BLEND_ONE,
+ D3D12_BLEND_ZERO,
+ D3D12_BLEND_OP_ADD,
+ D3D12_BLEND_ONE,
+ D3D12_BLEND_ZERO,
+ D3D12_BLEND_OP_ADD,
+ D3D12_LOGIC_OP_NOOP,
+ D3D12_COLOR_WRITE_ENABLE_ALL,
+ };
+ for (UINT i = 0; i < D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT; ++i)
+ RenderTarget[i] = defaultRenderTargetBlendDesc;
+ }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_RASTERIZER_DESC : public D3D12_RASTERIZER_DESC {
+ CD3DX12_RASTERIZER_DESC() = default;
+ explicit CD3DX12_RASTERIZER_DESC(const D3D12_RASTERIZER_DESC& o) noexcept : D3D12_RASTERIZER_DESC(o) {}
+ explicit CD3DX12_RASTERIZER_DESC(CD3DX12_DEFAULT) noexcept {
+ FillMode = D3D12_FILL_MODE_SOLID;
+ CullMode = D3D12_CULL_MODE_BACK;
+ FrontCounterClockwise = FALSE;
+ DepthBias = D3D12_DEFAULT_DEPTH_BIAS;
+ DepthBiasClamp = D3D12_DEFAULT_DEPTH_BIAS_CLAMP;
+ SlopeScaledDepthBias = D3D12_DEFAULT_SLOPE_SCALED_DEPTH_BIAS;
+ DepthClipEnable = TRUE;
+ MultisampleEnable = FALSE;
+ AntialiasedLineEnable = FALSE;
+ ForcedSampleCount = 0;
+ ConservativeRaster = D3D12_CONSERVATIVE_RASTERIZATION_MODE_OFF;
+ }
+ explicit CD3DX12_RASTERIZER_DESC(D3D12_FILL_MODE fillMode,
+ D3D12_CULL_MODE cullMode,
+ BOOL frontCounterClockwise,
+ INT depthBias,
+ FLOAT depthBiasClamp,
+ FLOAT slopeScaledDepthBias,
+ BOOL depthClipEnable,
+ BOOL multisampleEnable,
+ BOOL antialiasedLineEnable,
+ UINT forcedSampleCount,
+ D3D12_CONSERVATIVE_RASTERIZATION_MODE conservativeRaster) noexcept {
+ FillMode = fillMode;
+ CullMode = cullMode;
+ FrontCounterClockwise = frontCounterClockwise;
+ DepthBias = depthBias;
+ DepthBiasClamp = depthBiasClamp;
+ SlopeScaledDepthBias = slopeScaledDepthBias;
+ DepthClipEnable = depthClipEnable;
+ MultisampleEnable = multisampleEnable;
+ AntialiasedLineEnable = antialiasedLineEnable;
+ ForcedSampleCount = forcedSampleCount;
+ ConservativeRaster = conservativeRaster;
+ }
+};
+
+//------------------------------------------------------------------------------------------------
+# if defined(D3D12_SDK_VERSION) && (D3D12_SDK_VERSION >= 608)
+struct CD3DX12_RASTERIZER_DESC1 : public D3D12_RASTERIZER_DESC1 {
+ CD3DX12_RASTERIZER_DESC1() = default;
+ explicit CD3DX12_RASTERIZER_DESC1(const D3D12_RASTERIZER_DESC1& o) noexcept
+ : D3D12_RASTERIZER_DESC1(o)
+
+ {}
+ explicit CD3DX12_RASTERIZER_DESC1(const D3D12_RASTERIZER_DESC& o) noexcept {
+ FillMode = o.FillMode;
+ CullMode = o.CullMode;
+ FrontCounterClockwise = o.FrontCounterClockwise;
+ DepthBias = static_cast<FLOAT>(o.DepthBias);
+ DepthBiasClamp = o.DepthBiasClamp;
+ SlopeScaledDepthBias = o.SlopeScaledDepthBias;
+ DepthClipEnable = o.DepthClipEnable;
+ MultisampleEnable = o.MultisampleEnable;
+ AntialiasedLineEnable = o.AntialiasedLineEnable;
+ ForcedSampleCount = o.ForcedSampleCount;
+ ConservativeRaster = o.ConservativeRaster;
+ }
+ explicit CD3DX12_RASTERIZER_DESC1(CD3DX12_DEFAULT) noexcept {
+ FillMode = D3D12_FILL_MODE_SOLID;
+ CullMode = D3D12_CULL_MODE_BACK;
+ FrontCounterClockwise = FALSE;
+ DepthBias = D3D12_DEFAULT_DEPTH_BIAS;
+ DepthBiasClamp = D3D12_DEFAULT_DEPTH_BIAS_CLAMP;
+ SlopeScaledDepthBias = D3D12_DEFAULT_SLOPE_SCALED_DEPTH_BIAS;
+ DepthClipEnable = TRUE;
+ MultisampleEnable = FALSE;
+ AntialiasedLineEnable = FALSE;
+ ForcedSampleCount = 0;
+ ConservativeRaster = D3D12_CONSERVATIVE_RASTERIZATION_MODE_OFF;
+ }
+ explicit CD3DX12_RASTERIZER_DESC1(D3D12_FILL_MODE fillMode,
+ D3D12_CULL_MODE cullMode,
+ BOOL frontCounterClockwise,
+ FLOAT depthBias,
+ FLOAT depthBiasClamp,
+ FLOAT slopeScaledDepthBias,
+ BOOL depthClipEnable,
+ BOOL multisampleEnable,
+ BOOL antialiasedLineEnable,
+ UINT forcedSampleCount,
+ D3D12_CONSERVATIVE_RASTERIZATION_MODE conservativeRaster) noexcept {
+ FillMode = fillMode;
+ CullMode = cullMode;
+ FrontCounterClockwise = frontCounterClockwise;
+ DepthBias = depthBias;
+ DepthBiasClamp = depthBiasClamp;
+ SlopeScaledDepthBias = slopeScaledDepthBias;
+ DepthClipEnable = depthClipEnable;
+ MultisampleEnable = multisampleEnable;
+ AntialiasedLineEnable = antialiasedLineEnable;
+ ForcedSampleCount = forcedSampleCount;
+ ConservativeRaster = conservativeRaster;
+ }
+
+ operator D3D12_RASTERIZER_DESC() const noexcept {
+ D3D12_RASTERIZER_DESC o;
+
+ o.FillMode = FillMode;
+ o.CullMode = CullMode;
+ o.FrontCounterClockwise = FrontCounterClockwise;
+ o.DepthBias = static_cast<INT>(DepthBias);
+ o.DepthBiasClamp = DepthBiasClamp;
+ o.SlopeScaledDepthBias = SlopeScaledDepthBias;
+ o.DepthClipEnable = DepthClipEnable;
+ o.MultisampleEnable = MultisampleEnable;
+ o.AntialiasedLineEnable = AntialiasedLineEnable;
+ o.ForcedSampleCount = ForcedSampleCount;
+ o.ConservativeRaster = ConservativeRaster;
+
+ return o;
+ }
+};
+# endif // D3D12_SDK_VERSION >= 608
+
+//------------------------------------------------------------------------------------------------
+# if defined(D3D12_SDK_VERSION) && (D3D12_SDK_VERSION >= 610)
+struct CD3DX12_RASTERIZER_DESC2 : public D3D12_RASTERIZER_DESC2 {
+ CD3DX12_RASTERIZER_DESC2() = default;
+ explicit CD3DX12_RASTERIZER_DESC2(const D3D12_RASTERIZER_DESC2& o) noexcept
+ : D3D12_RASTERIZER_DESC2(o)
+
+ {}
+ explicit CD3DX12_RASTERIZER_DESC2(const D3D12_RASTERIZER_DESC1& o) noexcept {
+ FillMode = o.FillMode;
+ CullMode = o.CullMode;
+ FrontCounterClockwise = o.FrontCounterClockwise;
+ DepthBias = o.DepthBias;
+ DepthBiasClamp = o.DepthBiasClamp;
+ SlopeScaledDepthBias = o.SlopeScaledDepthBias;
+ DepthClipEnable = o.DepthClipEnable;
+ LineRasterizationMode = D3D12_LINE_RASTERIZATION_MODE_ALIASED;
+ if (o.MultisampleEnable) {
+ LineRasterizationMode = D3D12_LINE_RASTERIZATION_MODE_QUADRILATERAL_WIDE;
+ } else if (o.AntialiasedLineEnable) {
+ LineRasterizationMode = D3D12_LINE_RASTERIZATION_MODE_ALPHA_ANTIALIASED;
+ }
+ ForcedSampleCount = o.ForcedSampleCount;
+ ConservativeRaster = o.ConservativeRaster;
+ }
+ explicit CD3DX12_RASTERIZER_DESC2(const D3D12_RASTERIZER_DESC& o) noexcept
+ : CD3DX12_RASTERIZER_DESC2(CD3DX12_RASTERIZER_DESC1(o)) {}
+ explicit CD3DX12_RASTERIZER_DESC2(CD3DX12_DEFAULT) noexcept {
+ FillMode = D3D12_FILL_MODE_SOLID;
+ CullMode = D3D12_CULL_MODE_BACK;
+ FrontCounterClockwise = FALSE;
+ DepthBias = D3D12_DEFAULT_DEPTH_BIAS;
+ DepthBiasClamp = D3D12_DEFAULT_DEPTH_BIAS_CLAMP;
+ SlopeScaledDepthBias = D3D12_DEFAULT_SLOPE_SCALED_DEPTH_BIAS;
+ DepthClipEnable = TRUE;
+ LineRasterizationMode = D3D12_LINE_RASTERIZATION_MODE_ALIASED;
+ ForcedSampleCount = 0;
+ ConservativeRaster = D3D12_CONSERVATIVE_RASTERIZATION_MODE_OFF;
+ }
+ explicit CD3DX12_RASTERIZER_DESC2(D3D12_FILL_MODE fillMode,
+ D3D12_CULL_MODE cullMode,
+ BOOL frontCounterClockwise,
+ FLOAT depthBias,
+ FLOAT depthBiasClamp,
+ FLOAT slopeScaledDepthBias,
+ BOOL depthClipEnable,
+ D3D12_LINE_RASTERIZATION_MODE lineRasterizationMode,
+ UINT forcedSampleCount,
+ D3D12_CONSERVATIVE_RASTERIZATION_MODE conservativeRaster) noexcept {
+ FillMode = fillMode;
+ CullMode = cullMode;
+ FrontCounterClockwise = frontCounterClockwise;
+ DepthBias = depthBias;
+ DepthBiasClamp = depthBiasClamp;
+ SlopeScaledDepthBias = slopeScaledDepthBias;
+ DepthClipEnable = depthClipEnable;
+ LineRasterizationMode = lineRasterizationMode;
+ ForcedSampleCount = forcedSampleCount;
+ ConservativeRaster = conservativeRaster;
+ }
+
+ operator D3D12_RASTERIZER_DESC1() const noexcept {
+ D3D12_RASTERIZER_DESC1 o;
+
+ o.FillMode = FillMode;
+ o.CullMode = CullMode;
+ o.FrontCounterClockwise = FrontCounterClockwise;
+ o.DepthBias = DepthBias;
+ o.DepthBiasClamp = DepthBiasClamp;
+ o.SlopeScaledDepthBias = SlopeScaledDepthBias;
+ o.DepthClipEnable = DepthClipEnable;
+ o.MultisampleEnable = FALSE;
+ o.AntialiasedLineEnable = FALSE;
+ if (LineRasterizationMode == D3D12_LINE_RASTERIZATION_MODE_ALPHA_ANTIALIASED) {
+ o.AntialiasedLineEnable = TRUE;
+ } else if (LineRasterizationMode != D3D12_LINE_RASTERIZATION_MODE_ALIASED) {
+ o.MultisampleEnable = TRUE;
+ }
+ o.ForcedSampleCount = ForcedSampleCount;
+ o.ConservativeRaster = ConservativeRaster;
+
+ return o;
+ }
+ operator D3D12_RASTERIZER_DESC() const noexcept {
+ return static_cast<D3D12_RASTERIZER_DESC>(CD3DX12_RASTERIZER_DESC1(static_cast<D3D12_RASTERIZER_DESC1>(*this)));
+ }
+};
+# endif // D3D12_SDK_VERSION >= 610
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_RESOURCE_ALLOCATION_INFO : public D3D12_RESOURCE_ALLOCATION_INFO {
+ CD3DX12_RESOURCE_ALLOCATION_INFO() = default;
+ explicit CD3DX12_RESOURCE_ALLOCATION_INFO(const D3D12_RESOURCE_ALLOCATION_INFO& o) noexcept
+ : D3D12_RESOURCE_ALLOCATION_INFO(o) {}
+ CD3DX12_RESOURCE_ALLOCATION_INFO(UINT64 size, UINT64 alignment) noexcept {
+ SizeInBytes = size;
+ Alignment = alignment;
+ }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_HEAP_PROPERTIES : public D3D12_HEAP_PROPERTIES {
+ CD3DX12_HEAP_PROPERTIES() = default;
+ explicit CD3DX12_HEAP_PROPERTIES(const D3D12_HEAP_PROPERTIES& o) noexcept : D3D12_HEAP_PROPERTIES(o) {}
+ CD3DX12_HEAP_PROPERTIES(D3D12_CPU_PAGE_PROPERTY cpuPageProperty,
+ D3D12_MEMORY_POOL memoryPoolPreference,
+ UINT creationNodeMask = 1,
+ UINT nodeMask = 1)
+ noexcept {
+ Type = D3D12_HEAP_TYPE_CUSTOM;
+ CPUPageProperty = cpuPageProperty;
+ MemoryPoolPreference = memoryPoolPreference;
+ CreationNodeMask = creationNodeMask;
+ VisibleNodeMask = nodeMask;
+ }
+ explicit CD3DX12_HEAP_PROPERTIES(D3D12_HEAP_TYPE type, UINT creationNodeMask = 1, UINT nodeMask = 1) noexcept {
+ Type = type;
+ CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
+ MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
+ CreationNodeMask = creationNodeMask;
+ VisibleNodeMask = nodeMask;
+ }
+ bool IsCPUAccessible() const noexcept {
+ return Type == D3D12_HEAP_TYPE_UPLOAD || Type == D3D12_HEAP_TYPE_READBACK
+# if defined(D3D12_SDK_VERSION) && (D3D12_SDK_VERSION >= 609)
+ || Type == D3D12_HEAP_TYPE_GPU_UPLOAD
+# endif
+ || (Type == D3D12_HEAP_TYPE_CUSTOM && (CPUPageProperty == D3D12_CPU_PAGE_PROPERTY_WRITE_COMBINE ||
+ CPUPageProperty == D3D12_CPU_PAGE_PROPERTY_WRITE_BACK));
+ }
+};
+inline bool operator==(const D3D12_HEAP_PROPERTIES& l, const D3D12_HEAP_PROPERTIES& r) noexcept {
+ return l.Type == r.Type && l.CPUPageProperty == r.CPUPageProperty &&
+ l.MemoryPoolPreference == r.MemoryPoolPreference && l.CreationNodeMask == r.CreationNodeMask &&
+ l.VisibleNodeMask == r.VisibleNodeMask;
+}
+inline bool operator!=(const D3D12_HEAP_PROPERTIES& l, const D3D12_HEAP_PROPERTIES& r) noexcept {
+ return !(l == r);
+}
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_HEAP_DESC : public D3D12_HEAP_DESC {
+ CD3DX12_HEAP_DESC() = default;
+ explicit CD3DX12_HEAP_DESC(const D3D12_HEAP_DESC& o) noexcept : D3D12_HEAP_DESC(o) {}
+ CD3DX12_HEAP_DESC(UINT64 size,
+ D3D12_HEAP_PROPERTIES properties,
+ UINT64 alignment = 0,
+ D3D12_HEAP_FLAGS flags = D3D12_HEAP_FLAG_NONE)
+ noexcept {
+ SizeInBytes = size;
+ Properties = properties;
+ Alignment = alignment;
+ Flags = flags;
+ }
+ CD3DX12_HEAP_DESC(UINT64 size,
+ D3D12_HEAP_TYPE type,
+ UINT64 alignment = 0,
+ D3D12_HEAP_FLAGS flags = D3D12_HEAP_FLAG_NONE)
+ noexcept {
+ SizeInBytes = size;
+ Properties = CD3DX12_HEAP_PROPERTIES(type);
+ Alignment = alignment;
+ Flags = flags;
+ }
+ CD3DX12_HEAP_DESC(UINT64 size,
+ D3D12_CPU_PAGE_PROPERTY cpuPageProperty,
+ D3D12_MEMORY_POOL memoryPoolPreference,
+ UINT64 alignment = 0,
+ D3D12_HEAP_FLAGS flags = D3D12_HEAP_FLAG_NONE)
+ noexcept {
+ SizeInBytes = size;
+ Properties = CD3DX12_HEAP_PROPERTIES(cpuPageProperty, memoryPoolPreference);
+ Alignment = alignment;
+ Flags = flags;
+ }
+ CD3DX12_HEAP_DESC(const D3D12_RESOURCE_ALLOCATION_INFO& resAllocInfo,
+ D3D12_HEAP_PROPERTIES properties,
+ D3D12_HEAP_FLAGS flags = D3D12_HEAP_FLAG_NONE)
+ noexcept {
+ SizeInBytes = resAllocInfo.SizeInBytes;
+ Properties = properties;
+ Alignment = resAllocInfo.Alignment;
+ Flags = flags;
+ }
+ CD3DX12_HEAP_DESC(const D3D12_RESOURCE_ALLOCATION_INFO& resAllocInfo,
+ D3D12_HEAP_TYPE type,
+ D3D12_HEAP_FLAGS flags = D3D12_HEAP_FLAG_NONE)
+ noexcept {
+ SizeInBytes = resAllocInfo.SizeInBytes;
+ Properties = CD3DX12_HEAP_PROPERTIES(type);
+ Alignment = resAllocInfo.Alignment;
+ Flags = flags;
+ }
+ CD3DX12_HEAP_DESC(const D3D12_RESOURCE_ALLOCATION_INFO& resAllocInfo,
+ D3D12_CPU_PAGE_PROPERTY cpuPageProperty,
+ D3D12_MEMORY_POOL memoryPoolPreference,
+ D3D12_HEAP_FLAGS flags = D3D12_HEAP_FLAG_NONE)
+ noexcept {
+ SizeInBytes = resAllocInfo.SizeInBytes;
+ Properties = CD3DX12_HEAP_PROPERTIES(cpuPageProperty, memoryPoolPreference);
+ Alignment = resAllocInfo.Alignment;
+ Flags = flags;
+ }
+ bool IsCPUAccessible() const noexcept {
+ return static_cast<const CD3DX12_HEAP_PROPERTIES*>(&Properties)->IsCPUAccessible();
+ }
+};
+inline bool operator==(const D3D12_HEAP_DESC& l, const D3D12_HEAP_DESC& r) noexcept {
+ return l.SizeInBytes == r.SizeInBytes && l.Properties == r.Properties && l.Alignment == r.Alignment &&
+ l.Flags == r.Flags;
+}
+inline bool operator!=(const D3D12_HEAP_DESC& l, const D3D12_HEAP_DESC& r) noexcept {
+ return !(l == r);
+}
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_CLEAR_VALUE : public D3D12_CLEAR_VALUE {
+ CD3DX12_CLEAR_VALUE() = default;
+ explicit CD3DX12_CLEAR_VALUE(const D3D12_CLEAR_VALUE& o) noexcept : D3D12_CLEAR_VALUE(o) {}
+ CD3DX12_CLEAR_VALUE(DXGI_FORMAT format, const FLOAT color[4]) noexcept {
+ Format = format;
+ memcpy(Color, color, sizeof(Color));
+ }
+ CD3DX12_CLEAR_VALUE(DXGI_FORMAT format, FLOAT depth, UINT8 stencil) noexcept {
+ Format = format;
+ memset(&Color, 0, sizeof(Color));
+ /* Use memcpy to preserve NAN values */
+ memcpy(&DepthStencil.Depth, &depth, sizeof(depth));
+ DepthStencil.Stencil = stencil;
+ }
+};
+
+//------------------------------------------------------------------------------------------------
+inline bool operator==(const D3D12_CLEAR_VALUE& a, const D3D12_CLEAR_VALUE& b) noexcept {
+ if (a.Format != b.Format)
+ return false;
+ if (a.Format == DXGI_FORMAT_D24_UNORM_S8_UINT || a.Format == DXGI_FORMAT_D16_UNORM ||
+ a.Format == DXGI_FORMAT_D32_FLOAT || a.Format == DXGI_FORMAT_D32_FLOAT_S8X24_UINT) {
+ return (a.DepthStencil.Depth == b.DepthStencil.Depth) && (a.DepthStencil.Stencil == b.DepthStencil.Stencil);
+ } else {
+ return (a.Color[0] == b.Color[0]) && (a.Color[1] == b.Color[1]) && (a.Color[2] == b.Color[2]) &&
+ (a.Color[3] == b.Color[3]);
+ }
+}
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_RANGE : public D3D12_RANGE {
+ CD3DX12_RANGE() = default;
+ explicit CD3DX12_RANGE(const D3D12_RANGE& o) noexcept : D3D12_RANGE(o) {}
+ CD3DX12_RANGE(SIZE_T begin, SIZE_T end) noexcept {
+ Begin = begin;
+ End = end;
+ }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_RANGE_UINT64 : public D3D12_RANGE_UINT64 {
+ CD3DX12_RANGE_UINT64() = default;
+ explicit CD3DX12_RANGE_UINT64(const D3D12_RANGE_UINT64& o) noexcept : D3D12_RANGE_UINT64(o) {}
+ CD3DX12_RANGE_UINT64(UINT64 begin, UINT64 end) noexcept {
+ Begin = begin;
+ End = end;
+ }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_SUBRESOURCE_RANGE_UINT64 : public D3D12_SUBRESOURCE_RANGE_UINT64 {
+ CD3DX12_SUBRESOURCE_RANGE_UINT64() = default;
+ explicit CD3DX12_SUBRESOURCE_RANGE_UINT64(const D3D12_SUBRESOURCE_RANGE_UINT64& o) noexcept
+ : D3D12_SUBRESOURCE_RANGE_UINT64(o) {}
+ CD3DX12_SUBRESOURCE_RANGE_UINT64(UINT subresource, const D3D12_RANGE_UINT64& range) noexcept {
+ Subresource = subresource;
+ Range = range;
+ }
+ CD3DX12_SUBRESOURCE_RANGE_UINT64(UINT subresource, UINT64 begin, UINT64 end) noexcept {
+ Subresource = subresource;
+ Range.Begin = begin;
+ Range.End = end;
+ }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_SHADER_BYTECODE : public D3D12_SHADER_BYTECODE {
+ CD3DX12_SHADER_BYTECODE() = default;
+ explicit CD3DX12_SHADER_BYTECODE(const D3D12_SHADER_BYTECODE& o) noexcept : D3D12_SHADER_BYTECODE(o) {}
+ CD3DX12_SHADER_BYTECODE(_In_ ID3DBlob* pShaderBlob) noexcept {
+ pShaderBytecode = pShaderBlob->GetBufferPointer();
+ BytecodeLength = pShaderBlob->GetBufferSize();
+ }
+ CD3DX12_SHADER_BYTECODE(const void* _pShaderBytecode, SIZE_T bytecodeLength) noexcept {
+ pShaderBytecode = _pShaderBytecode;
+ BytecodeLength = bytecodeLength;
+ }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_TILED_RESOURCE_COORDINATE : public D3D12_TILED_RESOURCE_COORDINATE {
+ CD3DX12_TILED_RESOURCE_COORDINATE() = default;
+ explicit CD3DX12_TILED_RESOURCE_COORDINATE(const D3D12_TILED_RESOURCE_COORDINATE& o) noexcept
+ : D3D12_TILED_RESOURCE_COORDINATE(o) {}
+ CD3DX12_TILED_RESOURCE_COORDINATE(UINT x, UINT y, UINT z, UINT subresource) noexcept {
+ X = x;
+ Y = y;
+ Z = z;
+ Subresource = subresource;
+ }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_TILE_REGION_SIZE : public D3D12_TILE_REGION_SIZE {
+ CD3DX12_TILE_REGION_SIZE() = default;
+ explicit CD3DX12_TILE_REGION_SIZE(const D3D12_TILE_REGION_SIZE& o) noexcept : D3D12_TILE_REGION_SIZE(o) {}
+ CD3DX12_TILE_REGION_SIZE(UINT numTiles, BOOL useBox, UINT width, UINT16 height, UINT16 depth) noexcept {
+ NumTiles = numTiles;
+ UseBox = useBox;
+ Width = width;
+ Height = height;
+ Depth = depth;
+ }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_SUBRESOURCE_TILING : public D3D12_SUBRESOURCE_TILING {
+ CD3DX12_SUBRESOURCE_TILING() = default;
+ explicit CD3DX12_SUBRESOURCE_TILING(const D3D12_SUBRESOURCE_TILING& o) noexcept : D3D12_SUBRESOURCE_TILING(o) {}
+ CD3DX12_SUBRESOURCE_TILING(UINT widthInTiles,
+ UINT16 heightInTiles,
+ UINT16 depthInTiles,
+ UINT startTileIndexInOverallResource)
+ noexcept {
+ WidthInTiles = widthInTiles;
+ HeightInTiles = heightInTiles;
+ DepthInTiles = depthInTiles;
+ StartTileIndexInOverallResource = startTileIndexInOverallResource;
+ }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_TILE_SHAPE : public D3D12_TILE_SHAPE {
+ CD3DX12_TILE_SHAPE() = default;
+ explicit CD3DX12_TILE_SHAPE(const D3D12_TILE_SHAPE& o) noexcept : D3D12_TILE_SHAPE(o) {}
+ CD3DX12_TILE_SHAPE(UINT widthInTexels, UINT heightInTexels, UINT depthInTexels) noexcept {
+ WidthInTexels = widthInTexels;
+ HeightInTexels = heightInTexels;
+ DepthInTexels = depthInTexels;
+ }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_PACKED_MIP_INFO : public D3D12_PACKED_MIP_INFO {
+ CD3DX12_PACKED_MIP_INFO() = default;
+ explicit CD3DX12_PACKED_MIP_INFO(const D3D12_PACKED_MIP_INFO& o) noexcept : D3D12_PACKED_MIP_INFO(o) {}
+ CD3DX12_PACKED_MIP_INFO(UINT8 numStandardMips,
+ UINT8 numPackedMips,
+ UINT numTilesForPackedMips,
+ UINT startTileIndexInOverallResource)
+ noexcept {
+ NumStandardMips = numStandardMips;
+ NumPackedMips = numPackedMips;
+ NumTilesForPackedMips = numTilesForPackedMips;
+ StartTileIndexInOverallResource = startTileIndexInOverallResource;
+ }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_SUBRESOURCE_FOOTPRINT : public D3D12_SUBRESOURCE_FOOTPRINT {
+ CD3DX12_SUBRESOURCE_FOOTPRINT() = default;
+ explicit CD3DX12_SUBRESOURCE_FOOTPRINT(const D3D12_SUBRESOURCE_FOOTPRINT& o) noexcept
+ : D3D12_SUBRESOURCE_FOOTPRINT(o) {}
+ CD3DX12_SUBRESOURCE_FOOTPRINT(DXGI_FORMAT format, UINT width, UINT height, UINT depth, UINT rowPitch) noexcept {
+ Format = format;
+ Width = width;
+ Height = height;
+ Depth = depth;
+ RowPitch = rowPitch;
+ }
+ explicit CD3DX12_SUBRESOURCE_FOOTPRINT(const D3D12_RESOURCE_DESC& resDesc, UINT rowPitch) noexcept {
+ Format = resDesc.Format;
+ Width = UINT(resDesc.Width);
+ Height = resDesc.Height;
+ Depth = (resDesc.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D ? resDesc.DepthOrArraySize : 1u);
+ RowPitch = rowPitch;
+ }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_TEXTURE_COPY_LOCATION : public D3D12_TEXTURE_COPY_LOCATION {
+ CD3DX12_TEXTURE_COPY_LOCATION() = default;
+ explicit CD3DX12_TEXTURE_COPY_LOCATION(const D3D12_TEXTURE_COPY_LOCATION& o) noexcept
+ : D3D12_TEXTURE_COPY_LOCATION(o) {}
+ CD3DX12_TEXTURE_COPY_LOCATION(_In_ ID3D12Resource* pRes) noexcept {
+ pResource = pRes;
+ Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX;
+ PlacedFootprint = {};
+ }
+ CD3DX12_TEXTURE_COPY_LOCATION(_In_ ID3D12Resource* pRes, D3D12_PLACED_SUBRESOURCE_FOOTPRINT const& Footprint)
+ noexcept {
+ pResource = pRes;
+ Type = D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT;
+ PlacedFootprint = Footprint;
+ }
+ CD3DX12_TEXTURE_COPY_LOCATION(_In_ ID3D12Resource* pRes, UINT Sub) noexcept {
+ pResource = pRes;
+ Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX;
+ PlacedFootprint = {};
+ SubresourceIndex = Sub;
+ }
+};
+
+//------------------------------------------------------------------------------------------------
+constexpr UINT D3D12CalcSubresource(UINT MipSlice,
+ UINT ArraySlice,
+ UINT PlaneSlice,
+ UINT MipLevels,
+ UINT ArraySize) noexcept {
+ return MipSlice + ArraySlice * MipLevels + PlaneSlice * MipLevels * ArraySize;
+}
+
+//------------------------------------------------------------------------------------------------
+inline UINT8 D3D12GetFormatPlaneCount(_In_ ID3D12Device* pDevice, DXGI_FORMAT Format) noexcept {
+ D3D12_FEATURE_DATA_FORMAT_INFO formatInfo = {Format, 0};
+ if (FAILED(pDevice->CheckFeatureSupport(D3D12_FEATURE_FORMAT_INFO, &formatInfo, sizeof(formatInfo)))) {
+ return 0;
+ }
+ return formatInfo.PlaneCount;
+}
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_RESOURCE_DESC : public D3D12_RESOURCE_DESC {
+ CD3DX12_RESOURCE_DESC() = default;
+ explicit CD3DX12_RESOURCE_DESC(const D3D12_RESOURCE_DESC& o) noexcept : D3D12_RESOURCE_DESC(o) {}
+ CD3DX12_RESOURCE_DESC(D3D12_RESOURCE_DIMENSION dimension,
+ UINT64 alignment,
+ UINT64 width,
+ UINT height,
+ UINT16 depthOrArraySize,
+ UINT16 mipLevels,
+ DXGI_FORMAT format,
+ UINT sampleCount,
+ UINT sampleQuality,
+ D3D12_TEXTURE_LAYOUT layout,
+ D3D12_RESOURCE_FLAGS flags)
+ noexcept {
+ Dimension = dimension;
+ Alignment = alignment;
+ Width = width;
+ Height = height;
+ DepthOrArraySize = depthOrArraySize;
+ MipLevels = mipLevels;
+ Format = format;
+ SampleDesc.Count = sampleCount;
+ SampleDesc.Quality = sampleQuality;
+ Layout = layout;
+ Flags = flags;
+ }
+ static inline CD3DX12_RESOURCE_DESC Buffer(const D3D12_RESOURCE_ALLOCATION_INFO& resAllocInfo,
+ D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE) noexcept {
+ return CD3DX12_RESOURCE_DESC(D3D12_RESOURCE_DIMENSION_BUFFER,
+ resAllocInfo.Alignment,
+ resAllocInfo.SizeInBytes,
+ 1,
+ 1,
+ 1,
+ DXGI_FORMAT_UNKNOWN,
+ 1,
+ 0,
+ D3D12_TEXTURE_LAYOUT_ROW_MAJOR,
+ flags);
+ }
+ static inline CD3DX12_RESOURCE_DESC Buffer(UINT64 width,
+ D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE,
+ UINT64 alignment = 0) noexcept {
+ return CD3DX12_RESOURCE_DESC(D3D12_RESOURCE_DIMENSION_BUFFER,
+ alignment,
+ width,
+ 1,
+ 1,
+ 1,
+ DXGI_FORMAT_UNKNOWN,
+ 1,
+ 0,
+ D3D12_TEXTURE_LAYOUT_ROW_MAJOR,
+ flags);
+ }
+ static inline CD3DX12_RESOURCE_DESC Tex1D(DXGI_FORMAT format,
+ UINT64 width,
+ UINT16 arraySize = 1,
+ UINT16 mipLevels = 0,
+ D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE,
+ D3D12_TEXTURE_LAYOUT layout = D3D12_TEXTURE_LAYOUT_UNKNOWN,
+ UINT64 alignment = 0) noexcept {
+ return CD3DX12_RESOURCE_DESC(D3D12_RESOURCE_DIMENSION_TEXTURE1D,
+ alignment,
+ width,
+ 1,
+ arraySize,
+ mipLevels,
+ format,
+ 1,
+ 0,
+ layout,
+ flags);
+ }
+ static inline CD3DX12_RESOURCE_DESC Tex2D(DXGI_FORMAT format,
+ UINT64 width,
+ UINT height,
+ UINT16 arraySize = 1,
+ UINT16 mipLevels = 0,
+ UINT sampleCount = 1,
+ UINT sampleQuality = 0,
+ D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE,
+ D3D12_TEXTURE_LAYOUT layout = D3D12_TEXTURE_LAYOUT_UNKNOWN,
+ UINT64 alignment = 0) noexcept {
+ return CD3DX12_RESOURCE_DESC(D3D12_RESOURCE_DIMENSION_TEXTURE2D,
+ alignment,
+ width,
+ height,
+ arraySize,
+ mipLevels,
+ format,
+ sampleCount,
+ sampleQuality,
+ layout,
+ flags);
+ }
+ static inline CD3DX12_RESOURCE_DESC Tex3D(DXGI_FORMAT format,
+ UINT64 width,
+ UINT height,
+ UINT16 depth,
+ UINT16 mipLevels = 0,
+ D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE,
+ D3D12_TEXTURE_LAYOUT layout = D3D12_TEXTURE_LAYOUT_UNKNOWN,
+ UINT64 alignment = 0) noexcept {
+ return CD3DX12_RESOURCE_DESC(D3D12_RESOURCE_DIMENSION_TEXTURE3D,
+ alignment,
+ width,
+ height,
+ depth,
+ mipLevels,
+ format,
+ 1,
+ 0,
+ layout,
+ flags);
+ }
+ inline UINT16 Depth() const noexcept {
+ return (Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D ? DepthOrArraySize : 1u);
+ }
+ inline UINT16 ArraySize() const noexcept {
+ return (Dimension != D3D12_RESOURCE_DIMENSION_TEXTURE3D ? DepthOrArraySize : 1u);
+ }
+ inline UINT8 PlaneCount(_In_ ID3D12Device* pDevice) const noexcept {
+ return D3D12GetFormatPlaneCount(pDevice, Format);
+ }
+ inline UINT Subresources(_In_ ID3D12Device* pDevice) const noexcept {
+ return static_cast<UINT>(MipLevels) * ArraySize() * PlaneCount(pDevice);
+ }
+ inline UINT CalcSubresource(UINT MipSlice, UINT ArraySlice, UINT PlaneSlice) noexcept {
+ return D3D12CalcSubresource(MipSlice, ArraySlice, PlaneSlice, MipLevels, ArraySize());
+ }
+};
+inline bool operator==(const D3D12_RESOURCE_DESC& l, const D3D12_RESOURCE_DESC& r) noexcept {
+ return l.Dimension == r.Dimension && l.Alignment == r.Alignment && l.Width == r.Width && l.Height == r.Height &&
+ l.DepthOrArraySize == r.DepthOrArraySize && l.MipLevels == r.MipLevels && l.Format == r.Format &&
+ l.SampleDesc.Count == r.SampleDesc.Count && l.SampleDesc.Quality == r.SampleDesc.Quality &&
+ l.Layout == r.Layout && l.Flags == r.Flags;
+}
+inline bool operator!=(const D3D12_RESOURCE_DESC& l, const D3D12_RESOURCE_DESC& r) noexcept {
+ return !(l == r);
+}
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_RESOURCE_DESC1 : public D3D12_RESOURCE_DESC1 {
+ CD3DX12_RESOURCE_DESC1() = default;
+ explicit CD3DX12_RESOURCE_DESC1(const D3D12_RESOURCE_DESC1& o) noexcept : D3D12_RESOURCE_DESC1(o) {}
+ explicit CD3DX12_RESOURCE_DESC1(const D3D12_RESOURCE_DESC& o) noexcept {
+ Dimension = o.Dimension;
+ Alignment = o.Alignment;
+ Width = o.Width;
+ Height = o.Height;
+ DepthOrArraySize = o.DepthOrArraySize;
+ MipLevels = o.MipLevels;
+ Format = o.Format;
+ SampleDesc = o.SampleDesc;
+ Layout = o.Layout;
+ Flags = o.Flags;
+ SamplerFeedbackMipRegion = {};
+ }
+ CD3DX12_RESOURCE_DESC1(D3D12_RESOURCE_DIMENSION dimension,
+ UINT64 alignment,
+ UINT64 width,
+ UINT height,
+ UINT16 depthOrArraySize,
+ UINT16 mipLevels,
+ DXGI_FORMAT format,
+ UINT sampleCount,
+ UINT sampleQuality,
+ D3D12_TEXTURE_LAYOUT layout,
+ D3D12_RESOURCE_FLAGS flags,
+ UINT samplerFeedbackMipRegionWidth = 0,
+ UINT samplerFeedbackMipRegionHeight = 0,
+ UINT samplerFeedbackMipRegionDepth = 0)
+ noexcept {
+ Dimension = dimension;
+ Alignment = alignment;
+ Width = width;
+ Height = height;
+ DepthOrArraySize = depthOrArraySize;
+ MipLevels = mipLevels;
+ Format = format;
+ SampleDesc.Count = sampleCount;
+ SampleDesc.Quality = sampleQuality;
+ Layout = layout;
+ Flags = flags;
+ SamplerFeedbackMipRegion.Width = samplerFeedbackMipRegionWidth;
+ SamplerFeedbackMipRegion.Height = samplerFeedbackMipRegionHeight;
+ SamplerFeedbackMipRegion.Depth = samplerFeedbackMipRegionDepth;
+ }
+
+ static inline CD3DX12_RESOURCE_DESC1 Buffer(const D3D12_RESOURCE_ALLOCATION_INFO& resAllocInfo,
+ D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE) noexcept {
+ return CD3DX12_RESOURCE_DESC1(D3D12_RESOURCE_DIMENSION_BUFFER,
+ resAllocInfo.Alignment,
+ resAllocInfo.SizeInBytes,
+ 1,
+ 1,
+ 1,
+ DXGI_FORMAT_UNKNOWN,
+ 1,
+ 0,
+ D3D12_TEXTURE_LAYOUT_ROW_MAJOR,
+ flags,
+ 0,
+ 0,
+ 0);
+ }
+ static inline CD3DX12_RESOURCE_DESC1 Buffer(UINT64 width,
+ D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE,
+ UINT64 alignment = 0) noexcept {
+ return CD3DX12_RESOURCE_DESC1(D3D12_RESOURCE_DIMENSION_BUFFER,
+ alignment,
+ width,
+ 1,
+ 1,
+ 1,
+ DXGI_FORMAT_UNKNOWN,
+ 1,
+ 0,
+ D3D12_TEXTURE_LAYOUT_ROW_MAJOR,
+ flags,
+ 0,
+ 0,
+ 0);
+ }
+ static inline CD3DX12_RESOURCE_DESC1 Tex1D(DXGI_FORMAT format,
+ UINT64 width,
+ UINT16 arraySize = 1,
+ UINT16 mipLevels = 0,
+ D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE,
+ D3D12_TEXTURE_LAYOUT layout = D3D12_TEXTURE_LAYOUT_UNKNOWN,
+ UINT64 alignment = 0) noexcept {
+ return CD3DX12_RESOURCE_DESC1(D3D12_RESOURCE_DIMENSION_TEXTURE1D,
+ alignment,
+ width,
+ 1,
+ arraySize,
+ mipLevels,
+ format,
+ 1,
+ 0,
+ layout,
+ flags,
+ 0,
+ 0,
+ 0);
+ }
+ static inline CD3DX12_RESOURCE_DESC1 Tex2D(DXGI_FORMAT format,
+ UINT64 width,
+ UINT height,
+ UINT16 arraySize = 1,
+ UINT16 mipLevels = 0,
+ UINT sampleCount = 1,
+ UINT sampleQuality = 0,
+ D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE,
+ D3D12_TEXTURE_LAYOUT layout = D3D12_TEXTURE_LAYOUT_UNKNOWN,
+ UINT64 alignment = 0,
+ UINT samplerFeedbackMipRegionWidth = 0,
+ UINT samplerFeedbackMipRegionHeight = 0,
+ UINT samplerFeedbackMipRegionDepth = 0) noexcept {
+ return CD3DX12_RESOURCE_DESC1(D3D12_RESOURCE_DIMENSION_TEXTURE2D,
+ alignment,
+ width,
+ height,
+ arraySize,
+ mipLevels,
+ format,
+ sampleCount,
+ sampleQuality,
+ layout,
+ flags,
+ samplerFeedbackMipRegionWidth,
+ samplerFeedbackMipRegionHeight,
+ samplerFeedbackMipRegionDepth);
+ }
+ static inline CD3DX12_RESOURCE_DESC1 Tex3D(DXGI_FORMAT format,
+ UINT64 width,
+ UINT height,
+ UINT16 depth,
+ UINT16 mipLevels = 0,
+ D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE,
+ D3D12_TEXTURE_LAYOUT layout = D3D12_TEXTURE_LAYOUT_UNKNOWN,
+ UINT64 alignment = 0) noexcept {
+ return CD3DX12_RESOURCE_DESC1(D3D12_RESOURCE_DIMENSION_TEXTURE3D,
+ alignment,
+ width,
+ height,
+ depth,
+ mipLevels,
+ format,
+ 1,
+ 0,
+ layout,
+ flags,
+ 0,
+ 0,
+ 0);
+ }
+ inline UINT16 Depth() const noexcept {
+ return (Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D ? DepthOrArraySize : 1u);
+ }
+ inline UINT16 ArraySize() const noexcept {
+ return (Dimension != D3D12_RESOURCE_DIMENSION_TEXTURE3D ? DepthOrArraySize : 1u);
+ }
+ inline UINT8 PlaneCount(_In_ ID3D12Device* pDevice) const noexcept {
+ return D3D12GetFormatPlaneCount(pDevice, Format);
+ }
+ inline UINT Subresources(_In_ ID3D12Device* pDevice) const noexcept {
+ return static_cast<UINT>(MipLevels) * ArraySize() * PlaneCount(pDevice);
+ }
+ inline UINT CalcSubresource(UINT MipSlice, UINT ArraySlice, UINT PlaneSlice) noexcept {
+ return D3D12CalcSubresource(MipSlice, ArraySlice, PlaneSlice, MipLevels, ArraySize());
+ }
+};
+inline bool operator==(const D3D12_RESOURCE_DESC1& l, const D3D12_RESOURCE_DESC1& r) noexcept {
+ return l.Dimension == r.Dimension && l.Alignment == r.Alignment && l.Width == r.Width && l.Height == r.Height &&
+ l.DepthOrArraySize == r.DepthOrArraySize && l.MipLevels == r.MipLevels && l.Format == r.Format &&
+ l.SampleDesc.Count == r.SampleDesc.Count && l.SampleDesc.Quality == r.SampleDesc.Quality &&
+ l.Layout == r.Layout && l.Flags == r.Flags &&
+ l.SamplerFeedbackMipRegion.Width == r.SamplerFeedbackMipRegion.Width &&
+ l.SamplerFeedbackMipRegion.Height == r.SamplerFeedbackMipRegion.Height &&
+ l.SamplerFeedbackMipRegion.Depth == r.SamplerFeedbackMipRegion.Depth;
+}
+inline bool operator!=(const D3D12_RESOURCE_DESC1& l, const D3D12_RESOURCE_DESC1& r) noexcept {
+ return !(l == r);
+}
+
+//------------------------------------------------------------------------------------------------
+// Fills in the mipmap and alignment values of pDesc when either members are zero
+// Used to replace an implicit field to an explicit (0 mip map = max mip map level)
+// If expansion has occured, returns LclDesc, else returns the original pDesc
+inline const CD3DX12_RESOURCE_DESC1* D3DX12ConditionallyExpandAPIDesc(CD3DX12_RESOURCE_DESC1& LclDesc,
+ const CD3DX12_RESOURCE_DESC1* pDesc) {
+ // Expand mip levels:
+ if (pDesc->MipLevels == 0 || pDesc->Alignment == 0) {
+ LclDesc = *pDesc;
+ if (pDesc->MipLevels == 0) {
+ auto MaxMipLevels = [](UINT64 uiMaxDimension) -> UINT16 {
+ UINT16 uiRet = 0;
+ while (uiMaxDimension > 0) {
+ uiRet++;
+ uiMaxDimension >>= 1;
+ }
+ return uiRet;
+ };
+ auto Max = [](UINT64 const& a, UINT64 const& b) {
+ return (a < b) ? b : a;
+ };
+
+ LclDesc.MipLevels =
+ MaxMipLevels(Max(LclDesc.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D ? LclDesc.DepthOrArraySize : 1,
+ Max(LclDesc.Width, LclDesc.Height)));
+ }
+ if (pDesc->Alignment == 0) {
+ if (pDesc->Layout == D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE ||
+ pDesc->Layout == D3D12_TEXTURE_LAYOUT_64KB_STANDARD_SWIZZLE) {
+ LclDesc.Alignment = D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT;
+ } else {
+ LclDesc.Alignment = (pDesc->SampleDesc.Count > 1 ? D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT
+ : D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT);
+ }
+ }
+ return &LclDesc;
+ } else {
+ return pDesc;
+ }
+}
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_VIEW_INSTANCING_DESC : public D3D12_VIEW_INSTANCING_DESC {
+ CD3DX12_VIEW_INSTANCING_DESC() = default;
+ explicit CD3DX12_VIEW_INSTANCING_DESC(const D3D12_VIEW_INSTANCING_DESC& o) noexcept
+ : D3D12_VIEW_INSTANCING_DESC(o) {}
+ explicit CD3DX12_VIEW_INSTANCING_DESC(CD3DX12_DEFAULT) noexcept {
+ ViewInstanceCount = 0;
+ pViewInstanceLocations = nullptr;
+ Flags = D3D12_VIEW_INSTANCING_FLAG_NONE;
+ }
+ explicit CD3DX12_VIEW_INSTANCING_DESC(UINT InViewInstanceCount,
+ const D3D12_VIEW_INSTANCE_LOCATION* InViewInstanceLocations,
+ D3D12_VIEW_INSTANCING_FLAGS InFlags) noexcept {
+ ViewInstanceCount = InViewInstanceCount;
+ pViewInstanceLocations = InViewInstanceLocations;
+ Flags = InFlags;
+ }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_RT_FORMAT_ARRAY : public D3D12_RT_FORMAT_ARRAY {
+ CD3DX12_RT_FORMAT_ARRAY() = default;
+ explicit CD3DX12_RT_FORMAT_ARRAY(const D3D12_RT_FORMAT_ARRAY& o) noexcept : D3D12_RT_FORMAT_ARRAY(o) {}
+ explicit CD3DX12_RT_FORMAT_ARRAY(_In_reads_(NumFormats) const DXGI_FORMAT* pFormats, UINT NumFormats) noexcept {
+ NumRenderTargets = NumFormats;
+ memcpy(RTFormats, pFormats, sizeof(RTFormats));
+ // assumes ARRAY_SIZE(pFormats) == ARRAY_SIZE(RTFormats)
+ }
+};
+
+#endif
diff --git a/src/plugins/intel_npu/tests/functional/behavior/remote_tensor_tests/d3dx12_default.h b/src/plugins/intel_npu/tests/functional/behavior/remote_tensor_tests/d3dx12_default.h
new file mode 100644
index 00000000000..2ae8f5c4bee
--- /dev/null
+++ b/src/plugins/intel_npu/tests/functional/behavior/remote_tensor_tests/d3dx12_default.h
@@ -0,0 +1,15 @@
+//*********************************************************
+//
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License (MIT).
+//
+//*********************************************************
+
+#pragma once
+
+#ifdef _WIN32
+
+struct CD3DX12_DEFAULT {};
+extern const DECLSPEC_SELECTANY CD3DX12_DEFAULT D3D12_DEFAULT;
+
+#endif
diff --git a/src/plugins/intel_npu/tests/functional/behavior/remote_tensor_tests/dma_buf_remote_run.cpp b/src/plugins/intel_npu/tests/functional/behavior/remote_tensor_tests/dma_buf_remote_run.cpp
index 4653cad201d..f95c186f910 100644
--- a/src/plugins/intel_npu/tests/functional/behavior/remote_tensor_tests/dma_buf_remote_run.cpp
+++ b/src/plugins/intel_npu/tests/functional/behavior/remote_tensor_tests/dma_buf_remote_run.cpp
@@ -6,7 +6,7 @@
#include "common/npu_test_env_cfg.hpp"
#include "common/utils.hpp"
-#include "intel_npu/al/config/common.hpp"
+#include "intel_npu/config/common.hpp"
#ifdef __linux__
# include <linux/version.h>
diff --git a/src/plugins/intel_npu/tests/functional/behavior/remote_tensor_tests/dx12_remote_run.cpp b/src/plugins/intel_npu/tests/functional/behavior/remote_tensor_tests/dx12_remote_run.cpp
index 2e0299e4116..7c04d19e1e1 100644
--- a/src/plugins/intel_npu/tests/functional/behavior/remote_tensor_tests/dx12_remote_run.cpp
+++ b/src/plugins/intel_npu/tests/functional/behavior/remote_tensor_tests/dx12_remote_run.cpp
@@ -6,7 +6,7 @@
#include "common/npu_test_env_cfg.hpp"
#include "common/utils.hpp"
-#include "intel_npu/al/config/common.hpp"
+#include "intel_npu/config/common.hpp"
#ifdef _WIN32
# ifdef ENABLE_DX12
diff --git a/src/plugins/intel_npu/tests/functional/behavior/remote_tensor_tests/remote_run.cpp b/src/plugins/intel_npu/tests/functional/behavior/remote_tensor_tests/remote_run.cpp
index 5228bbd05ee..e279e66498b 100644
--- a/src/plugins/intel_npu/tests/functional/behavior/remote_tensor_tests/remote_run.cpp
+++ b/src/plugins/intel_npu/tests/functional/behavior/remote_tensor_tests/remote_run.cpp
@@ -6,7 +6,7 @@
#include "common/npu_test_env_cfg.hpp"
#include "common/utils.hpp"
-#include "intel_npu/al/config/common.hpp"
+#include "intel_npu/config/common.hpp"
using namespace ov::test::behavior;
diff --git a/src/plugins/intel_npu/tests/functional/behavior/replace_sw_layers.cpp b/src/plugins/intel_npu/tests/functional/behavior/replace_sw_layers.cpp
index 54cc4c9e34d..26d7ccd68d3 100644
--- a/src/plugins/intel_npu/tests/functional/behavior/replace_sw_layers.cpp
+++ b/src/plugins/intel_npu/tests/functional/behavior/replace_sw_layers.cpp
@@ -5,11 +5,12 @@
#include <base/ov_behavior_test_utils.hpp>
#include <string>
#include <vector>
+
#include "common/functions.h"
-#include "common/utils.hpp"
#include "common/npu_test_env_cfg.hpp"
-#include "intel_npu/al/config/common.hpp"
-#include "npu_private_properties.hpp"
+#include "common/utils.hpp"
+#include "intel_npu/config/common.hpp"
+#include "intel_npu/npu_private_properties.hpp"
#include "openvino/op/clamp.hpp"
#include "openvino/runtime/intel_npu/properties.hpp"
@@ -44,12 +45,12 @@ TEST_P(CompileWithDummy_NPU3720, CompilationForSpecificPlatform) {
}
}
-const std::vector<ov::AnyMap> configs = {
- {{ov::intel_npu::platform(ov::intel_npu::Platform::NPU3720)},
- {ov::intel_npu::compilation_mode_params("dummy-op-replacement=true")}}};
+const std::vector<ov::AnyMap> configs = {{{ov::intel_npu::platform(ov::intel_npu::Platform::NPU3720)},
+ {ov::intel_npu::compilation_mode_params("dummy-op-replacement=true")}}};
// Must be successfully compiled with dummy-op-replacement=true
-INSTANTIATE_TEST_SUITE_P(smoke_precommit_BehaviorTest_Dummy, CompileWithDummy_NPU3720,
+INSTANTIATE_TEST_SUITE_P(smoke_precommit_BehaviorTest_Dummy,
+ CompileWithDummy_NPU3720,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(configs)),
CompileWithDummy_NPU3720::getTestCaseName);
diff --git a/src/plugins/intel_npu/tests/functional/behavior/work_with_devices.cpp b/src/plugins/intel_npu/tests/functional/behavior/work_with_devices.cpp
index 87c582bbbe0..928aa583654 100644
--- a/src/plugins/intel_npu/tests/functional/behavior/work_with_devices.cpp
+++ b/src/plugins/intel_npu/tests/functional/behavior/work_with_devices.cpp
@@ -3,16 +3,18 @@
//
#include "behavior/work_with_devices.hpp"
+
#include "common/utils.hpp"
-#include "intel_npu/al/config/common.hpp"
+#include "intel_npu/config/common.hpp"
namespace {
const std::vector<ov::AnyMap> configs = {
- {{ov::log::level(ov::log::Level::DEBUG)}},
+ {{ov::log::level(ov::log::Level::DEBUG)}},
};
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTest, TestCompiledModelNPU,
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTest,
+ TestCompiledModelNPU,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(configs)),
TestCompiledModelNPU::getTestCaseName);
diff --git a/src/plugins/intel_npu/tests/functional/behavior/work_with_devices.hpp b/src/plugins/intel_npu/tests/functional/behavior/work_with_devices.hpp
index 340d28f18a4..27ced4337c4 100644
--- a/src/plugins/intel_npu/tests/functional/behavior/work_with_devices.hpp
+++ b/src/plugins/intel_npu/tests/functional/behavior/work_with_devices.hpp
@@ -4,17 +4,16 @@
#pragma once
-#include <base/ov_behavior_test_utils.hpp>
#include <cstring>
-#include <intel_npu/al/config/compiler.hpp>
#include <string>
#include <vector>
+#include "base/ov_behavior_test_utils.hpp"
#include "common/functions.h"
#include "common/npu_test_env_cfg.hpp"
-#include "intel_npu/al/config/common.hpp"
-#include "npu_private_properties.hpp"
-
+#include "intel_npu/config/common.hpp"
+#include "intel_npu/config/compiler.hpp"
+#include "intel_npu/npu_private_properties.hpp"
using CompilerType = ov::intel_npu::CompilerType;
diff --git a/src/plugins/intel_npu/tests/functional/common/npu_test_env_cfg.cpp b/src/plugins/intel_npu/tests/functional/common/npu_test_env_cfg.cpp
index 5f2b9836199..cedd6354ca2 100644
--- a/src/plugins/intel_npu/tests/functional/common/npu_test_env_cfg.cpp
+++ b/src/plugins/intel_npu/tests/functional/common/npu_test_env_cfg.cpp
@@ -7,9 +7,8 @@
#include <cstdlib>
#include <stdexcept>
-#include "intel_npu/al/config/common.hpp"
-#include "intel_npu/al/config/config.hpp"
-
+#include "intel_npu/config/common.hpp"
+#include "intel_npu/config/config.hpp"
namespace ov::test::utils {
diff --git a/src/plugins/intel_npu/tests/functional/common/npu_test_env_cfg.hpp b/src/plugins/intel_npu/tests/functional/common/npu_test_env_cfg.hpp
index a2281f9407d..301a585b053 100644
--- a/src/plugins/intel_npu/tests/functional/common/npu_test_env_cfg.hpp
+++ b/src/plugins/intel_npu/tests/functional/common/npu_test_env_cfg.hpp
@@ -4,14 +4,15 @@
#pragma once
-#include "base/ov_behavior_test_utils.hpp"
-#include "common/utils.hpp"
-#include "npu_private_properties.hpp"
-
#include <gtest/gtest.h>
+
#include <openvino/runtime/device_id_parser.hpp>
#include <string>
+#include "base/ov_behavior_test_utils.hpp"
+#include "common/utils.hpp"
+#include "intel_npu/npu_private_properties.hpp"
+
using namespace ov::test::behavior;
namespace ov::test::utils {
@@ -77,7 +78,7 @@ namespace InferRequestParamsMapTestName {
typedef std::tuple<std::string, // Device name
std::map<std::string, std::string> // Config
>
- InferRequestParams;
+ InferRequestParams;
std::string getTestCaseName(testing::TestParamInfo<InferRequestParams> obj);
} // namespace InferRequestParamsMapTestName
diff --git a/src/plugins/intel_npu/tests/functional/common/utils.cpp b/src/plugins/intel_npu/tests/functional/common/utils.cpp
index 7ac8b3ed456..79e029cb873 100644
--- a/src/plugins/intel_npu/tests/functional/common/utils.cpp
+++ b/src/plugins/intel_npu/tests/functional/common/utils.cpp
@@ -2,10 +2,11 @@
// SPDX-License-Identifier: Apache-2.0
//
+#include "utils.hpp"
+
#include <string>
-#include "npu_private_properties.hpp"
-#include "utils.hpp"
+#include "intel_npu/npu_private_properties.hpp"
std::string getBackendName(const ov::Core& core) {
return core.get_property("NPU", ov::intel_npu::backend_name.name()).as<std::string>();
@@ -45,7 +46,8 @@ std::vector<ov::AnyMap> getRWMandatoryPropertiesValues(std::vector<ov::AnyMap> p
ov::hint::PerformanceMode::THROUGHPUT,
ov::hint::PerformanceMode::CUMULATIVE_THROUGHPUT};
for (auto& performanceMode : performanceModes) {
- if (std::find(props.begin(), props.end(),
+ if (std::find(props.begin(),
+ props.end(),
ov::AnyMap{{ov::hint::performance_mode.name(), ov::Any(performanceMode)}}) != props.end()) {
continue;
}
@@ -59,7 +61,8 @@ std::vector<ov::AnyMap> getRWMandatoryPropertiesValues(std::vector<ov::AnyMap> p
ov::hint::ExecutionMode executionModes[] = {ov::hint::ExecutionMode::PERFORMANCE,
ov::hint::ExecutionMode::ACCURACY};
for (auto& executionMode : executionModes) {
- if (std::find(props.begin(), props.end(),
+ if (std::find(props.begin(),
+ props.end(),
ov::AnyMap{{ov::hint::execution_mode.name(), ov::Any(executionMode)}}) != props.end()) {
continue;
}
@@ -68,15 +71,20 @@ std::vector<ov::AnyMap> getRWMandatoryPropertiesValues(std::vector<ov::AnyMap> p
bool enableProfilingValues[] = {true, false};
for (auto enableProfilingValue : enableProfilingValues) {
- if (std::find(props.begin(), props.end(),
+ if (std::find(props.begin(),
+ props.end(),
ov::AnyMap{{ov::enable_profiling.name(), ov::Any(enableProfilingValue)}}) != props.end()) {
continue;
}
props.push_back({{ov::enable_profiling(enableProfilingValue)}});
}
- ov::log::Level logLevels[] = {ov::log::Level::NO, ov::log::Level::ERR, ov::log::Level::WARNING,
- ov::log::Level::INFO, ov::log::Level::DEBUG, ov::log::Level::TRACE};
+ ov::log::Level logLevels[] = {ov::log::Level::NO,
+ ov::log::Level::ERR,
+ ov::log::Level::WARNING,
+ ov::log::Level::INFO,
+ ov::log::Level::DEBUG,
+ ov::log::Level::TRACE};
for (auto& logLevel : logLevels) {
if (std::find(props.begin(), props.end(), ov::AnyMap{{ov::log::level.name(), ov::Any(logLevel)}}) !=
props.end()) {
diff --git a/src/plugins/intel_npu/tests/functional/internal/overload/compile_and_infer.hpp b/src/plugins/intel_npu/tests/functional/internal/overload/compile_and_infer.hpp
index 767949b3afc..49475e7008f 100644
--- a/src/plugins/intel_npu/tests/functional/internal/overload/compile_and_infer.hpp
+++ b/src/plugins/intel_npu/tests/functional/internal/overload/compile_and_infer.hpp
@@ -9,8 +9,8 @@
#include <sstream>
#include "base/ov_behavior_test_utils.hpp"
-#include "intel_npu/al/config/common.hpp"
-#include "npu_private_properties.hpp"
+#include "intel_npu/config/common.hpp"
+#include "intel_npu/npu_private_properties.hpp"
#include "openvino/core/except.hpp"
#include "openvino/opsets/opset8.hpp"
#include "openvino/runtime/properties.hpp"
diff --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.cpp
index 8e01ec7f927..9b9bd74373c 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.cpp
@@ -2,40 +2,38 @@
// SPDX-License-Identifier: Apache-2.0
//
+#include <openvino/runtime/intel_npu/properties.hpp>
+#include <vector>
+
#include "behavior/compiled_model/properties.hpp"
-#include "common/utils.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/al/config/common.hpp"
-
-#include <openvino/runtime/intel_npu/properties.hpp>
-
-#include <vector>
+#include "intel_npu/config/common.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)},
+ {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::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 tests
-class ClassExecutableNetworkGetPropertiesTestNPU :
- public OVCompiledModelPropertiesBase,
- public ::testing::WithParamInterface<
- std::tuple<std::string, std::pair<std::string, ov::Any>>> {
+class ClassExecutableNetworkGetPropertiesTestNPU
+ : public OVCompiledModelPropertiesBase,
+ public ::testing::WithParamInterface<std::tuple<std::string, std::pair<std::string, ov::Any>>> {
protected:
std::string deviceName;
std::string configKey;
@@ -52,9 +50,7 @@ public:
model = ov::test::utils::make_conv_pool_relu();
}
static std::string getTestCaseName(
- testing::TestParamInfo<
- std::tuple<std::string, std::pair<std::string, ov::Any>>>
- obj) {
+ testing::TestParamInfo<std::tuple<std::string, std::pair<std::string, ov::Any>>> obj) {
std::string targetDevice;
std::pair<std::string, ov::Any> configuration;
std::tie(targetDevice, configuration) = obj.param;
@@ -73,8 +69,7 @@ using ClassExecutableNetworkTestSuite1NPU = ClassExecutableNetworkGetPropertiesT
TEST_P(ClassExecutableNetworkTestSuite1NPU, PropertyIsSupportedAndImmutableAndGet) {
std::vector<ov::PropertyName> properties;
- ov::CompiledModel exeNetwork =
- ie.compile_model(model, deviceName);
+ 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);
@@ -95,8 +90,7 @@ using ClassExecutableNetworkTestSuite2NPU = ClassExecutableNetworkGetPropertiesT
TEST_P(ClassExecutableNetworkTestSuite2NPU, PropertyIsSupportedAndImmutableAndCanNotSet) {
std::vector<ov::PropertyName> properties;
- ov::CompiledModel exeNetwork =
- ie.compile_model(model, deviceName);
+ 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);
@@ -106,7 +100,8 @@ TEST_P(ClassExecutableNetworkTestSuite2NPU, PropertyIsSupportedAndImmutableAndCa
ASSERT_THROW(exeNetwork.set_property({{configKey, configValue}}), ov::Exception);
}
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_ClassExecutableNetworkTestSuite2NPU, ClassExecutableNetworkTestSuite2NPU,
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_ClassExecutableNetworkTestSuite2NPU,
+ ClassExecutableNetworkTestSuite2NPU,
::testing::Combine(::testing::Values(ov::test::utils::getDeviceName()),
::testing::ValuesIn(exe_network_immutable_properties)),
ClassExecutableNetworkTestSuite2NPU::getTestCaseName);
@@ -116,46 +111,46 @@ INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_ClassExecutableNetworkTestSuite2NPU
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::DEBUG)},
- {ov::device::id.name(), ov::Any(ov::test::utils::getDeviceNameID(ov::test::utils::getDeviceName()))},
+ {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::DEBUG)},
+ {ov::device::id.name(), ov::Any(ov::test::utils::getDeviceNameID(ov::test::utils::getDeviceName()))},
};
std::vector<std::pair<std::string, ov::Any>> 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::compiler_type.name(), ov::Any(ov::intel_npu::CompilerType::MLIR)},
- {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::max_tiles.name(), ov::Any(8)},
- {ov::intel_npu::stepping.name(), ov::Any(4)},
- {ov::intel_npu::dpu_groups.name(), ov::Any(2)},
- {ov::intel_npu::use_elf_compiler_backend.name(), ov::Any(ov::intel_npu::ElfCompilerBackend::YES)},
- {ov::intel_npu::create_executor.name(), ov::Any(0)},
+ {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::compiler_type.name(), ov::Any(ov::intel_npu::CompilerType::MLIR)},
+ {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::max_tiles.name(), ov::Any(8)},
+ {ov::intel_npu::stepping.name(), ov::Any(4)},
+ {ov::intel_npu::dpu_groups.name(), ov::Any(2)},
+ {ov::intel_npu::use_elf_compiler_backend.name(), ov::Any(ov::intel_npu::ElfCompilerBackend::YES)},
+ {ov::intel_npu::create_executor.name(), ov::Any(0)},
};
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)},
+ {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 tests
-class ClassPluginPropertiesTestNPU :
- public OVCompiledModelPropertiesBase,
- public ::testing::WithParamInterface<std::tuple<std::string, std::pair<std::string, ov::Any>>> {
+class ClassPluginPropertiesTestNPU
+ : public OVCompiledModelPropertiesBase,
+ public ::testing::WithParamInterface<std::tuple<std::string, std::pair<std::string, ov::Any>>> {
protected:
std::string deviceName;
std::string configKey;
@@ -170,7 +165,7 @@ public:
std::tie(configKey, configValue) = std::get<1>(GetParam());
}
static std::string getTestCaseName(
- testing::TestParamInfo<std::tuple<std::string, std::pair<std::string, ov::Any>>> obj) {
+ testing::TestParamInfo<std::tuple<std::string, std::pair<std::string, ov::Any>>> obj) {
std::string targetDevice;
std::pair<std::string, ov::Any> configuration;
std::tie(targetDevice, configuration) = obj.param;
@@ -202,7 +197,8 @@ TEST_P(ClassPluginPropertiesTestSuite0NPU, CanSetGetPublicMutableProperty) {
ASSERT_EQ(retrieved_value.as<std::string>(), configValue.as<std::string>());
}
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests_ClassPluginPropertiesTestNPU, ClassPluginPropertiesTestSuite0NPU,
+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);
@@ -218,7 +214,8 @@ TEST_P(ClassPluginPropertiesTestSuite1NPU, CanSetGetInternalMutableProperty) {
ASSERT_EQ(retrieved_value.as<std::string>(), configValue.as<std::string>());
}
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests_ClassPluginPropertiesTestNPU, ClassPluginPropertiesTestSuite1NPU,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests_ClassPluginPropertiesTestNPU,
+ ClassPluginPropertiesTestSuite1NPU,
::testing::Combine(::testing::Values(ov::test::utils::getDeviceName()),
::testing::ValuesIn(plugin_internal_mutable_properties)),
ClassPluginPropertiesTestNPU::getTestCaseName);
@@ -245,7 +242,8 @@ TEST_P(ClassPluginPropertiesTestSuite2NPU, CanNotSetImmutableProperty) {
ASSERT_EQ(orig_value.as<std::string>(), after_value.as<std::string>());
}
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_ClassPluginPropertiesTest, ClassPluginPropertiesTestSuite2NPU,
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_ClassPluginPropertiesTest,
+ ClassPluginPropertiesTestSuite2NPU,
::testing::Combine(::testing::Values(ov::test::utils::getDeviceName()),
::testing::ValuesIn(plugin_public_immutable_properties)),
ClassPluginPropertiesTestNPU::getTestCaseName);
@@ -265,8 +263,9 @@ TEST_P(ClassPluginPropertiesTestSuite3NPU, CanGetPropertyWithOptionsNotAffecting
ov::Any retrieved_value_with_options;
OV_ASSERT_NO_THROW(retrieved_value_with_options = ie.get_property(
- deviceName, configKey,
- {{ov::hint::performance_mode.name(), ov::Any(ov::hint::PerformanceMode::THROUGHPUT)}}));
+ deviceName,
+ configKey,
+ {{ov::hint::performance_mode.name(), ov::Any(ov::hint::PerformanceMode::THROUGHPUT)}}));
ov::Any retrieved_value2;
OV_ASSERT_NO_THROW(retrieved_value2 = ie.get_property(deviceName, configKey));
@@ -274,12 +273,14 @@ TEST_P(ClassPluginPropertiesTestSuite3NPU, CanGetPropertyWithOptionsNotAffecting
ASSERT_EQ(retrieved_value.as<std::string>(), retrieved_value2.as<std::string>());
}
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_ClassPluginPropertiesOptsTest1NPU, ClassPluginPropertiesTestSuite3NPU,
+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,
+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);
@@ -297,15 +298,12 @@ TEST_P(ClassPluginPropertiesTestSuite4NPU, CanNotSetGetInexistentProperty) {
ASSERT_THROW(auto property1 = ie.get_property(deviceName, configKey), ov::Exception);
- ASSERT_THROW(
- ov::CompiledModel compiled_model1 = ie.compile_model(
- model, deviceName, {{configKey, configValue}}),
- ov::Exception);
+ ASSERT_THROW(ov::CompiledModel compiled_model1 = ie.compile_model(model, deviceName, {{configKey, configValue}}),
+ ov::Exception);
ov::CompiledModel compiled_model2;
- OV_ASSERT_NO_THROW(compiled_model2 =
- ie.compile_model(model, deviceName));
+ OV_ASSERT_NO_THROW(compiled_model2 = ie.compile_model(model, deviceName));
ASSERT_THROW(compiled_model2.set_property({{configKey, configValue}}),
ov::Exception); // Expect to throw due to unimplemented method
@@ -314,11 +312,12 @@ 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);
+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);
} // namespace
diff --git a/src/plugins/intel_npu/tests/functional/internal/overload/ov_plugin/core_integration.hpp b/src/plugins/intel_npu/tests/functional/internal/overload/ov_plugin/core_integration.hpp
index 858cf6b95cd..a6704243595 100644
--- a/src/plugins/intel_npu/tests/functional/internal/overload/ov_plugin/core_integration.hpp
+++ b/src/plugins/intel_npu/tests/functional/internal/overload/ov_plugin/core_integration.hpp
@@ -5,39 +5,41 @@
#pragma once
#include <filesystem>
+
#include "base/ov_behavior_test_utils.hpp"
#include "behavior/ov_plugin/properties_tests.hpp"
#include "common/functions.h"
-#include "common/utils.hpp"
#include "common/npu_test_env_cfg.hpp"
+#include "common/utils.hpp"
#include "common_test_utils/data_utils.hpp"
#include "common_test_utils/subgraph_builders/concat_with_params.hpp"
#include "common_test_utils/subgraph_builders/conv_pool_relu.hpp"
#include "common_test_utils/subgraph_builders/kso_func.hpp"
#include "common_test_utils/subgraph_builders/single_concat_with_constant.hpp"
#include "common_test_utils/subgraph_builders/split_conv_concat.hpp"
-#include "intel_npu/al/config/common.hpp"
+#include "intel_npu/config/common.hpp"
using CompilationParams = std::tuple<std::string, // Device name
ov::AnyMap // Config
>;
#ifdef OPENVINO_ENABLE_UNICODE_PATH_SUPPORT
-#include <iostream>
-#define GTEST_COUT std::cerr << "[ ] [ INFO ] "
-#include <codecvt>
-#include <functional_test_utils/skip_tests_config.hpp>
-#include "openvino/pass/manager.hpp"
+# include <iostream>
+# define GTEST_COUT std::cerr << "[ ] [ INFO ] "
+# include <codecvt>
+# include <functional_test_utils/skip_tests_config.hpp>
+
+# include "openvino/pass/manager.hpp"
+
#endif
namespace ov {
namespace test {
namespace behavior {
-class OVClassBaseTestPNPU :
- public OVClassNetworkTest,
- public testing::WithParamInterface<CompilationParams>,
- public OVPluginTestBase {
+class OVClassBaseTestPNPU : public OVClassNetworkTest,
+ public testing::WithParamInterface<CompilationParams>,
+ public OVPluginTestBase {
protected:
ov::AnyMap configuration;
std::string deathTestStyle;
@@ -93,7 +95,6 @@ public:
};
class OVClassBasicTestPNPU : public OVBasicPropertiesTestsP {
-
public:
void TearDown() override {
for (std::size_t testIndex = 0; testIndex < ov::test::utils::test_unicode_postfix_vector.size(); testIndex++) {
@@ -118,14 +119,16 @@ TEST_P(OVClassNetworkTestPNPU, LoadNetworkActualNoThrow) {
TEST_P(OVClassNetworkTestPNPU, LoadNetworkActualHeteroDeviceNoThrow) {
ov::Core ie = createCoreWithTemplate();
- OV_ASSERT_NO_THROW(ie.compile_model(
- actualNetwork, ov::test::utils::DEVICE_HETERO + std::string(":") + target_device, configuration));
+ OV_ASSERT_NO_THROW(ie.compile_model(actualNetwork,
+ ov::test::utils::DEVICE_HETERO + std::string(":") + target_device,
+ configuration));
}
TEST_P(OVClassNetworkTestPNPU, LoadNetworkActualHeteroDevice2NoThrow) {
ov::Core ie = createCoreWithTemplate();
- OV_ASSERT_NO_THROW(ie.compile_model(actualNetwork, ov::test::utils::DEVICE_HETERO,
+ OV_ASSERT_NO_THROW(ie.compile_model(actualNetwork,
+ ov::test::utils::DEVICE_HETERO,
ov::device::priorities(target_device),
ov::device::properties(target_device, configuration)));
}
@@ -134,7 +137,8 @@ TEST_P(OVClassNetworkTestPNPU, LoadNetworkActualHeteroDeviceUsingDevicePropertie
ov::Core ie = createCoreWithTemplate();
configuration.emplace(ov::enable_profiling(true));
- OV_ASSERT_NO_THROW(ie.compile_model(actualNetwork, ov::test::utils::DEVICE_HETERO,
+ OV_ASSERT_NO_THROW(ie.compile_model(actualNetwork,
+ ov::test::utils::DEVICE_HETERO,
ov::device::priorities(target_device),
ov::device::properties(target_device, configuration)));
}
@@ -248,7 +252,7 @@ TEST_P(OVClassGetMetricAndPrintNoThrow, VpuDeviceAllocMemSizeSameAfterDestroyCom
auto model = createModelWithLargeSize();
OV_ASSERT_NO_THROW(deviceAllocMemSizeAny =
- core.get_property(target_device, ov::intel_npu::device_alloc_mem_size.name()));
+ core.get_property(target_device, ov::intel_npu::device_alloc_mem_size.name()));
uint64_t deviceAllocMemSize = deviceAllocMemSizeAny.as<uint64_t>();
uint64_t deviceAllocMemSizeFinal;
@@ -259,7 +263,7 @@ TEST_P(OVClassGetMetricAndPrintNoThrow, VpuDeviceAllocMemSizeSameAfterDestroyCom
compiledModel = {};
OV_ASSERT_NO_THROW(deviceAllocMemSizeAny =
- core.get_property(target_device, ov::intel_npu::device_alloc_mem_size.name()));
+ core.get_property(target_device, ov::intel_npu::device_alloc_mem_size.name()));
deviceAllocMemSizeFinal = deviceAllocMemSizeAny.as<uint64_t>();
ASSERT_EQ(deviceAllocMemSize, deviceAllocMemSizeFinal) << " at iteration " << i;
}
@@ -281,7 +285,7 @@ TEST_P(OVClassGetMetricAndPrintNoThrow, VpuDeviceAllocMemSizeSameAfterDestroyInf
inferRequest = {};
OV_ASSERT_NO_THROW(deviceAllocMemSizeAny =
- core.get_property(target_device, ov::intel_npu::device_alloc_mem_size.name()));
+ core.get_property(target_device, ov::intel_npu::device_alloc_mem_size.name()));
uint64_t deviceAllocMemSize = deviceAllocMemSizeAny.as<uint64_t>();
uint64_t deviceAllocMemSizeFinal;
@@ -292,7 +296,7 @@ TEST_P(OVClassGetMetricAndPrintNoThrow, VpuDeviceAllocMemSizeSameAfterDestroyInf
inferRequest = {};
OV_ASSERT_NO_THROW(deviceAllocMemSizeAny =
- core.get_property(target_device, ov::intel_npu::device_alloc_mem_size.name()));
+ core.get_property(target_device, ov::intel_npu::device_alloc_mem_size.name()));
deviceAllocMemSizeFinal = deviceAllocMemSizeAny.as<uint64_t>();
ASSERT_EQ(deviceAllocMemSize, deviceAllocMemSizeFinal) << " at iteration " << i;
}
@@ -314,7 +318,7 @@ TEST_P(OVClassGetMetricAndPrintNoThrow, VpuDeviceAllocMemSizeSameAfterDestroyInf
inferRequest = {};
OV_ASSERT_NO_THROW(deviceAllocMemSizeAny =
- core.get_property(target_device, ov::intel_npu::device_alloc_mem_size.name()));
+ core.get_property(target_device, ov::intel_npu::device_alloc_mem_size.name()));
uint64_t deviceAllocMemSize = deviceAllocMemSizeAny.as<uint64_t>();
uint64_t deviceAllocMemSizeFinal;
@@ -328,7 +332,7 @@ TEST_P(OVClassGetMetricAndPrintNoThrow, VpuDeviceAllocMemSizeSameAfterDestroyInf
inferRequest = {};
OV_ASSERT_NO_THROW(deviceAllocMemSizeAny =
- core.get_property(target_device, ov::intel_npu::device_alloc_mem_size.name()));
+ core.get_property(target_device, ov::intel_npu::device_alloc_mem_size.name()));
deviceAllocMemSizeFinal = deviceAllocMemSizeAny.as<uint64_t>();
ASSERT_EQ(deviceAllocMemSize, deviceAllocMemSizeFinal) << " at iteration " << i;
}
@@ -343,7 +347,7 @@ TEST_P(OVClassGetMetricAndPrintNoThrow, VpuDeviceAllocMemSizeSameAfterDestroyInf
auto model = createModelWithLargeSize();
OV_ASSERT_NO_THROW(deviceAllocMemSizeAny =
- core.get_property(target_device, ov::intel_npu::device_alloc_mem_size.name()));
+ core.get_property(target_device, ov::intel_npu::device_alloc_mem_size.name()));
uint64_t deviceAllocMemSize = deviceAllocMemSizeAny.as<uint64_t>();
uint64_t deviceAllocMemSizeFinal;
@@ -358,14 +362,14 @@ TEST_P(OVClassGetMetricAndPrintNoThrow, VpuDeviceAllocMemSizeSameAfterDestroyInf
compiledModel = {};
OV_ASSERT_NO_THROW(deviceAllocMemSizeAny =
- core.get_property(target_device, ov::intel_npu::device_alloc_mem_size.name()));
+ core.get_property(target_device, ov::intel_npu::device_alloc_mem_size.name()));
deviceAllocMemSizeFinal = deviceAllocMemSizeAny.as<uint64_t>();
ASSERT_LT(deviceAllocMemSize, deviceAllocMemSizeFinal) << " at iteration " << i;
tensor = {};
OV_ASSERT_NO_THROW(deviceAllocMemSizeAny =
- core.get_property(target_device, ov::intel_npu::device_alloc_mem_size.name()));
+ core.get_property(target_device, ov::intel_npu::device_alloc_mem_size.name()));
deviceAllocMemSizeFinal = deviceAllocMemSizeAny.as<uint64_t>();
ASSERT_EQ(deviceAllocMemSize, deviceAllocMemSizeFinal) << " at iteration " << i;
}
@@ -416,21 +420,21 @@ TEST_P(OVClassBasicTestPNPU, smoke_registerPluginsLibrariesUnicodePath) {
std::string unicode_target_device = target_device + "_UNICODE_" + std::to_string(testIndex);
std::wstring postfix = ov::test::utils::test_unicode_postfix_vector[testIndex];
std::wstring unicode_path =
- ov::test::utils::stringToWString(ov::test::utils::getOpenvinoLibDirectory() + "/") + postfix;
+ ov::test::utils::stringToWString(ov::test::utils::getOpenvinoLibDirectory() + "/") + postfix;
try {
-#ifndef _WIN32
+# ifndef _WIN32
std::filesystem::create_directory(ov::util::wstring_to_string(unicode_path));
-#else
+# else
std::filesystem::create_directory(unicode_path);
-#endif
+# endif
std::string pluginNamePath =
- ov::util::make_plugin_library_name(ov::util::wstring_to_string(unicode_path), pluginName);
+ ov::util::make_plugin_library_name(ov::util::wstring_to_string(unicode_path), pluginName);
for (auto&& lib : libs) {
auto&& libPath = ov::test::utils::stringToWString(
- ov::util::make_plugin_library_name(ov::test::utils::getOpenvinoLibDirectory(), lib));
+ ov::util::make_plugin_library_name(ov::test::utils::getOpenvinoLibDirectory(), lib));
auto&& libPathNew = ov::test::utils::stringToWString(
- ov::util::make_plugin_library_name(::ov::util::wstring_to_string(unicode_path), lib));
+ ov::util::make_plugin_library_name(::ov::util::wstring_to_string(unicode_path), lib));
bool is_copy_successfully = ov::test::utils::copyFile(libPath, libPathNew);
if (!is_copy_successfully) {
FAIL() << "Unable to copy from '" << libPath << "' to '" << libPathNew << "'";
diff --git a/src/plugins/intel_npu/tests/functional/main.cpp b/src/plugins/intel_npu/tests/functional/main.cpp
index 07e33d65d4e..5e86f5a2865 100644
--- a/src/plugins/intel_npu/tests/functional/main.cpp
+++ b/src/plugins/intel_npu/tests/functional/main.cpp
@@ -4,14 +4,15 @@
#include <signal.h>
#ifdef WIN32
-#include <process.h>
+# include <process.h>
#endif
#include <functional_test_utils/summary/op_summary.hpp>
#include <iostream>
#include <sstream>
+
#include "gtest/gtest.h"
-#include "intel_npu/al/config/config.hpp"
-#include "npu_private_properties.hpp"
+#include "intel_npu/config/config.hpp"
+#include "intel_npu/npu_private_properties.hpp"
#include "npu_test_report.hpp"
#include "npu_test_tool.hpp"
@@ -41,11 +42,11 @@ int main(int argc, char** argv, char** envp) {
}
oss << std::endl;
-# ifdef WIN32
- oss << "Process id: " << _getpid() << std::endl;
-# else
- oss << "Process id: " << getpid() << std::endl;
-# endif
+#ifdef WIN32
+ oss << "Process id: " << _getpid() << std::endl;
+#else
+ oss << "Process id: " << getpid() << std::endl;
+#endif
std::cout << oss.str();
oss.str("");
@@ -84,9 +85,8 @@ int main(int argc, char** argv, char** envp) {
auto& log = intel_npu::Logger::global();
auto level = ov::test::utils::NpuTestEnvConfig::getInstance().IE_NPU_TESTS_LOG_LEVEL;
- ov::log::Level logLevel = level.empty()
- ? ov::log::Level::ERR
- : intel_npu::OptionParser<ov::log::Level>::parse(level.c_str());
+ ov::log::Level logLevel =
+ level.empty() ? ov::log::Level::ERR : intel_npu::OptionParser<ov::log::Level>::parse(level.c_str());
log.setLevel(logLevel);
return RUN_ALL_TESTS();
diff --git a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/compiled_model/compiled_model_base.cpp b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/compiled_model/compiled_model_base.cpp
index 5204e49761a..208c94112cd 100644
--- a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/compiled_model/compiled_model_base.cpp
+++ b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/compiled_model/compiled_model_base.cpp
@@ -3,9 +3,10 @@
//
#include "behavior/compiled_model/compiled_model_base.hpp"
-#include "common/utils.hpp"
+
#include "common/npu_test_env_cfg.hpp"
-#include "intel_npu/al/config/common.hpp"
+#include "common/utils.hpp"
+#include "intel_npu/config/common.hpp"
using namespace ov::test::behavior;
namespace {
@@ -26,40 +27,47 @@ auto heteroCompiledModelConfigs = []() -> std::vector<ov::AnyMap> {
return heteroPluginConfigs;
}();
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVCompiledModelBaseTest,
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests,
+ OVCompiledModelBaseTest,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(compiledModelConfigs)),
ov::test::utils::appendPlatformTypeTestName<OVCompiledModelBaseTest>);
-INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests, OVCompiledModelBaseTest,
+INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests,
+ OVCompiledModelBaseTest,
::testing::Combine(::testing::Values(std::string(ov::test::utils::DEVICE_HETERO) + ":" +
ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(heteroCompiledModelConfigs)),
ov::test::utils::appendPlatformTypeTestName<OVCompiledModelBaseTest>);
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVCompiledModelBaseTestOptional,
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests,
+ OVCompiledModelBaseTestOptional,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(compiledModelConfigs)),
ov::test::utils::appendPlatformTypeTestName<OVCompiledModelBaseTestOptional>);
-INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests, OVCompiledModelBaseTestOptional,
+INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests,
+ OVCompiledModelBaseTestOptional,
::testing::Combine(::testing::Values(std::string(ov::test::utils::DEVICE_HETERO) + ":" +
ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(heteroCompiledModelConfigs)),
ov::test::utils::appendPlatformTypeTestName<OVCompiledModelBaseTestOptional>);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests, OVAutoExecutableNetworkTest,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests,
+ OVAutoExecutableNetworkTest,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(compiledModelConfigs)),
ov::test::utils::appendPlatformTypeTestName<OVAutoExecutableNetworkTest>);
-INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests, OVAutoExecutableNetworkTest,
+INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests,
+ OVAutoExecutableNetworkTest,
::testing::Combine(::testing::Values(std::string(ov::test::utils::DEVICE_HETERO) + ":" +
ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(heteroCompiledModelConfigs)),
ov::test::utils::appendPlatformTypeTestName<OVAutoExecutableNetworkTest>);
-INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests, CompiledModelSetType,
+INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests,
+ CompiledModelSetType,
::testing::Combine(::testing::ValuesIn(modelTypes),
::testing::Values(std::string(ov::test::utils::DEVICE_HETERO) + ":" +
ov::test::utils::DEVICE_NPU),
diff --git a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/compiled_model/import_export.cpp b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/compiled_model/import_export.cpp
index 7b5acd0448b..275215715a7 100644
--- a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/compiled_model/import_export.cpp
+++ b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/compiled_model/import_export.cpp
@@ -5,15 +5,16 @@
#include "behavior/compiled_model/import_export.hpp"
#include <common_test_utils/test_constants.hpp>
-#include "common/utils.hpp"
+
#include "common/npu_test_env_cfg.hpp"
-#include "intel_npu/al/config/common.hpp"
+#include "common/utils.hpp"
+#include "intel_npu/config/common.hpp"
using namespace ov::test::behavior;
namespace {
const std::vector<ov::element::Type> modelTypes = {
- ov::element::f16,
- ov::element::f32,
+ ov::element::f16,
+ ov::element::f32,
};
const std::vector<ov::Shape> modelShapes = {{1, 2, 5, 5}};
@@ -38,50 +39,61 @@ auto heteroCompiledModelConfigs = []() -> std::vector<ov::AnyMap> {
return heteroPluginConfigs;
}();
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests, OVCompiledGraphImportExportTest,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests,
+ OVCompiledGraphImportExportTest,
::testing::Combine(::testing::ValuesIn(convertModelTypes),
::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(compiledModelConfigs)),
ov::test::utils::appendPlatformTypeTestName<OVCompiledGraphImportExportTest>);
-INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests, OVCompiledGraphImportExportTest,
+INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests,
+ OVCompiledGraphImportExportTest,
::testing::Combine(::testing::ValuesIn(convertModelTypes),
::testing::Values(std::string(ov::test::utils::DEVICE_HETERO) + ":" +
ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(heteroCompiledModelConfigs)),
ov::test::utils::appendPlatformTypeTestName<OVCompiledGraphImportExportTest>);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests, OVClassCompiledModelImportExportTestP,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests,
+ OVClassCompiledModelImportExportTestP,
::testing::Values(ov::test::utils::DEVICE_NPU),
ov::test::utils::appendPlatformTypeTestName<OVClassCompiledModelImportExportTestP>);
-INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests, OVClassCompiledModelImportExportTestP,
+INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests,
+ OVClassCompiledModelImportExportTestP,
::testing::Values(std::string(ov::test::utils::DEVICE_NPU),
"HETERO:" + std::string(ov::test::utils::DEVICE_NPU)),
ov::test::utils::appendPlatformTypeTestName<OVClassCompiledModelImportExportTestP>);
#if defined(ENABLE_INTEL_CPU) && ENABLE_INTEL_CPU
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_HETERO_CPU, OVClassCompiledModelImportExportTestP,
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_HETERO_CPU,
+ OVClassCompiledModelImportExportTestP,
::testing::Values("HETERO:" + std::string(ov::test::utils::DEVICE_NPU) + ",CPU"));
#endif
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVCompiledModelGraphUniqueNodeNamesTest,
- ::testing::Combine(::testing::ValuesIn(modelTypes), ::testing::ValuesIn(modelShapes),
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests,
+ OVCompiledModelGraphUniqueNodeNamesTest,
+ ::testing::Combine(::testing::ValuesIn(modelTypes),
+ ::testing::ValuesIn(modelShapes),
::testing::Values(ov::test::utils::DEVICE_NPU)),
ov::test::utils::appendPlatformTypeTestName<OVCompiledModelGraphUniqueNodeNamesTest>);
-INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests, OVCompiledModelGraphUniqueNodeNamesTest,
- ::testing::Combine(::testing::ValuesIn(modelTypes), ::testing::ValuesIn(modelShapes),
+INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests,
+ OVCompiledModelGraphUniqueNodeNamesTest,
+ ::testing::Combine(::testing::ValuesIn(modelTypes),
+ ::testing::ValuesIn(modelShapes),
::testing::Values(std::string(ov::test::utils::DEVICE_HETERO) + ":" +
ov::test::utils::DEVICE_NPU)),
ov::test::utils::appendPlatformTypeTestName<OVCompiledModelGraphUniqueNodeNamesTest>);
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVExecGraphSerializationTest,
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests,
+ OVExecGraphSerializationTest,
::testing::Values(ov::test::utils::DEVICE_NPU),
ov::test::utils::appendPlatformTypeTestName<OVExecGraphSerializationTest>);
-INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests, OVExecGraphSerializationTest,
+INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests,
+ OVExecGraphSerializationTest,
::testing::Values(std::string(ov::test::utils::DEVICE_HETERO) + ":" +
ov::test::utils::DEVICE_NPU),
ov::test::utils::appendPlatformTypeTestName<OVExecGraphSerializationTest>);
diff --git a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/compiled_model/properties.cpp b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/compiled_model/properties.cpp
index d5e154a26ac..89a98cce009 100644
--- a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/compiled_model/properties.cpp
+++ b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/compiled_model/properties.cpp
@@ -3,10 +3,11 @@
//
#include "behavior/compiled_model/properties.hpp"
+
#include "common/functions.h"
-#include "common/utils.hpp"
#include "common/npu_test_env_cfg.hpp"
-#include "npu_private_properties.hpp"
+#include "common/utils.hpp"
+#include "intel_npu/npu_private_properties.hpp"
using namespace ov::test::behavior;
@@ -20,11 +21,11 @@ std::vector<ov::AnyMap> operator+(std::vector<ov::AnyMap> origAnyMapVector,
for (auto&& anyMap : origAnyMapVector) {
ov::AnyMap newAnyMap = anyMap;
ov::AnyMap& newAnyMapRef = (anyMap.find(ov::device::properties.name()) != anyMap.end())
- ? newAnyMap.find(ov::device::properties.name())
- ->second.as<ov::AnyMap>()
- .begin()
- ->second.as<ov::AnyMap>()
- : newAnyMap;
+ ? newAnyMap.find(ov::device::properties.name())
+ ->second.as<ov::AnyMap>()
+ .begin()
+ ->second.as<ov::AnyMap>()
+ : newAnyMap;
if (newAnyMapRef.find(pair.first) == newAnyMapRef.end()) {
newAnyMapRef.emplace(pair);
@@ -38,44 +39,45 @@ std::vector<ov::AnyMap> operator+(std::vector<ov::AnyMap> origAnyMapVector,
}
const std::vector<std::pair<std::string, ov::Any>> compiledModelProperties = {
- {ov::enable_profiling.name(), ov::Any(true)},
- {ov::hint::performance_mode.name(), ov::Any(ov::hint::PerformanceMode::THROUGHPUT)},
- {ov::hint::num_requests.name(), ov::Any(4u)},
- {ov::hint::inference_precision.name(), ov::Any(ov::element::i8)},
- {ov::hint::enable_cpu_pinning.name(), ov::Any(true)},
- {ov::hint::model_priority.name(), ov::Any(ov::hint::Priority::HIGH)},
- {ov::intel_npu::tiles.name(), ov::Any(2)},
- {ov::intel_npu::profiling_type.name(), ov::Any(ov::intel_npu::ProfilingType::INFER)},
- {ov::intel_npu::use_elf_compiler_backend.name(), ov::Any(ov::intel_npu::ElfCompilerBackend::NO)},
- {ov::intel_npu::create_executor.name(), ov::Any(2)}};
+ {ov::enable_profiling.name(), ov::Any(true)},
+ {ov::hint::performance_mode.name(), ov::Any(ov::hint::PerformanceMode::THROUGHPUT)},
+ {ov::hint::num_requests.name(), ov::Any(4u)},
+ {ov::hint::inference_precision.name(), ov::Any(ov::element::i8)},
+ {ov::hint::enable_cpu_pinning.name(), ov::Any(true)},
+ {ov::hint::model_priority.name(), ov::Any(ov::hint::Priority::HIGH)},
+ {ov::intel_npu::tiles.name(), ov::Any(2)},
+ {ov::intel_npu::profiling_type.name(), ov::Any(ov::intel_npu::ProfilingType::INFER)},
+ {ov::intel_npu::use_elf_compiler_backend.name(), ov::Any(ov::intel_npu::ElfCompilerBackend::NO)},
+ {ov::intel_npu::create_executor.name(), ov::Any(2)}};
const std::string& expectedModelName = []() -> std::string {
return ov::test::behavior::getDefaultNGraphFunctionForTheDevice()->get_friendly_name();
}();
const std::vector<ov::AnyMap> publicCompiledModelConfigs = {
- {{ov::device::id.name(), ov::Any("")}},
- {{ov::hint::enable_cpu_pinning.name(), ov::Any(false)}},
- {{ov::hint::model_priority.name(), ov::Any(ov::hint::Priority::MEDIUM)}},
- {{ov::execution_devices.name(), ov::Any(ov::test::utils::DEVICE_NPU)}},
- {{ov::hint::execution_mode.name(), ov::Any(ov::hint::ExecutionMode::PERFORMANCE)}},
- {{ov::hint::inference_precision.name(), ov::Any(ov::element::f16)}},
- {{ov::loaded_from_cache.name(), ov::Any(false)}},
- {{ov::model_name.name(), ov::Any(expectedModelName)}},
- {{ov::optimal_number_of_infer_requests.name(), ov::Any(1u)}},
- {{ov::hint::performance_mode.name(), ov::Any(ov::hint::PerformanceMode::LATENCY)}},
- {{ov::hint::num_requests.name(), ov::Any(1u)}},
- {{ov::enable_profiling.name(), ov::Any(false)}}};
+ {{ov::device::id.name(), ov::Any("")}},
+ {{ov::hint::enable_cpu_pinning.name(), ov::Any(false)}},
+ {{ov::hint::model_priority.name(), ov::Any(ov::hint::Priority::MEDIUM)}},
+ {{ov::execution_devices.name(), ov::Any(ov::test::utils::DEVICE_NPU)}},
+ {{ov::hint::execution_mode.name(), ov::Any(ov::hint::ExecutionMode::PERFORMANCE)}},
+ {{ov::hint::inference_precision.name(), ov::Any(ov::element::f16)}},
+ {{ov::loaded_from_cache.name(), ov::Any(false)}},
+ {{ov::model_name.name(), ov::Any(expectedModelName)}},
+ {{ov::optimal_number_of_infer_requests.name(), ov::Any(1u)}},
+ {{ov::hint::performance_mode.name(), ov::Any(ov::hint::PerformanceMode::LATENCY)}},
+ {{ov::hint::num_requests.name(), ov::Any(1u)}},
+ {{ov::enable_profiling.name(), ov::Any(false)}}};
const std::vector<ov::AnyMap> compiledModelIncorrectConfigs = {
- {{"NPU_INEXISTENT_PROPERTY", "NPU_INEXISTENT_PROPERTY_VALUE"}}};
+ {{"NPU_INEXISTENT_PROPERTY", "NPU_INEXISTENT_PROPERTY_VALUE"}}};
const std::vector<std::pair<std::string, ov::Any>> allModelPriorities = {
- ov::hint::model_priority(ov::hint::Priority::LOW), ov::hint::model_priority(ov::hint::Priority::MEDIUM),
- ov::hint::model_priority(ov::hint::Priority::HIGH)};
+ ov::hint::model_priority(ov::hint::Priority::LOW),
+ ov::hint::model_priority(ov::hint::Priority::MEDIUM),
+ ov::hint::model_priority(ov::hint::Priority::HIGH)};
const std::vector<std::pair<std::string, std::string>>& compiledModelPropertiesAnyToString =
- []() -> std::vector<std::pair<std::string, std::string>> {
+ []() -> std::vector<std::pair<std::string, std::string>> {
std::vector<std::pair<std::string, std::string>> compiledModelProps(compiledModelProperties.size());
for (auto it = compiledModelProperties.cbegin(); it != compiledModelProperties.cend(); ++it) {
auto&& distance = it - compiledModelProperties.cbegin();
@@ -98,8 +100,8 @@ const auto& heteroCompiledModelConfigs = []() -> std::vector<ov::AnyMap> {
for (auto it = compiledModelConfigs.cbegin(); it != compiledModelConfigs.cend(); ++it) {
auto&& distance = it - compiledModelConfigs.cbegin();
heteroConfigs.at(distance) = {
- ov::device::priorities(ov::test::utils::DEVICE_NPU),
- {ov::device::properties.name(), ov::Any(ov::AnyMap{{ov::test::utils::DEVICE_NPU, ov::Any(*it)}})}};
+ ov::device::priorities(ov::test::utils::DEVICE_NPU),
+ {ov::device::properties.name(), ov::Any(ov::AnyMap{{ov::test::utils::DEVICE_NPU, ov::Any(*it)}})}};
}
return heteroConfigs;
}();
@@ -122,45 +124,54 @@ const auto& combineHeteroParamsExecDevices = []() -> std::vector<std::pair<ov::A
return execHeteroParams;
}();
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests, OVClassCompiledModelGetIncorrectPropertyTest,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests,
+ OVClassCompiledModelGetIncorrectPropertyTest,
::testing::Values(ov::test::utils::DEVICE_NPU),
ov::test::utils::appendPlatformTypeTestName<OVClassCompiledModelGetIncorrectPropertyTest>);
-INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests, OVClassCompiledModelGetIncorrectPropertyTest,
+INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests,
+ OVClassCompiledModelGetIncorrectPropertyTest,
::testing::Values(std::string(ov::test::utils::DEVICE_HETERO) + ":" +
ov::test::utils::DEVICE_NPU),
ov::test::utils::appendPlatformTypeTestName<OVClassCompiledModelGetIncorrectPropertyTest>);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests, OVClassCompiledModelGetPropertyTest,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests,
+ OVClassCompiledModelGetPropertyTest,
::testing::Values(ov::test::utils::DEVICE_NPU),
ov::test::utils::appendPlatformTypeTestName<OVClassCompiledModelGetPropertyTest>);
-INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests, OVClassCompiledModelGetPropertyTest,
+INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests,
+ OVClassCompiledModelGetPropertyTest,
::testing::Values(std::string(ov::test::utils::DEVICE_HETERO) + ":" +
ov::test::utils::DEVICE_NPU),
ov::test::utils::appendPlatformTypeTestName<OVClassCompiledModelGetPropertyTest>);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests, OVClassCompiledModelGetConfigTest,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests,
+ OVClassCompiledModelGetConfigTest,
::testing::Values(ov::test::utils::DEVICE_NPU),
ov::test::utils::appendPlatformTypeTestName<OVClassCompiledModelGetConfigTest>);
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVClassCompiledModelPropertiesTests,
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests,
+ OVClassCompiledModelPropertiesTests,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(compiledModelConfigs)),
ov::test::utils::appendPlatformTypeTestName<OVClassCompiledModelPropertiesTests>);
-INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests, OVClassCompiledModelPropertiesTests,
+INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests,
+ OVClassCompiledModelPropertiesTests,
::testing::Combine(::testing::Values(std::string(ov::test::utils::DEVICE_HETERO) + ":" +
ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(heteroCompiledModelConfigs)),
ov::test::utils::appendPlatformTypeTestName<OVClassCompiledModelPropertiesTests>);
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVClassCompileModelWithCorrectPropertiesTest,
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests,
+ OVClassCompileModelWithCorrectPropertiesTest,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(compiledModelConfigs)),
ov::test::utils::appendPlatformTypeTestName<OVClassCompileModelWithCorrectPropertiesTest>);
-INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests, OVClassCompileModelWithCorrectPropertiesTest,
+INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests,
+ OVClassCompileModelWithCorrectPropertiesTest,
::testing::Combine(::testing::Values(std::string(ov::test::utils::DEVICE_HETERO) + ":" +
ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(heteroCompiledModelConfigs)),
@@ -228,81 +239,96 @@ INSTANTIATE_TEST_SUITE_P(compatibility_smoke_AUTO_BehaviorTests_OVClassCompileMo
::testing::Combine(::testing::Values("AUTO"),
::testing::ValuesIn(autoConfigsWithSecondaryProperties)));
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests, OVClassCompiledModelPropertiesIncorrectTests,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests,
+ OVClassCompiledModelPropertiesIncorrectTests,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(compiledModelIncorrectConfigs)),
ov::test::utils::appendPlatformTypeTestName<OVClassCompiledModelPropertiesIncorrectTests>);
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVCompiledModelIncorrectDevice,
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests,
+ OVCompiledModelIncorrectDevice,
::testing::Values(ov::test::utils::DEVICE_NPU),
ov::test::utils::appendPlatformTypeTestName<OVCompiledModelIncorrectDevice>);
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVCompiledModelPropertiesDefaultSupportedTests,
- ::testing::Values(ov::test::utils::DEVICE_NPU),
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests,
+ OVCompiledModelPropertiesDefaultSupportedTests,
+ ::testing::Values(ov::test::utils::DEVICE_NPU),
ov::test::utils::appendPlatformTypeTestName<OVCompiledModelPropertiesDefaultSupportedTests>);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests, OVClassCompiledModelPropertiesDefaultTests,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests,
+ OVClassCompiledModelPropertiesDefaultTests,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(publicCompiledModelConfigs)),
ov::test::utils::appendPlatformTypeTestName<OVClassCompiledModelPropertiesDefaultTests>);
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVClassCompiledModelSetCorrectConfigTest,
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests,
+ OVClassCompiledModelSetCorrectConfigTest,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(compiledModelPropertiesAnyToString)),
ov::test::utils::appendPlatformTypeTestName<OVClassCompiledModelSetCorrectConfigTest>);
-INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests, OVClassCompiledModelSetCorrectConfigTest,
+INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests,
+ OVClassCompiledModelSetCorrectConfigTest,
::testing::Combine(::testing::Values(std::string(ov::test::utils::DEVICE_HETERO) + ":" +
ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(compiledModelPropertiesAnyToString)),
ov::test::utils::appendPlatformTypeTestName<OVClassCompiledModelSetCorrectConfigTest>);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests, OVClassCompiledModelSetIncorrectConfigTest,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests,
+ OVClassCompiledModelSetIncorrectConfigTest,
::testing::Values(ov::test::utils::DEVICE_NPU),
ov::test::utils::appendPlatformTypeTestName<OVClassCompiledModelSetIncorrectConfigTest>);
-INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests, OVClassCompiledModelSetIncorrectConfigTest,
+INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests,
+ OVClassCompiledModelSetIncorrectConfigTest,
::testing::Values(std::string(ov::test::utils::DEVICE_HETERO) + ":" +
ov::test::utils::DEVICE_NPU),
ov::test::utils::appendPlatformTypeTestName<OVClassCompiledModelSetIncorrectConfigTest>);
INSTANTIATE_TEST_SUITE_P(
- smoke_BehaviorTests, OVClassCompiledModelGetPropertyTest_MODEL_PRIORITY,
- ::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
- ::testing::ValuesIn(compiledModelConfigs + allModelPriorities)),
- ov::test::utils::appendPlatformTypeTestName<OVClassCompiledModelGetPropertyTest_MODEL_PRIORITY>);
+ smoke_BehaviorTests,
+ OVClassCompiledModelGetPropertyTest_MODEL_PRIORITY,
+ ::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
+ ::testing::ValuesIn(compiledModelConfigs + allModelPriorities)),
+ ov::test::utils::appendPlatformTypeTestName<OVClassCompiledModelGetPropertyTest_MODEL_PRIORITY>);
INSTANTIATE_TEST_SUITE_P(
- smoke_Hetero_BehaviorTests, OVClassCompiledModelGetPropertyTest_MODEL_PRIORITY,
- ::testing::Combine(::testing::Values(std::string(ov::test::utils::DEVICE_HETERO) + ":" +
- ov::test::utils::DEVICE_NPU),
- ::testing::ValuesIn(heteroCompiledModelConfigs + allModelPriorities)),
- ov::test::utils::appendPlatformTypeTestName<OVClassCompiledModelGetPropertyTest_MODEL_PRIORITY>);
+ smoke_Hetero_BehaviorTests,
+ OVClassCompiledModelGetPropertyTest_MODEL_PRIORITY,
+ ::testing::Combine(::testing::Values(std::string(ov::test::utils::DEVICE_HETERO) + ":" +
+ ov::test::utils::DEVICE_NPU),
+ ::testing::ValuesIn(heteroCompiledModelConfigs + allModelPriorities)),
+ ov::test::utils::appendPlatformTypeTestName<OVClassCompiledModelGetPropertyTest_MODEL_PRIORITY>);
INSTANTIATE_TEST_SUITE_P(
- smoke_Hetero_BehaviorTests, OVClassCompiledModelGetPropertyTest_DEVICE_PRIORITY,
- ::testing::Combine(::testing::Values(std::string(ov::test::utils::DEVICE_HETERO) + ":" +
- ov::test::utils::DEVICE_NPU),
- ::testing::ValuesIn(heteroCompiledModelConfigs)),
- ov::test::utils::appendPlatformTypeTestName<OVClassCompiledModelGetPropertyTest_DEVICE_PRIORITY>);
-
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVClassCompiledModelGetPropertyTest_EXEC_DEVICES,
+ smoke_Hetero_BehaviorTests,
+ OVClassCompiledModelGetPropertyTest_DEVICE_PRIORITY,
+ ::testing::Combine(::testing::Values(std::string(ov::test::utils::DEVICE_HETERO) + ":" +
+ ov::test::utils::DEVICE_NPU),
+ ::testing::ValuesIn(heteroCompiledModelConfigs)),
+ ov::test::utils::appendPlatformTypeTestName<OVClassCompiledModelGetPropertyTest_DEVICE_PRIORITY>);
+
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests,
+ OVClassCompiledModelGetPropertyTest_EXEC_DEVICES,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(combineParamsExecDevices)),
ov::test::utils::appendPlatformTypeTestName<OVClassCompiledModelGetPropertyTest_EXEC_DEVICES>);
-INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests, OVClassCompiledModelGetPropertyTest_EXEC_DEVICES,
+INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests,
+ OVClassCompiledModelGetPropertyTest_EXEC_DEVICES,
::testing::Combine(::testing::Values(std::string(ov::test::utils::DEVICE_HETERO) + ":" +
ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(combineHeteroParamsExecDevices)),
ov::test::utils::appendPlatformTypeTestName<OVClassCompiledModelGetPropertyTest_EXEC_DEVICES>);
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVCompileModelGetExecutionDeviceTests,
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests,
+ OVCompileModelGetExecutionDeviceTests,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(combineParamsExecDevices)),
ov::test::utils::appendPlatformTypeTestName<OVCompileModelGetExecutionDeviceTests>);
-INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests, OVCompileModelGetExecutionDeviceTests,
+INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests,
+ OVCompileModelGetExecutionDeviceTests,
::testing::Combine(::testing::Values(std::string(ov::test::utils::DEVICE_HETERO) + ":" +
ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(combineHeteroParamsExecDevices)),
diff --git a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/callback.cpp b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/callback.cpp
index 349f194b006..d96172d9b6e 100644
--- a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/callback.cpp
+++ b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/callback.cpp
@@ -2,12 +2,13 @@
// SPDX-License-Identifier: Apache-2.0
//
+#include "behavior/ov_infer_request/callback.hpp"
+
#include <vector>
-#include "behavior/ov_infer_request/callback.hpp"
-#include "common/utils.hpp"
#include "common/npu_test_env_cfg.hpp"
-#include "intel_npu/al/config/common.hpp"
+#include "common/utils.hpp"
+#include "intel_npu/config/common.hpp"
#include "overload/ov_infer_request/callback.hpp"
using namespace ov::test::behavior;
@@ -15,40 +16,44 @@ using namespace ov::test::behavior;
namespace {
const std::vector<ov::AnyMap> configs = {{}};
-const std::vector<ov::AnyMap> multiConfigs = {
- {ov::device::priorities(ov::test::utils::DEVICE_NPU),
- ov::device::properties(ov::test::utils::DEVICE_NPU, ov::AnyMap{})}};
+const std::vector<ov::AnyMap> multiConfigs = {{ov::device::priorities(ov::test::utils::DEVICE_NPU),
+ ov::device::properties(ov::test::utils::DEVICE_NPU, ov::AnyMap{})}};
-const std::vector<ov::AnyMap> autoConfigs = {
- {ov::device::priorities(ov::test::utils::DEVICE_NPU),
- ov::device::properties(ov::test::utils::DEVICE_NPU, ov::AnyMap{})}};
+const std::vector<ov::AnyMap> autoConfigs = {{ov::device::priorities(ov::test::utils::DEVICE_NPU),
+ ov::device::properties(ov::test::utils::DEVICE_NPU, ov::AnyMap{})}};
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests, OVInferRequestCallbackTests,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests,
+ OVInferRequestCallbackTests,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(configs)),
InferRequestParamsAnyMapTestName::getTestCaseName);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Multi_BehaviorTests, OVInferRequestCallbackTests,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Multi_BehaviorTests,
+ OVInferRequestCallbackTests,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_MULTI),
::testing::ValuesIn(multiConfigs)),
InferRequestParamsAnyMapTestName::getTestCaseName);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Auto_BehaviorTests, OVInferRequestCallbackTests,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Auto_BehaviorTests,
+ OVInferRequestCallbackTests,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_AUTO),
::testing::ValuesIn(autoConfigs)),
InferRequestParamsAnyMapTestName::getTestCaseName);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests, OVInferRequestCallbackTestsNPU,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests,
+ OVInferRequestCallbackTestsNPU,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(configs)),
InferRequestParamsAnyMapTestName::getTestCaseName);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Multi_BehaviorTests, OVInferRequestCallbackTestsNPU,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Multi_BehaviorTests,
+ OVInferRequestCallbackTestsNPU,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_MULTI),
::testing::ValuesIn(multiConfigs)),
InferRequestParamsAnyMapTestName::getTestCaseName);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Auto_BehaviorTests, OVInferRequestCallbackTestsNPU,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Auto_BehaviorTests,
+ OVInferRequestCallbackTestsNPU,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_AUTO),
::testing::ValuesIn(autoConfigs)),
InferRequestParamsAnyMapTestName::getTestCaseName);
diff --git a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/cancellation.cpp b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/cancellation.cpp
index 565c8f2cd0b..126e202a353 100644
--- a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/cancellation.cpp
+++ b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/cancellation.cpp
@@ -3,9 +3,10 @@
//
#include "behavior/ov_infer_request/cancellation.hpp"
-#include "common/utils.hpp"
+
#include "common/npu_test_env_cfg.hpp"
-#include "intel_npu/al/config/common.hpp"
+#include "common/utils.hpp"
+#include "intel_npu/config/common.hpp"
#include "overload/ov_infer_request/cancellation.hpp"
using namespace ov::test::behavior;
@@ -13,12 +14,14 @@ using namespace ov::test::behavior;
namespace {
const std::vector<ov::AnyMap> configs = {{}};
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests, OVInferRequestCancellationTests,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests,
+ OVInferRequestCancellationTests,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(configs)),
InferRequestParamsAnyMapTestName::getTestCaseName);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests, OVInferRequestCancellationTestsNPU,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests,
+ OVInferRequestCancellationTestsNPU,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(configs)),
InferRequestParamsAnyMapTestName::getTestCaseName);
diff --git a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/infer_consistency.cpp b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/infer_consistency.cpp
index 57f56bef2a2..551629f9433 100644
--- a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/infer_consistency.cpp
+++ b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/infer_consistency.cpp
@@ -2,13 +2,14 @@
// SPDX-License-Identifier: Apache-2.0
//
+#include "behavior/ov_infer_request/infer_consistency.hpp"
+
#include <string>
#include <vector>
-#include "behavior/ov_infer_request/infer_consistency.hpp"
-#include "common/utils.hpp"
#include "common/npu_test_env_cfg.hpp"
-#include "npu_private_properties.hpp"
+#include "common/utils.hpp"
+#include "intel_npu/npu_private_properties.hpp"
using namespace ov::test::behavior;
@@ -20,9 +21,7 @@ namespace {
using Configs = std::vector<std::pair<std::string, ov::AnyMap>>;
auto configs = []() {
- return std::vector<Configs>{{{ov::test::utils::DEVICE_NPU,
- {}
- }}};
+ return std::vector<Configs>{{{ov::test::utils::DEVICE_NPU, {}}}};
}();
auto autoConfigs = []() {
@@ -36,22 +35,22 @@ auto autoConfigs = []() {
{ov::hint::performance_mode(ov::hint::PerformanceMode::CUMULATIVE_THROUGHPUT)}},
{ov::test::utils::DEVICE_NPU, {}}},
{{ov::test::utils::DEVICE_AUTO + std::string(":") + ov::test::utils::DEVICE_NPU + "," +
- ov::test::utils::DEVICE_CPU,
+ ov::test::utils::DEVICE_CPU,
{ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY)}},
{ov::test::utils::DEVICE_NPU, {}},
{ov::test::utils::DEVICE_CPU, {}}},
{{ov::test::utils::DEVICE_AUTO + std::string(":") + ov::test::utils::DEVICE_NPU + "," +
- ov::test::utils::DEVICE_CPU,
+ ov::test::utils::DEVICE_CPU,
{ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT)}},
{ov::test::utils::DEVICE_NPU, {}},
{ov::test::utils::DEVICE_CPU, {}}},
{{ov::test::utils::DEVICE_AUTO + std::string(":") + ov::test::utils::DEVICE_NPU + "," +
- ov::test::utils::DEVICE_CPU,
+ ov::test::utils::DEVICE_CPU,
{ov::hint::performance_mode(ov::hint::PerformanceMode::CUMULATIVE_THROUGHPUT)}},
{ov::test::utils::DEVICE_NPU, {}},
{ov::test::utils::DEVICE_CPU, {}}},
{{ov::test::utils::DEVICE_AUTO + std::string(":") + ov::test::utils::DEVICE_CPU + "," +
- ov::test::utils::DEVICE_NPU,
+ ov::test::utils::DEVICE_NPU,
{ov::hint::performance_mode(ov::hint::PerformanceMode::CUMULATIVE_THROUGHPUT)}},
{ov::test::utils::DEVICE_CPU, {}},
{ov::test::utils::DEVICE_NPU, {}}}};
@@ -65,31 +64,34 @@ auto multiConfigs = []() {
{ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT)}},
{ov::test::utils::DEVICE_NPU, {}}},
{{ov::test::utils::DEVICE_MULTI + std::string(":") + ov::test::utils::DEVICE_NPU + "," +
- ov::test::utils::DEVICE_CPU,
+ ov::test::utils::DEVICE_CPU,
{ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY)}},
{ov::test::utils::DEVICE_NPU, {}},
{ov::test::utils::DEVICE_CPU, {}}},
{{ov::test::utils::DEVICE_MULTI + std::string(":") + ov::test::utils::DEVICE_NPU + "," +
- ov::test::utils::DEVICE_CPU,
+ ov::test::utils::DEVICE_CPU,
{ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT)}},
{ov::test::utils::DEVICE_NPU, {}},
{ov::test::utils::DEVICE_CPU, {}}}};
}();
// 3x5 configuration takes ~65 seconds to run, which is already pretty long time
-INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_BehaviorTests, OVInferConsistencyTest,
+INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_BehaviorTests,
+ OVInferConsistencyTest,
::testing::Combine(::testing::Values(3), // inferRequest num
::testing::Values(5), // infer counts
::testing::ValuesIn(configs)),
ov::test::utils::appendPlatformTypeTestName<OVInferConsistencyTest>);
-INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_Auto_BehaviorTests, OVInferConsistencyTest,
+INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_Auto_BehaviorTests,
+ OVInferConsistencyTest,
::testing::Combine(::testing::Values(3), // inferRequest num
::testing::Values(5), // infer counts
::testing::ValuesIn(autoConfigs)),
ov::test::utils::appendPlatformTypeTestName<OVInferConsistencyTest>);
-INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_Multi_BehaviorTests, OVInferConsistencyTest,
+INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_Multi_BehaviorTests,
+ OVInferConsistencyTest,
::testing::Combine(::testing::Values(3), // inferRequest num
::testing::Values(5), // infer counts
::testing::ValuesIn(multiConfigs)),
diff --git a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/inference_chaining.cpp b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/inference_chaining.cpp
index 27cdb01e147..4ba8e834206 100644
--- a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/inference_chaining.cpp
+++ b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/inference_chaining.cpp
@@ -3,22 +3,25 @@
//
#include "behavior/ov_infer_request/inference_chaining.hpp"
-#include "common/utils.hpp"
+
#include "common/npu_test_env_cfg.hpp"
+#include "common/utils.hpp"
#include "common_test_utils/test_constants.hpp"
-#include "intel_npu/al/config/common.hpp"
+#include "intel_npu/config/common.hpp"
using namespace ov::test::behavior;
namespace {
const std::vector<ov::AnyMap> configs = {{}};
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVInferenceChaining,
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests,
+ OVInferenceChaining,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(configs)),
ov::test::utils::appendPlatformTypeTestName<OVInferenceChaining>);
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVInferenceChainingStatic,
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests,
+ OVInferenceChainingStatic,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(configs)),
ov::test::utils::appendPlatformTypeTestName<OVInferenceChainingStatic>);
diff --git a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/io_tensor.cpp b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/io_tensor.cpp
index b1f61e41f5e..9275e8b1dd2 100644
--- a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/io_tensor.cpp
+++ b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/io_tensor.cpp
@@ -2,12 +2,13 @@
// SPDX-License-Identifier: Apache-2.0
//
+#include "behavior/ov_infer_request/io_tensor.hpp"
+
#include <vector>
-#include "behavior/ov_infer_request/io_tensor.hpp"
-#include "common/utils.hpp"
#include "common/npu_test_env_cfg.hpp"
-#include "intel_npu/al/config/common.hpp"
+#include "common/utils.hpp"
+#include "intel_npu/config/common.hpp"
#include "overload/ov_infer_request/io_tensor.hpp"
using namespace ov::test::behavior;
@@ -16,86 +17,120 @@ namespace {
const std::vector<ov::AnyMap> configs = {{}};
const std::vector<ov::AnyMap> multiConfigs = {
- {ov::device::priorities(ov::test::utils::DEVICE_NPU),
- ov::device::properties(ov::test::utils::DEVICE_NPU, {})}};
+ {ov::device::priorities(ov::test::utils::DEVICE_NPU), ov::device::properties(ov::test::utils::DEVICE_NPU, {})}};
const std::vector<ov::AnyMap> autoConfigs = {
- {ov::device::priorities(ov::test::utils::DEVICE_NPU),
- ov::device::properties(ov::test::utils::DEVICE_NPU, {})}};
+ {ov::device::priorities(ov::test::utils::DEVICE_NPU), ov::device::properties(ov::test::utils::DEVICE_NPU, {})}};
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests, OVInferRequestIOTensorTest,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests,
+ OVInferRequestIOTensorTest,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(configs)),
InferRequestParamsAnyMapTestName::getTestCaseName);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Multi_BehaviorTests, OVInferRequestIOTensorTest,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Multi_BehaviorTests,
+ OVInferRequestIOTensorTest,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_MULTI),
::testing::ValuesIn(multiConfigs)),
InferRequestParamsAnyMapTestName::getTestCaseName);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests, OVInferRequestIOTensorTestNPU,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests,
+ OVInferRequestIOTensorTestNPU,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(configs)),
InferRequestParamsAnyMapTestName::getTestCaseName);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Multi_BehaviorTests, OVInferRequestIOTensorTestNPU,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Multi_BehaviorTests,
+ OVInferRequestIOTensorTestNPU,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_MULTI),
::testing::ValuesIn(multiConfigs)),
InferRequestParamsAnyMapTestName::getTestCaseName);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Auto_BehaviorTests, OVInferRequestIOTensorTest,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Auto_BehaviorTests,
+ OVInferRequestIOTensorTest,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_AUTO),
::testing::ValuesIn(autoConfigs)),
InferRequestParamsAnyMapTestName::getTestCaseName);
const std::vector<ov::element::Type> prcs = {
- ov::element::boolean, ov::element::bf16, ov::element::f16, ov::element::f32, ov::element::f64, ov::element::i4,
- ov::element::i8, ov::element::i16, ov::element::i32, ov::element::i64, ov::element::u1, ov::element::u4,
- ov::element::u8, ov::element::u16, ov::element::u32, ov::element::u64,
+ ov::element::boolean,
+ ov::element::bf16,
+ ov::element::f16,
+ ov::element::f32,
+ ov::element::f64,
+ ov::element::i4,
+ ov::element::i8,
+ ov::element::i16,
+ ov::element::i32,
+ ov::element::i64,
+ ov::element::u1,
+ ov::element::u4,
+ ov::element::u8,
+ ov::element::u16,
+ ov::element::u32,
+ ov::element::u64,
};
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests, OVInferRequestIOTensorSetPrecisionTest,
- ::testing::Combine(::testing::ValuesIn(prcs), ::testing::Values(ov::test::utils::DEVICE_NPU),
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests,
+ OVInferRequestIOTensorSetPrecisionTest,
+ ::testing::Combine(::testing::ValuesIn(prcs),
+ ::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(configs)),
ov::test::utils::appendPlatformTypeTestName<OVInferRequestIOTensorSetPrecisionTest>);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Multi_BehaviorTests, OVInferRequestIOTensorSetPrecisionTest,
- ::testing::Combine(::testing::ValuesIn(prcs), ::testing::Values(ov::test::utils::DEVICE_MULTI),
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Multi_BehaviorTests,
+ OVInferRequestIOTensorSetPrecisionTest,
+ ::testing::Combine(::testing::ValuesIn(prcs),
+ ::testing::Values(ov::test::utils::DEVICE_MULTI),
::testing::ValuesIn(multiConfigs)),
ov::test::utils::appendPlatformTypeTestName<OVInferRequestIOTensorSetPrecisionTest>);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Auto_BehaviorTests, OVInferRequestIOTensorSetPrecisionTest,
- ::testing::Combine(::testing::ValuesIn(prcs), ::testing::Values(ov::test::utils::DEVICE_AUTO),
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Auto_BehaviorTests,
+ OVInferRequestIOTensorSetPrecisionTest,
+ ::testing::Combine(::testing::ValuesIn(prcs),
+ ::testing::Values(ov::test::utils::DEVICE_AUTO),
::testing::ValuesIn(autoConfigs)),
ov::test::utils::appendPlatformTypeTestName<OVInferRequestIOTensorSetPrecisionTest>);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests, OVInferRequestIOTensorSetPrecisionTestNPU,
- ::testing::Combine(::testing::ValuesIn(prcs), ::testing::Values(ov::test::utils::DEVICE_NPU),
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests,
+ OVInferRequestIOTensorSetPrecisionTestNPU,
+ ::testing::Combine(::testing::ValuesIn(prcs),
+ ::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(configs)),
ov::test::utils::appendPlatformTypeTestName<OVInferRequestIOTensorSetPrecisionTestNPU>);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Mutli_BehaviorTests, OVInferRequestIOTensorSetPrecisionTestNPU,
- ::testing::Combine(::testing::ValuesIn(prcs), ::testing::Values(ov::test::utils::DEVICE_MULTI),
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Mutli_BehaviorTests,
+ OVInferRequestIOTensorSetPrecisionTestNPU,
+ ::testing::Combine(::testing::ValuesIn(prcs),
+ ::testing::Values(ov::test::utils::DEVICE_MULTI),
::testing::ValuesIn(multiConfigs)),
ov::test::utils::appendPlatformTypeTestName<OVInferRequestIOTensorSetPrecisionTestNPU>);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Auto_BehaviorTests, OVInferRequestIOTensorSetPrecisionTestNPU,
- ::testing::Combine(::testing::ValuesIn(prcs), ::testing::Values(ov::test::utils::DEVICE_AUTO),
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Auto_BehaviorTests,
+ OVInferRequestIOTensorSetPrecisionTestNPU,
+ ::testing::Combine(::testing::ValuesIn(prcs),
+ ::testing::Values(ov::test::utils::DEVICE_AUTO),
::testing::ValuesIn(autoConfigs)),
ov::test::utils::appendPlatformTypeTestName<OVInferRequestIOTensorSetPrecisionTestNPU>);
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVInferRequestCheckTensorPrecision,
- ::testing::Combine(::testing::ValuesIn(prcs), ::testing::Values(ov::test::utils::DEVICE_NPU),
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests,
+ OVInferRequestCheckTensorPrecision,
+ ::testing::Combine(::testing::ValuesIn(prcs),
+ ::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(configs)),
ov::test::utils::appendPlatformTypeTestName<OVInferRequestCheckTensorPrecision>);
-INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, OVInferRequestCheckTensorPrecision,
- ::testing::Combine(::testing::ValuesIn(prcs), ::testing::Values(ov::test::utils::DEVICE_MULTI),
+INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests,
+ OVInferRequestCheckTensorPrecision,
+ ::testing::Combine(::testing::ValuesIn(prcs),
+ ::testing::Values(ov::test::utils::DEVICE_MULTI),
::testing::ValuesIn(multiConfigs)),
ov::test::utils::appendPlatformTypeTestName<OVInferRequestCheckTensorPrecision>);
-INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, OVInferRequestCheckTensorPrecision,
- ::testing::Combine(::testing::ValuesIn(prcs), ::testing::Values(ov::test::utils::DEVICE_AUTO),
+INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests,
+ OVInferRequestCheckTensorPrecision,
+ ::testing::Combine(::testing::ValuesIn(prcs),
+ ::testing::Values(ov::test::utils::DEVICE_AUTO),
::testing::ValuesIn(autoConfigs)),
ov::test::utils::appendPlatformTypeTestName<OVInferRequestCheckTensorPrecision>);
diff --git a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/iteration_chaining.cpp b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/iteration_chaining.cpp
index 3e6ef6cf66a..0e81f76b218 100644
--- a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/iteration_chaining.cpp
+++ b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/iteration_chaining.cpp
@@ -3,29 +3,29 @@
//
#include "behavior/ov_infer_request/iteration_chaining.hpp"
-#include "common/utils.hpp"
+
#include "common/npu_test_env_cfg.hpp"
-#include "npu_private_properties.hpp"
+#include "common/utils.hpp"
+#include "intel_npu/npu_private_properties.hpp"
using namespace ov::test::behavior;
namespace {
-const std::vector<ov::AnyMap> configs = {
- {{ov::hint::inference_precision.name(), ov::element::f32}}};
+const std::vector<ov::AnyMap> configs = {{{ov::hint::inference_precision.name(), ov::element::f32}}};
-const std::vector<ov::AnyMap> heteroConfigs = {
- {{ov::hint::inference_precision.name(), ov::element::f32},
- {ov::device::priorities(ov::test::utils::DEVICE_NPU)},
- {ov::device::properties(ov::test::utils::DEVICE_NPU,
- {})}}};
+const std::vector<ov::AnyMap> heteroConfigs = {{{ov::hint::inference_precision.name(), ov::element::f32},
+ {ov::device::priorities(ov::test::utils::DEVICE_NPU)},
+ {ov::device::properties(ov::test::utils::DEVICE_NPU, {})}}};
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVIterationChaining,
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests,
+ OVIterationChaining,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(configs)),
ov::test::utils::appendPlatformTypeTestName<OVIterationChaining>);
-INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests, OVIterationChaining,
+INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests,
+ OVIterationChaining,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_HETERO),
::testing::ValuesIn(heteroConfigs)),
ov::test::utils::appendPlatformTypeTestName<OVIterationChaining>);
diff --git a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/memory_states.cpp b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/memory_states.cpp
index fa3a67ffa4c..99c8d2d3776 100644
--- a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/memory_states.cpp
+++ b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/memory_states.cpp
@@ -3,29 +3,34 @@
//
#include "behavior/ov_infer_request/memory_states.hpp"
-#include "common/utils.hpp"
+
#include "common/npu_test_env_cfg.hpp"
-#include "npu_private_properties.hpp"
+#include "common/utils.hpp"
+#include "intel_npu/npu_private_properties.hpp"
using namespace ov::test::behavior;
using namespace ov;
namespace {
-const std::vector<memoryStateParams> memoryStateTestCases = {memoryStateParams(
- OVInferRequestVariableStateTest::get_network(), {"c_1-3", "r_1-3"}, ov::test::utils::DEVICE_NPU,
- {})};
+const std::vector<memoryStateParams> memoryStateTestCases = {
+ memoryStateParams(OVInferRequestVariableStateTest::get_network(),
+ {"c_1-3", "r_1-3"},
+ ov::test::utils::DEVICE_NPU,
+ {})};
const std::vector<memoryStateParams> memoryStateHeteroTestCases = {memoryStateParams(
- OVInferRequestVariableStateTest::get_network(), {"c_1-3", "r_1-3"}, ov::test::utils::DEVICE_HETERO,
- {ov::device::priorities(ov::test::utils::DEVICE_NPU),
- ov::device::properties(ov::test::utils::DEVICE_NPU,
- {})})};
+ OVInferRequestVariableStateTest::get_network(),
+ {"c_1-3", "r_1-3"},
+ ov::test::utils::DEVICE_HETERO,
+ {ov::device::priorities(ov::test::utils::DEVICE_NPU), ov::device::properties(ov::test::utils::DEVICE_NPU, {})})};
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_VariableState, OVInferRequestVariableStateTest,
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_VariableState,
+ OVInferRequestVariableStateTest,
::testing::ValuesIn(memoryStateTestCases),
ov::test::utils::appendPlatformTypeTestName<OVInferRequestVariableStateTest>);
-INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests_VariableState, OVInferRequestVariableStateTest,
+INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests_VariableState,
+ OVInferRequestVariableStateTest,
::testing::ValuesIn(memoryStateHeteroTestCases),
ov::test::utils::appendPlatformTypeTestName<OVInferRequestVariableStateTest>);
diff --git a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/multithreading.cpp b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/multithreading.cpp
index 745ebcbaea7..5eefb3766f2 100644
--- a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/multithreading.cpp
+++ b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/multithreading.cpp
@@ -2,12 +2,13 @@
// SPDX-License-Identifier: Apache-2.0
//
+#include "behavior/ov_infer_request/multithreading.hpp"
+
#include <vector>
-#include "behavior/ov_infer_request/multithreading.hpp"
-#include "common/utils.hpp"
#include "common/npu_test_env_cfg.hpp"
-#include "intel_npu/al/config/common.hpp"
+#include "common/utils.hpp"
+#include "intel_npu/config/common.hpp"
#include "overload/ov_infer_request/multithreading.hpp"
using namespace ov::test::behavior;
@@ -16,39 +17,43 @@ namespace {
const std::vector<ov::AnyMap> configs = {{}};
const std::vector<ov::AnyMap> multiConfigs = {
- {ov::device::priorities(ov::test::utils::DEVICE_NPU),
- ov::device::properties(ov::test::utils::DEVICE_NPU, {})}};
+ {ov::device::priorities(ov::test::utils::DEVICE_NPU), ov::device::properties(ov::test::utils::DEVICE_NPU, {})}};
const std::vector<ov::AnyMap> autoConfigs = {
- {ov::device::priorities(ov::test::utils::DEVICE_NPU),
- ov::device::properties(ov::test::utils::DEVICE_NPU, {})}};
+ {ov::device::priorities(ov::test::utils::DEVICE_NPU), ov::device::properties(ov::test::utils::DEVICE_NPU, {})}};
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests, OVInferRequestMultithreadingTests,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests,
+ OVInferRequestMultithreadingTests,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(configs)),
InferRequestParamsAnyMapTestName::getTestCaseName);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Multi_BehaviorTests, OVInferRequestMultithreadingTests,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Multi_BehaviorTests,
+ OVInferRequestMultithreadingTests,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_MULTI),
::testing::ValuesIn(multiConfigs)),
InferRequestParamsAnyMapTestName::getTestCaseName);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Auto_BehaviorTests, OVInferRequestMultithreadingTests,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Auto_BehaviorTests,
+ OVInferRequestMultithreadingTests,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_AUTO),
::testing::ValuesIn(autoConfigs)),
InferRequestParamsAnyMapTestName::getTestCaseName);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests, OVInferRequestMultithreadingTestsNPU,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests,
+ OVInferRequestMultithreadingTestsNPU,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(configs)),
InferRequestParamsAnyMapTestName::getTestCaseName);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Multi_BehaviorTests, OVInferRequestMultithreadingTestsNPU,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Multi_BehaviorTests,
+ OVInferRequestMultithreadingTestsNPU,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_MULTI),
::testing::ValuesIn(multiConfigs)),
InferRequestParamsAnyMapTestName::getTestCaseName);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Auto_BehaviorTests, OVInferRequestMultithreadingTestsNPU,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Auto_BehaviorTests,
+ OVInferRequestMultithreadingTestsNPU,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_AUTO),
::testing::ValuesIn(autoConfigs)),
InferRequestParamsAnyMapTestName::getTestCaseName);
diff --git a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/perf_counters.cpp b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/perf_counters.cpp
index 273f44c5fbe..c99bdb61e2b 100644
--- a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/perf_counters.cpp
+++ b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/perf_counters.cpp
@@ -3,53 +3,58 @@
//
#include "behavior/ov_infer_request/perf_counters.hpp"
-#include "common/utils.hpp"
+
#include "common/npu_test_env_cfg.hpp"
-#include "intel_npu/al/config/common.hpp"
+#include "common/utils.hpp"
+#include "intel_npu/config/common.hpp"
using namespace ov::test::behavior;
namespace {
const std::vector<ov::AnyMap> configs = {{}};
-const std::vector<ov::AnyMap> multiConfigs = {
- {ov::device::priorities(ov::test::utils::DEVICE_NPU),
- ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT)},
- {ov::device::priorities(ov::test::utils::DEVICE_NPU),
- ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY)}};
+const std::vector<ov::AnyMap> multiConfigs = {{ov::device::priorities(ov::test::utils::DEVICE_NPU),
+ ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT)},
+ {ov::device::priorities(ov::test::utils::DEVICE_NPU),
+ ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY)}};
-const std::vector<ov::AnyMap> autoConfigs = {
- {ov::device::priorities(ov::test::utils::DEVICE_NPU),
- ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT)},
- {ov::device::priorities(ov::test::utils::DEVICE_NPU),
- ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY)}};
+const std::vector<ov::AnyMap> autoConfigs = {{ov::device::priorities(ov::test::utils::DEVICE_NPU),
+ ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT)},
+ {ov::device::priorities(ov::test::utils::DEVICE_NPU),
+ ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY)}};
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Multi_BehaviorTests, OVInferRequestPerfCountersTest,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Multi_BehaviorTests,
+ OVInferRequestPerfCountersTest,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_MULTI),
::testing::ValuesIn(multiConfigs)),
ov::test::utils::appendPlatformTypeTestName<OVInferRequestPerfCountersTest>);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Auto_BehaviorTests, OVInferRequestPerfCountersTest,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Auto_BehaviorTests,
+ OVInferRequestPerfCountersTest,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_AUTO),
::testing::ValuesIn(autoConfigs)),
ov::test::utils::appendPlatformTypeTestName<OVInferRequestPerfCountersTest>);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests, OVInferRequestPerfCountersTest,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests,
+ OVInferRequestPerfCountersTest,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(configs)),
ov::test::utils::appendPlatformTypeTestName<OVInferRequestPerfCountersTest>);
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVInferRequestPerfCountersExceptionTest,
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests,
+ OVInferRequestPerfCountersExceptionTest,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(configs)),
ov::test::utils::appendPlatformTypeTestName<OVInferRequestPerfCountersExceptionTest>);
-INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, OVInferRequestPerfCountersExceptionTest,
+INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests,
+ OVInferRequestPerfCountersExceptionTest,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_AUTO),
::testing::ValuesIn(autoConfigs)),
ov::test::utils::appendPlatformTypeTestName<OVInferRequestPerfCountersExceptionTest>);
-INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, OVInferRequestPerfCountersExceptionTest,
+INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests,
+ OVInferRequestPerfCountersExceptionTest,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_MULTI),
::testing::ValuesIn(multiConfigs)),
ov::test::utils::appendPlatformTypeTestName<OVInferRequestPerfCountersExceptionTest>);
diff --git a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/properties_tests.cpp b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/properties_tests.cpp
index a3f2d5582cc..72ad5bbef2d 100644
--- a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/properties_tests.cpp
+++ b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/properties_tests.cpp
@@ -3,18 +3,19 @@
//
#include "behavior/ov_infer_request/properties_tests.hpp"
-#include "common/utils.hpp"
+
#include "common/npu_test_env_cfg.hpp"
-#include "npu_private_properties.hpp"
+#include "common/utils.hpp"
+#include "intel_npu/npu_private_properties.hpp"
using namespace ov::test::behavior;
namespace {
-INSTANTIATE_TEST_SUITE_P(
- compatibility_smoke_BehaviorTests, InferRequestPropertiesTest,
- ::testing::Combine(::testing::Values(2u), ::testing::Values(ov::test::utils::DEVICE_NPU),
- ::testing::ValuesIn(std::vector<ov::AnyMap>{
- {}})),
- ov::test::utils::appendPlatformTypeTestName<InferRequestPropertiesTest>);
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests,
+ InferRequestPropertiesTest,
+ ::testing::Combine(::testing::Values(2u),
+ ::testing::Values(ov::test::utils::DEVICE_NPU),
+ ::testing::ValuesIn(std::vector<ov::AnyMap>{{}})),
+ ov::test::utils::appendPlatformTypeTestName<InferRequestPropertiesTest>);
} // namespace
diff --git a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/wait.cpp b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/wait.cpp
index 6b0b26df27c..59c808f4412 100644
--- a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/wait.cpp
+++ b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_infer_request/wait.cpp
@@ -2,12 +2,13 @@
// SPDX-License-Identifier: Apache-2.0
//
+#include "behavior/ov_infer_request/wait.hpp"
+
#include <vector>
-#include "behavior/ov_infer_request/wait.hpp"
-#include "common/utils.hpp"
#include "common/npu_test_env_cfg.hpp"
-#include "intel_npu/al/config/common.hpp"
+#include "common/utils.hpp"
+#include "intel_npu/config/common.hpp"
using namespace ov::test::behavior;
@@ -15,24 +16,25 @@ namespace {
const std::vector<ov::AnyMap> configs = {{}};
const std::vector<ov::AnyMap> multiConfigs = {
- {ov::device::priorities(ov::test::utils::DEVICE_NPU),
- ov::device::properties(ov::test::utils::DEVICE_NPU, {})}};
+ {ov::device::priorities(ov::test::utils::DEVICE_NPU), ov::device::properties(ov::test::utils::DEVICE_NPU, {})}};
const std::vector<ov::AnyMap> autoConfigs = {
- {ov::device::priorities(ov::test::utils::DEVICE_NPU),
- ov::device::properties(ov::test::utils::DEVICE_NPU, {})}};
+ {ov::device::priorities(ov::test::utils::DEVICE_NPU), ov::device::properties(ov::test::utils::DEVICE_NPU, {})}};
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests, OVInferRequestWaitTests,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests,
+ OVInferRequestWaitTests,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(configs)),
ov::test::utils::appendPlatformTypeTestName<OVInferRequestWaitTests>);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Multi_BehaviorTests, OVInferRequestWaitTests,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Multi_BehaviorTests,
+ OVInferRequestWaitTests,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_MULTI),
::testing::ValuesIn(multiConfigs)),
ov::test::utils::appendPlatformTypeTestName<OVInferRequestWaitTests>);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Auto_BehaviorTests, OVInferRequestWaitTests,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_Auto_BehaviorTests,
+ OVInferRequestWaitTests,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_AUTO),
::testing::ValuesIn(autoConfigs)),
ov::test::utils::appendPlatformTypeTestName<OVInferRequestWaitTests>);
diff --git a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/caching_tests.cpp b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/caching_tests.cpp
index eee46865560..b89c3cf1d2c 100644
--- a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/caching_tests.cpp
+++ b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/caching_tests.cpp
@@ -3,22 +3,24 @@
//
#include "behavior/ov_plugin/caching_tests.hpp"
+
#include <utility>
-#include "common/utils.hpp"
+
#include "common/npu_test_env_cfg.hpp"
-#include "intel_npu/al/config/common.hpp"
+#include "common/utils.hpp"
+#include "intel_npu/config/common.hpp"
using namespace ov::test::behavior;
namespace {
static const std::vector<ov::element::Type> nightly_precisionsNPU = {
- ov::element::f32,
- // ov::element::f16,
- // ov::element::u8,
+ ov::element::f32,
+ // ov::element::f16,
+ // ov::element::u8,
};
static const std::vector<ov::element::Type> smoke_precisionsNPU = {
- ov::element::f32,
+ ov::element::f32,
};
static const std::vector<std::size_t> batchSizesNPU = {1};
@@ -35,9 +37,12 @@ static std::vector<ovModelWithName> NPU_functions() {
auto funcs = CompileModelCacheTestBase::getStandardFunctions();
std::vector<ovModelWithName>::iterator it = remove_if(funcs.begin(), funcs.end(), [](ovModelWithName func) {
- std::vector<std::string> bad_layers{"ReadConcatSplitAssign", "SimpleFunctionRelu",
- "2InputSubtract", "MatMulBias",
- "TIwithLSTMcell1", "KSOFunction"};
+ std::vector<std::string> bad_layers{"ReadConcatSplitAssign",
+ "SimpleFunctionRelu",
+ "2InputSubtract",
+ "MatMulBias",
+ "TIwithLSTMcell1",
+ "KSOFunction"};
return std::find(bad_layers.begin(), bad_layers.end(), std::get<1>(func)) != bad_layers.end();
});
@@ -46,7 +51,8 @@ static std::vector<ovModelWithName> NPU_functions() {
return funcs;
}
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_CachingSupportCase_NPU, CompileModelCacheTestBase,
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_CachingSupportCase_NPU,
+ CompileModelCacheTestBase,
::testing::Combine(::testing::ValuesIn(smoke_functions()),
::testing::ValuesIn(smoke_precisionsNPU),
::testing::ValuesIn(batchSizesNPU),
@@ -54,7 +60,8 @@ INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_CachingSupportCase_NPU, CompileMode
::testing::Values(ov::AnyMap{})),
ov::test::utils::appendPlatformTypeTestName<CompileModelCacheTestBase>);
-INSTANTIATE_TEST_SUITE_P(nightly_BehaviorTests_CachingSupportCase_NPU, CompileModelCacheTestBase,
+INSTANTIATE_TEST_SUITE_P(nightly_BehaviorTests_CachingSupportCase_NPU,
+ CompileModelCacheTestBase,
::testing::Combine(::testing::ValuesIn(NPU_functions()),
::testing::ValuesIn(nightly_precisionsNPU),
::testing::ValuesIn(batchSizesNPU),
@@ -70,15 +77,15 @@ static std::string getTestCaseName(testing::TestParamInfo<compileModelLoadFromFi
}
const std::vector<ov::AnyMap> LoadFromFileConfigs = {
- {ov::device::properties(ov::test::utils::DEVICE_NPU, {}),
- ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT)},
- {ov::device::properties(ov::test::utils::DEVICE_NPU, {}),
- ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY)}};
+ {ov::device::properties(ov::test::utils::DEVICE_NPU, {}),
+ ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT)},
+ {ov::device::properties(ov::test::utils::DEVICE_NPU, {}),
+ ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY)}};
const std::vector<std::string> TestTargets = {
- ov::test::utils::DEVICE_AUTO,
- ov::test::utils::DEVICE_MULTI,
- ov::test::utils::DEVICE_BATCH,
+ ov::test::utils::DEVICE_AUTO,
+ ov::test::utils::DEVICE_MULTI,
+ ov::test::utils::DEVICE_BATCH,
};
INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_Auto_BehaviorTests_CachingSupportCase_NPU,
@@ -87,39 +94,39 @@ INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_Auto_BehaviorTests_CachingSupportCase_NP
getTestCaseName);
const std::vector<ov::AnyMap> NPULoadFromFileConfigs = {
- {ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT)},
- {ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY)}
-};
+ {ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT)},
+ {ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY)}};
const std::vector<std::pair<ov::AnyMap, std::string>> NPUCompiledKernelsCacheTest = {
- std::make_pair<ov::AnyMap, std::string>(
- {ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT),
- ov::intel_npu::use_elf_compiler_backend(ov::intel_npu::ElfCompilerBackend::NO)},
- "blob"),
- std::make_pair<ov::AnyMap, std::string>(
- {ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY),
- ov::intel_npu::use_elf_compiler_backend(ov::intel_npu::ElfCompilerBackend::NO)},
- "blob"),
- std::make_pair<ov::AnyMap, std::string>(
- {ov::intel_npu::use_elf_compiler_backend(ov::intel_npu::ElfCompilerBackend::NO)},
- "blob"),
- std::make_pair<ov::AnyMap, std::string>({ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT)},
- "blob"),
- std::make_pair<ov::AnyMap, std::string>({ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY)},
- "blob")
-};
-
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_CachingSupportCase_NPU, CompileModelLoadFromFileTestBase,
+ std::make_pair<ov::AnyMap, std::string>(
+ {ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT),
+ ov::intel_npu::use_elf_compiler_backend(ov::intel_npu::ElfCompilerBackend::NO)},
+ "blob"),
+ std::make_pair<ov::AnyMap, std::string>(
+ {ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY),
+ ov::intel_npu::use_elf_compiler_backend(ov::intel_npu::ElfCompilerBackend::NO)},
+ "blob"),
+ std::make_pair<ov::AnyMap, std::string>(
+ {ov::intel_npu::use_elf_compiler_backend(ov::intel_npu::ElfCompilerBackend::NO)},
+ "blob"),
+ std::make_pair<ov::AnyMap, std::string>({ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT)},
+ "blob"),
+ std::make_pair<ov::AnyMap, std::string>({ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY)}, "blob")};
+
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_CachingSupportCase_NPU,
+ CompileModelLoadFromFileTestBase,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(NPULoadFromFileConfigs)),
getTestCaseName);
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_CachingSupportCase_NPU, CompileModelLoadFromMemoryTestBase,
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_CachingSupportCase_NPU,
+ CompileModelLoadFromMemoryTestBase,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(NPULoadFromFileConfigs)),
ov::test::utils::appendPlatformTypeTestName<CompileModelLoadFromMemoryTestBase>);
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_CachingSupportCase_NPU, CompiledKernelsCacheTest,
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_CachingSupportCase_NPU,
+ CompiledKernelsCacheTest,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(NPUCompiledKernelsCacheTest)),
ov::test::utils::appendPlatformTypeTestName<CompiledKernelsCacheTest>);
diff --git a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/core_integration.cpp b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/core_integration.cpp
index 79af0f8b875..654de366ac3 100644
--- a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/core_integration.cpp
+++ b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/core_integration.cpp
@@ -6,10 +6,9 @@
#include "common/npu_test_env_cfg.hpp"
#include "common/utils.hpp"
#include "common_test_utils/data_utils.hpp"
-#include "intel_npu/al/config/common.hpp"
+#include "intel_npu/config/common.hpp"
#include "openvino/runtime/intel_npu/properties.hpp"
-
using namespace ov::test::behavior;
namespace {
diff --git a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/core_threading_tests.cpp b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/core_threading_tests.cpp
index c72baae502d..1452f4ae446 100644
--- a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/core_threading_tests.cpp
+++ b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/core_threading_tests.cpp
@@ -3,44 +3,50 @@
//
#include <utility>
+
#include "behavior/ov_plugin/core_threading.hpp"
-#include "common/utils.hpp"
#include "common/npu_test_env_cfg.hpp"
-#include "npu_private_properties.hpp"
+#include "common/utils.hpp"
+#include "intel_npu/npu_private_properties.hpp"
namespace {
const Params params[] = {
- std::tuple<Device, Config>{ov::test::utils::DEVICE_NPU, {{ov::enable_profiling(true)}}},
- std::tuple<Device, Config>{
- ov::test::utils::DEVICE_HETERO,
- {{ov::device::priorities(ov::test::utils::DEVICE_NPU, ov::test::utils::DEVICE_CPU)}}},
+ std::tuple<Device, Config>{ov::test::utils::DEVICE_NPU, {{ov::enable_profiling(true)}}},
+ std::tuple<Device, Config>{ov::test::utils::DEVICE_HETERO,
+ {{ov::device::priorities(ov::test::utils::DEVICE_NPU, ov::test::utils::DEVICE_CPU)}}},
};
const Params paramsStreams[] = {
- std::tuple<Device, Config>{ov::test::utils::DEVICE_NPU, {{ov::num_streams(ov::streams::AUTO)}}},
+ std::tuple<Device, Config>{ov::test::utils::DEVICE_NPU, {{ov::num_streams(ov::streams::AUTO)}}},
};
const Params paramsStreamsDRIVER[] = {
- std::tuple<Device, Config>{ov::test::utils::DEVICE_NPU,
- {{ov::num_streams(ov::streams::AUTO),
- ov::intel_npu::compiler_type(ov::intel_npu::CompilerType::DRIVER)}}},
+ std::tuple<Device, Config>{
+ ov::test::utils::DEVICE_NPU,
+ {{ov::num_streams(ov::streams::AUTO), ov::intel_npu::compiler_type(ov::intel_npu::CompilerType::DRIVER)}}},
};
} // namespace
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests_CoreThreadingTest_NPU, CoreThreadingTest, testing::ValuesIn(params),
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests_CoreThreadingTest_NPU,
+ CoreThreadingTest,
+ testing::ValuesIn(params),
(ov::test::utils::appendPlatformTypeTestName<CoreThreadingTest>));
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_CoreThreadingTest_NPU, CoreThreadingTestsWithIter,
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_CoreThreadingTest_NPU,
+ CoreThreadingTestsWithIter,
testing::Combine(testing::ValuesIn(params), testing::Values(4), testing::Values(50)),
(ov::test::utils::appendPlatformTypeTestName<CoreThreadingTestsWithIter>));
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_CoreThreadingTest_Streams_NPU, CoreThreadingTestsWithCacheEnabled,
- testing::Combine(testing::ValuesIn(paramsStreamsDRIVER), testing::Values(20),
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_CoreThreadingTest_Streams_NPU,
+ CoreThreadingTestsWithCacheEnabled,
+ testing::Combine(testing::ValuesIn(paramsStreamsDRIVER),
+ testing::Values(20),
testing::Values(10)),
(ov::test::utils::appendPlatformTypeTestName<CoreThreadingTestsWithCacheEnabled>));
-INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_CoreThreadingTest_Streams_NPU, CoreThreadingTestsWithIter,
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_CoreThreadingTest_Streams_NPU,
+ CoreThreadingTestsWithIter,
testing::Combine(testing::ValuesIn(paramsStreams), testing::Values(4), testing::Values(50)),
(ov::test::utils::appendPlatformTypeTestName<CoreThreadingTestsWithIter>));
diff --git a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/life_time.cpp b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/life_time.cpp
index b9048470f03..3c95a7d21d0 100644
--- a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/life_time.cpp
+++ b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/life_time.cpp
@@ -3,9 +3,10 @@
//
#include "behavior/ov_plugin/life_time.hpp"
-#include "common/utils.hpp"
+
#include "common/npu_test_env_cfg.hpp"
-#include "intel_npu/al/config/common.hpp"
+#include "common/utils.hpp"
+#include "intel_npu/config/common.hpp"
#include "overload/ov_plugin/life_time.hpp"
using namespace ov::test::behavior;
@@ -22,27 +23,34 @@ static std::string getTestCaseName(testing::TestParamInfo<std::string> obj) {
const std::vector<ov::AnyMap> configs = {{}};
const std::vector<std::string> device_names_and_priorities = {
- "MULTI:NPU", // NPU via MULTI,
- "AUTO:NPU", // NPU via AUTO,
+ "MULTI:NPU", // NPU via MULTI,
+ "AUTO:NPU", // NPU via AUTO,
};
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests, OVHoldersTest, ::testing::Values(ov::test::utils::DEVICE_NPU),
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests,
+ OVHoldersTest,
+ ::testing::Values(ov::test::utils::DEVICE_NPU),
getTestCaseName);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests, OVHoldersTestOnImportedNetwork,
- ::testing::Values(ov::test::utils::DEVICE_NPU), getTestCaseName);
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests,
+ OVHoldersTestOnImportedNetwork,
+ ::testing::Values(ov::test::utils::DEVICE_NPU),
+ getTestCaseName);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests, OVHoldersTestNPU,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests,
+ OVHoldersTestNPU,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(configs)),
OVHoldersTestNPU::getTestCaseName);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests, OVHoldersTestOnImportedNetworkNPU,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests,
+ OVHoldersTestOnImportedNetworkNPU,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(configs)),
OVHoldersTestOnImportedNetworkNPU::getTestCaseName);
-INSTANTIATE_TEST_SUITE_P(compatibility_smoke_VirtualPlugin_BehaviorTests, OVHoldersTestWithConfig,
+INSTANTIATE_TEST_SUITE_P(compatibility_smoke_VirtualPlugin_BehaviorTests,
+ OVHoldersTestWithConfig,
::testing::ValuesIn(device_names_and_priorities),
(ov::test::utils::appendPlatformTypeTestName<OVHoldersTestWithConfig>));
} // namespace
diff --git a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/properties_tests.cpp b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/properties_tests.cpp
index d43011ac362..94ec3659e74 100644
--- a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/properties_tests.cpp
+++ b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/properties_tests.cpp
@@ -8,8 +8,8 @@
#include "common/npu_test_env_cfg.hpp"
#include "common/utils.hpp"
-#include "intel_npu/al/config/common.hpp"
-#include "npu_private_properties.hpp"
+#include "intel_npu/config/common.hpp"
+#include "intel_npu/npu_private_properties.hpp"
#include "openvino/runtime/intel_cpu/properties.hpp"
#include "openvino/runtime/intel_gpu/properties.hpp"
#include "openvino/runtime/intel_npu/properties.hpp"
diff --git a/src/plugins/intel_npu/tests/functional/shared_tests_instances/skip_tests_config.cpp b/src/plugins/intel_npu/tests/functional/shared_tests_instances/skip_tests_config.cpp
index 88cd71386b3..c362b4ee92c 100644
--- a/src/plugins/intel_npu/tests/functional/shared_tests_instances/skip_tests_config.cpp
+++ b/src/plugins/intel_npu/tests/functional/shared_tests_instances/skip_tests_config.cpp
@@ -14,7 +14,7 @@
#include "common/utils.hpp"
#include "common_test_utils/common_utils.hpp"
#include "functional_test_utils/ov_plugin_cache.hpp"
-#include "npu_private_properties.hpp"
+#include "intel_npu/npu_private_properties.hpp"
class BackendName {
public:
diff --git a/src/plugins/intel_npu/tests/unit/CMakeLists.txt b/src/plugins/intel_npu/tests/unit/CMakeLists.txt
index 861a0ff6a47..f4e8a64ecea 100644
--- a/src/plugins/intel_npu/tests/unit/CMakeLists.txt
+++ b/src/plugins/intel_npu/tests/unit/CMakeLists.txt
@@ -10,6 +10,7 @@ set(MANDATORY_UNIT_TESTS_LIBS
"openvino::gtest"
"openvino::gtest_main"
"openvino::runtime"
+ "openvino::npu_common"
"openvino::npu_al"
"openvino::npu_logger_utils"
)
diff --git a/src/plugins/intel_npu/tests/unit/npuw/online_partitioning.cpp b/src/plugins/intel_npu/tests/unit/npuw/online_partitioning.cpp
index af1fc5de8e9..99f372694fe 100644
--- a/src/plugins/intel_npu/tests/unit/npuw/online_partitioning.cpp
+++ b/src/plugins/intel_npu/tests/unit/npuw/online_partitioning.cpp
@@ -3,18 +3,17 @@
//
#include <gtest/gtest.h>
-#include <iostream>
-#include "partitioning/online/compiler.hpp"
-#include "partitioning/online/snapshot.hpp"
-#include "partitioning/online/group.hpp"
-
-#include "intel_npu/al/config/config.hpp"
-#include "intel_npu/al/config/npuw.hpp"
+#include <iostream>
-#include "openvino/openvino.hpp"
+#include "intel_npu/config/config.hpp"
+#include "intel_npu/config/npuw.hpp"
#include "openvino/op/ops.hpp"
#include "openvino/op/util/op_types.hpp"
+#include "openvino/openvino.hpp"
+#include "partitioning/online/compiler.hpp"
+#include "partitioning/online/group.hpp"
+#include "partitioning/online/snapshot.hpp"
bool isEqualEns(ov::npuw::Ensemble& ens1, ov::npuw::Ensemble& ens2);
bool isEqualEns(ov::npuw::Ensemble& ens1, ov::npuw::Ensemble& ens2) {
@@ -34,24 +33,20 @@ bool isEqualEns(ov::npuw::Ensemble& ens1, ov::npuw::Ensemble& ens2) {
std::sort(g.all_layers.begin(), g.all_layers.end());
}
- std::sort(ens1.groups.begin(), ens1.groups.end(), [](const ov::npuw::Group& g1,
- const ov::npuw::Group& g2){
- return g1.all_layers.front() < g2.all_layers.front();
- });
+ std::sort(ens1.groups.begin(), ens1.groups.end(), [](const ov::npuw::Group& g1, const ov::npuw::Group& g2) {
+ return g1.all_layers.front() < g2.all_layers.front();
+ });
- std::sort(ens2.groups.begin(), ens2.groups.end(), [](const ov::npuw::Group& g1,
- const ov::npuw::Group& g2){
- return g1.all_layers.front() < g2.all_layers.front();
- });
+ std::sort(ens2.groups.begin(), ens2.groups.end(), [](const ov::npuw::Group& g1, const ov::npuw::Group& g2) {
+ return g1.all_layers.front() < g2.all_layers.front();
+ });
for (size_t i = 0; i < ens1.groups.size(); ++i) {
const auto& g1 = ens1.groups.at(i);
const auto& g2 = ens2.groups.at(i);
- if (g1.avoid_list != g2.avoid_list ||
- g1.input_layers != g2.input_layers ||
- g1.output_layers != g2.output_layers ||
- g1.all_layers != g2.all_layers) {
+ if (g1.avoid_list != g2.avoid_list || g1.input_layers != g2.input_layers ||
+ g1.output_layers != g2.output_layers || g1.all_layers != g2.all_layers) {
return false;
}
@@ -74,17 +69,18 @@ bool isEqualEns(ov::npuw::Ensemble& ens1, ov::npuw::Ensemble& ens2) {
});
for (auto& g : sorted_rep) {
- std::sort(g.begin(), g.end(),
- [](const auto& a, const auto& b) {return *a.begin() < *b.begin();});
+ std::sort(g.begin(), g.end(), [](const auto& a, const auto& b) {
+ return *a.begin() < *b.begin();
+ });
}
- std::sort(sorted_rep.begin(), sorted_rep.end(),
- [](const auto& a, const auto& b) {return *a.front().begin() < *b.front().begin();});
+ std::sort(sorted_rep.begin(), sorted_rep.end(), [](const auto& a, const auto& b) {
+ return *a.front().begin() < *b.front().begin();
+ });
return sorted_rep;
};
-
if (get_sorted_rep(ens1.repeated) != get_sorted_rep(ens2.repeated)) {
return false;
}
@@ -97,7 +93,8 @@ public:
ModelGenerator() = default;
std::shared_ptr<ov::Model> get_model_without_repeated_blocks() {
- std::shared_ptr<ov::op::v0::Parameter> input = std::make_shared<ov::op::v0::Parameter>(ov::element::i32, ov::Shape{1, 1, 40});
+ std::shared_ptr<ov::op::v0::Parameter> input =
+ std::make_shared<ov::op::v0::Parameter>(ov::element::i32, ov::Shape{1, 1, 40});
m_nodes.push_back(input);
set_name(input);
@@ -115,7 +112,8 @@ public:
std::shared_ptr<ov::Model> get_model_with_repeated_blocks() {
// Generate head
- std::shared_ptr<ov::op::v0::Parameter> input = std::make_shared<ov::op::v0::Parameter>(ov::element::i32, ov::Shape{1, 1, 40});
+ std::shared_ptr<ov::op::v0::Parameter> input =
+ std::make_shared<ov::op::v0::Parameter>(ov::element::i32, ov::Shape{1, 1, 40});
m_nodes.push_back(input);
set_name(input);
@@ -174,24 +172,32 @@ public:
// Constants
std::vector<std::shared_ptr<ov::Node>> model_c(18, nullptr);
- model_c[0] = std::make_shared<ov::op::v0::Constant>(ov::element::i32, ov::Shape{4}, std::vector<int>{0, 2, 1, 3});
+ model_c[0] =
+ std::make_shared<ov::op::v0::Constant>(ov::element::i32, ov::Shape{4}, std::vector<int>{0, 2, 1, 3});
model_c[1] = std::make_shared<ov::op::v0::Constant>(ov::element::i64, ov::Shape{1}, std::vector<int>{1});
model_c[2] = std::make_shared<ov::op::v0::Constant>(ov::element::i64, ov::Shape{1}, std::vector<int>{0});
model_c[3] = std::make_shared<ov::op::v0::Constant>(ov::element::i64, ov::Shape{1}, std::vector<int>{2});
model_c[4] = std::make_shared<ov::op::v0::Constant>(ov::element::i64, ov::Shape{1}, std::vector<int>{0});
- model_c[5] = std::make_shared<ov::op::v0::Constant>(ov::element::i64, ov::Shape{4}, std::vector<int>{1, 1, 1, 1});
+ model_c[5] =
+ std::make_shared<ov::op::v0::Constant>(ov::element::i64, ov::Shape{4}, std::vector<int>{1, 1, 1, 1});
model_c[6] = std::make_shared<ov::op::v0::Constant>(ov::element::i64, ov::Shape{1}, std::vector<int>{1});
model_c[7] = std::make_shared<ov::op::v0::Constant>(ov::element::i64, ov::Shape{1}, std::vector<int>{0});
- model_c[8] = std::make_shared<ov::op::v0::Constant>(ov::element::i64, ov::Shape{4}, std::vector<int>{1, 1, 1, 1});
- model_c[9] = std::make_shared<ov::op::v0::Constant>(ov::element::i32, ov::Shape{4}, std::vector<int>{1, 1, 1, 2});
- model_c[10] = std::make_shared<ov::op::v0::Constant>(ov::element::i32, ov::Shape{4}, std::vector<int>{1, 1, 1, 1});
- model_c[11] = std::make_shared<ov::op::v0::Constant>(ov::element::i32, ov::Shape{4}, std::vector<int>{1, 1, 1, 2});
+ model_c[8] =
+ std::make_shared<ov::op::v0::Constant>(ov::element::i64, ov::Shape{4}, std::vector<int>{1, 1, 1, 1});
+ model_c[9] =
+ std::make_shared<ov::op::v0::Constant>(ov::element::i32, ov::Shape{4}, std::vector<int>{1, 1, 1, 2});
+ model_c[10] =
+ std::make_shared<ov::op::v0::Constant>(ov::element::i32, ov::Shape{4}, std::vector<int>{1, 1, 1, 1});
+ model_c[11] =
+ std::make_shared<ov::op::v0::Constant>(ov::element::i32, ov::Shape{4}, std::vector<int>{1, 1, 1, 2});
model_c[12] = std::make_shared<ov::op::v0::Constant>(ov::element::i32, ov::Shape{1, 1, 1, 1});
model_c[13] = std::make_shared<ov::op::v0::Constant>(ov::element::i32, ov::Shape{1, 1, 1, 1});
model_c[14] = std::make_shared<ov::op::v0::Constant>(ov::element::i32, ov::Shape{1, 1, 1, 1});
model_c[15] = std::make_shared<ov::op::v0::Constant>(ov::element::f32, ov::Shape{40, 40});
- model_c[16] = std::make_shared<ov::op::v0::Constant>(ov::element::i64, ov::Shape{4}, std::vector<int>{1, 1, 4, 10});
- model_c[17] = std::make_shared<ov::op::v0::Constant>(ov::element::i32, ov::Shape{3}, std::vector<int>{1, 1, 40});
+ model_c[16] =
+ std::make_shared<ov::op::v0::Constant>(ov::element::i64, ov::Shape{4}, std::vector<int>{1, 1, 4, 10});
+ model_c[17] =
+ std::make_shared<ov::op::v0::Constant>(ov::element::i32, ov::Shape{3}, std::vector<int>{1, 1, 40});
for (const auto& c : model_c) {
m_nodes.push_back(c);
@@ -220,17 +226,17 @@ public:
op[6] = std::make_shared<ov::op::v0::Floor>(op[5]);
op[7] = std::make_shared<ov::op::v3::ScatterUpdate>(model_c[5], model_c[6], op[6], model_c[7]);
op[8] = std::make_shared<ov::op::v1::StridedSlice>(op[2],
- model_c[8],
- op[7],
- model_c[9],
- std::vector<int64_t>{1, 1, 1, 1},
- std::vector<int64_t>{1, 1, 1, 1});
+ model_c[8],
+ op[7],
+ model_c[9],
+ std::vector<int64_t>{1, 1, 1, 1},
+ std::vector<int64_t>{1, 1, 1, 1});
op[9] = std::make_shared<ov::op::v1::StridedSlice>(op[2],
- op[7],
- model_c[10],
- model_c[11],
- std::vector<int64_t>{1, 1, 1, 1},
- std::vector<int64_t>{1, 1, 1, 1});
+ op[7],
+ model_c[10],
+ model_c[11],
+ std::vector<int64_t>{1, 1, 1, 1},
+ std::vector<int64_t>{1, 1, 1, 1});
op[10] = std::make_shared<ov::op::v1::Multiply>(op[9], convert[2]);
op[11] = std::make_shared<ov::op::v0::Concat>(std::vector<std::shared_ptr<ov::Node>>{op[10], op[8]}, -1);
op[12] = std::make_shared<ov::op::v1::Multiply>(model_c[13], op[11]);
@@ -262,7 +268,7 @@ TEST(OnlinePartitioningTest, Partitioning_IsTheSame_SmallModel) {
auto opt_desc = std::make_shared<::intel_npu::OptionsDesc>();
auto cfg = ::intel_npu::Config(opt_desc);
::intel_npu::registerNPUWOptions(*opt_desc);
- std::map<std::string, std::string> cfg_map = {{ "NPUW_ONLINE_KEEP_BLOCK_SIZE", "9" }};
+ std::map<std::string, std::string> cfg_map = {{"NPUW_ONLINE_KEEP_BLOCK_SIZE", "9"}};
cfg.update(cfg_map);
auto ens = ov::npuw::online::buildPartitioning(model, cfg);
@@ -280,7 +286,7 @@ TEST(OnlinePartitioningTest, Partitioning_IsTheSame_RepeatedModel) {
auto opt_desc = std::make_shared<::intel_npu::OptionsDesc>();
auto cfg = ::intel_npu::Config(opt_desc);
::intel_npu::registerNPUWOptions(*opt_desc);
- std::map<std::string, std::string> cfg_map = {{ "NPUW_ONLINE_KEEP_BLOCK_SIZE", "9" }};
+ std::map<std::string, std::string> cfg_map = {{"NPUW_ONLINE_KEEP_BLOCK_SIZE", "9"}};
cfg.update(cfg_map);
auto ens = ov::npuw::online::buildPartitioning(model, cfg);
@@ -343,7 +349,8 @@ TEST(OnlinePartitioningTest, Partitioning_earlyAvoids_SmallModel) {
auto snap = std::make_shared<ov::npuw::online::Snapshot>(model);
ov::npuw::online::PassContext ctx;
- ctx.avoids = {{ov::npuw::online::PatternType::OP, "Gather", "mydevice"}, {ov::npuw::online::PatternType::OP, "MatMul", "mydevice"}};
+ ctx.avoids = {{ov::npuw::online::PatternType::OP, "Gather", "mydevice"},
+ {ov::npuw::online::PatternType::OP, "MatMul", "mydevice"}};
snap->setCtx(ctx);
snap->buildGraph();
snap->earlyAvoids();
@@ -365,7 +372,8 @@ TEST(OnlinePartitioningTest, Partitioning_earlyAvoids_RepeatedModel) {
auto snap = std::make_shared<ov::npuw::online::Snapshot>(model);
ov::npuw::online::PassContext ctx;
- ctx.avoids = {{ov::npuw::online::PatternType::OP, "Gather", "mydevice"}, {ov::npuw::online::PatternType::OP, "MatMul", "mydevice"}};
+ ctx.avoids = {{ov::npuw::online::PatternType::OP, "Gather", "mydevice"},
+ {ov::npuw::online::PatternType::OP, "MatMul", "mydevice"}};
snap->setCtx(ctx);
snap->buildGraph();
snap->earlyAvoids();
@@ -391,7 +399,7 @@ TEST(OnlinePartitioningTest, Partitioning_collectLHF_SmallModel) {
std::vector<std::size_t> sizes = {10, 10};
size_t iter = 0;
- snap->repeat([&]{
+ snap->repeat([&] {
snap->collectLHF();
EXPECT_LT(iter, sizes.size());
EXPECT_EQ(snap->graphSize(), sizes[iter++]);
@@ -408,7 +416,7 @@ TEST(OnlinePartitioningTest, Partitioning_collectLHF_RepeatedModel) {
std::vector<std::size_t> sizes = {82, 82};
size_t iter = 0;
- snap->repeat([&]{
+ snap->repeat([&] {
snap->collectLHF();
EXPECT_LT(iter, sizes.size());
EXPECT_EQ(snap->graphSize(), sizes[iter++]);
@@ -425,7 +433,7 @@ TEST(OnlinePartitioningTest, Partitioning_fuseRemnants_SmallModel) {
std::vector<std::size_t> sizes = {10, 10};
size_t iter = 0;
- snap->repeat([&]{
+ snap->repeat([&] {
snap->fuseRemnants();
EXPECT_LT(iter, sizes.size());
EXPECT_EQ(snap->graphSize(), sizes[iter++]);
@@ -442,7 +450,7 @@ TEST(OnlinePartitioningTest, Partitioning_fuseRemnants_RepeatedModel) {
std::vector<std::size_t> sizes = {75, 38, 19, 10};
size_t iter = 0;
- snap->repeat([&]{
+ snap->repeat([&] {
snap->fuseRemnants();
EXPECT_LT(iter, sizes.size());
EXPECT_EQ(snap->graphSize(), sizes[iter++]);
@@ -459,7 +467,7 @@ TEST(OnlinePartitioningTest, Partitioning_fuseRemnantsExtended_SmallModel) {
std::vector<std::size_t> sizes = {10, 10};
size_t iter = 0;
- snap->repeat([&]{
+ snap->repeat([&] {
snap->fuseRemnantsExtended();
EXPECT_LT(iter, sizes.size());
EXPECT_EQ(snap->graphSize(), sizes[iter++]);
@@ -476,7 +484,7 @@ TEST(OnlinePartitioningTest, Partitioning_fuseRemnantsExtended_RepeatedModel) {
std::vector<std::size_t> sizes = {10, 10};
size_t iter = 0;
- snap->repeat([&]{
+ snap->repeat([&] {
snap->fuseRemnantsExtended();
EXPECT_LT(iter, sizes.size());
EXPECT_EQ(snap->graphSize(), sizes[iter++]);
@@ -493,7 +501,7 @@ TEST(OnlinePartitioningTest, Partitioning_fuseInputs_SmallModel) {
std::vector<std::size_t> sizes = {15, 14, 14};
size_t iter = 0;
- snap->repeat([&]{
+ snap->repeat([&] {
snap->fuseInputs();
EXPECT_LT(iter, sizes.size());
EXPECT_EQ(snap->graphSize(), sizes[iter++]);
@@ -510,7 +518,7 @@ TEST(OnlinePartitioningTest, Partitioning_fuseInputs_RepeatedModel) {
std::vector<std::size_t> sizes = {148, 138, 138};
size_t iter = 0;
- snap->repeat([&]{
+ snap->repeat([&] {
snap->fuseInputs();
EXPECT_LT(iter, sizes.size());
EXPECT_EQ(snap->graphSize(), sizes[iter++]);
@@ -574,7 +582,6 @@ TEST(OnlinePartitioningTest, Partitioning_Compiler_RepeatedBlocks_SmallModel) {
auto snap = std::make_shared<ov::npuw::online::Snapshot>(model);
snap->buildGraph();
-
std::vector<std::size_t> sizes_fr = {10, 10};
size_t iter_fr = 0;
@@ -600,7 +607,6 @@ TEST(OnlinePartitioningTest, Partitioning_Compiler_RepeatedBlocks_RepeatedModel)
auto snap = std::make_shared<ov::npuw::online::Snapshot>(model);
snap->buildGraph();
-
std::vector<std::size_t> sizes_fr = {12, 12};
size_t iter_fr = 0;
@@ -636,7 +642,8 @@ TEST(OnlinePartitioningTest, Partitioning_Compiler_Compute_SmallModel) {
size_t iter_fr = 0;
ov::npuw::online::PassContext ctx;
- ctx.isolates = {{ov::npuw::online::PatternType::OP, "Transpose", "test_compute"}, {ov::npuw::online::PatternType::OP, "ScatterUpdate", "test_compute"}};
+ ctx.isolates = {{ov::npuw::online::PatternType::OP, "Transpose", "test_compute"},
+ {ov::npuw::online::PatternType::OP, "ScatterUpdate", "test_compute"}};
ctx.nofolds = {"test_compute"};
snap->setCtx(ctx);
diff --git a/src/plugins/intel_npu/tools/compile_tool/README.md b/src/plugins/intel_npu/tools/compile_tool/README.md
index daebe97b406..65b30eec8ae 100644
--- a/src/plugins/intel_npu/tools/compile_tool/README.md
+++ b/src/plugins/intel_npu/tools/compile_tool/README.md
@@ -95,7 +95,7 @@ For example, to compile a blob for inference on Intel® Core™ Ultra NPU, run t
./compile_tool -m <path_to_model>/model_name.xml -d NPU.3720
```
-You can pass a config file via `-c` option which allow you to specify some public or private properties. More details in [Supported Properties](https://github.com/openvinotoolkit/openvino/tree/master/src/plugins/intel_npu#supported-properties) and in [configs](https://github.com/openvinotoolkit/openvino/tree/master/src/plugins/intel_npu/src/al/include/intel_npu/al/config). For example, to use a custom build of NPU Compiler instaed of the release Compiler distributed within NPU driver, create a config file with the following content:
+You can pass a config file via `-c` option which allow you to specify some public or private properties. More details in [Supported Properties](https://github.com/openvinotoolkit/openvino/tree/master/src/plugins/intel_npu#supported-properties) and in [configs](https://github.com/openvinotoolkit/openvino/tree/master/src/plugins/intel_npu/src/al/include/intel_npu/config). For example, to use a custom build of NPU Compiler instaed of the release Compiler distributed within NPU driver, create a config file with the following content:
```
NPU_COMPILER_TYPE MLIR
```