Skip to content

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

[`NPU`] [`Properties`] [`CID`] [`CIP`] Postpone compiler library loading for runtime properties (#32246)

Mircea-Aurelian Danf943d63a582b
diff --git a/src/core/src/op/convert_promote_types.cpp b/src/core/src/op/convert_promote_types.cpp
index f9eee6c6261..cdbaa4ba640 100644
--- a/src/core/src/op/convert_promote_types.cpp
+++ b/src/core/src/op/convert_promote_types.cpp
@@ -120,7 +120,7 @@ element::Type evaluate_common_type(const v14::ConvertPromoteTypes* op) {
// For pytorch mode, when number formats are same, promote to type of non-scalar input.
const auto& target = is_input_0_scalar ? input_1_type : input_0_type;
if (!promote_unsafe) {
- // For safe mode, check wether target type has bitwidth able to hold data from scalar type.
+ // For safe mode, check whether target type has bitwidth able to hold data from scalar type.
const auto& scalar = is_input_0_scalar ? input_0_type : input_1_type;
const auto is_pytorch_promote_safe =
((target.is_signed() == scalar.is_signed() && target.bitwidth() >= scalar.bitwidth()) ||
diff --git a/src/plugins/intel_cpu/src/shape_inference/custom/color_convert.cpp b/src/plugins/intel_cpu/src/shape_inference/custom/color_convert.cpp
index dd7cb219020..c77edc50bbe 100644
--- a/src/plugins/intel_cpu/src/shape_inference/custom/color_convert.cpp
+++ b/src/plugins/intel_cpu/src/shape_inference/custom/color_convert.cpp
@@ -20,7 +20,7 @@
namespace ov::intel_cpu::node {
/**
- * Implements Color Convert shape inference algorithm. Depending on wether it has only single plain H dimension is
+ * Implements Color Convert shape inference algorithm. Depending on whether it has only single plain H dimension is
* passed through or recalculated as 2/3 of the initial size.
*
*/
diff --git a/src/plugins/intel_cpu/src/shape_inference/custom/color_convert.hpp b/src/plugins/intel_cpu/src/shape_inference/custom/color_convert.hpp
index dc92af44aed..e8899ac5c65 100644
--- a/src/plugins/intel_cpu/src/shape_inference/custom/color_convert.hpp
+++ b/src/plugins/intel_cpu/src/shape_inference/custom/color_convert.hpp
@@ -20,7 +20,7 @@ namespace ov::intel_cpu::node {
using Result = IShapeInfer::Result;
/**
- * Implements Color Convert shape inference algorithm. Depending on wether it has only single plain H dimension is
+ * Implements Color Convert shape inference algorithm. Depending on whether it has only single plain H dimension is
* passed through or recalculated as 2/3 of the initial size.
*
*/
diff --git a/src/plugins/intel_npu/src/al/include/intel_npu/config/options.hpp b/src/plugins/intel_npu/src/al/include/intel_npu/config/options.hpp
index 3005c4ae2ac..aa6f52a2e4d 100644
--- a/src/plugins/intel_npu/src/al/include/intel_npu/config/options.hpp
+++ b/src/plugins/intel_npu/src/al/include/intel_npu/config/options.hpp
@@ -287,7 +287,7 @@ struct DEVICE_ID final : OptionBase<DEVICE_ID, std::string> {
}
static OptionMode mode() {
- return OptionMode::Both;
+ return OptionMode::RunTime;
}
};
diff --git a/src/plugins/intel_npu/src/common/include/intel_npu/common/filtered_config.hpp b/src/plugins/intel_npu/src/common/include/intel_npu/common/filtered_config.hpp
index 6bb3d04b098..f612142cc59 100644
--- a/src/plugins/intel_npu/src/common/include/intel_npu/common/filtered_config.hpp
+++ b/src/plugins/intel_npu/src/common/include/intel_npu/common/filtered_config.hpp
@@ -76,6 +76,11 @@ public:
*/
void enableAll();
+ /**
+ * @brief Enables only runtime configuration options.
+ */
+ void enableRuntimeOptions();
+
/**
* @brief Iterates over all enabled options and applies a callback function to each enabled key.
* @param cb A callback function that takes a string (key) as input and performs an operation on it.
@@ -115,10 +120,22 @@ public:
*/
std::string toStringForCompiler() const;
+ /**
+ * @brief Marks config as initialized
+ */
+ void markAsInitialized();
+
+ /**
+ * @brief Checks whether config was initialized
+ */
+ bool wasInitialized() const;
+
private:
EnableMap _enabled; ///< Map to track whether specific configuration keys are enabled or disabled.
ConfigMap _internal_compiler_configs; ///< Map to store internal (hidden) configurations used for compiler.
+
+ bool _initialized = false; ///< Boolean to check whether config was filtered with compiler supported properties
};
} // namespace intel_npu
diff --git a/src/plugins/intel_npu/src/common/src/filtered_config.cpp b/src/plugins/intel_npu/src/common/src/filtered_config.cpp
index b5a1f204d7f..134d81d06ac 100644
--- a/src/plugins/intel_npu/src/common/src/filtered_config.cpp
+++ b/src/plugins/intel_npu/src/common/src/filtered_config.cpp
@@ -64,6 +64,14 @@ void FilteredConfig::enableAll() {
});
}
+void FilteredConfig::enableRuntimeOptions() {
+ _desc->walk([&](const details::OptionConcept& opt) {
+ if (opt.mode() == OptionMode::RunTime) {
+ enable(opt.key().data(), true);
+ }
+ });
+}
+
void FilteredConfig::walkEnables(std::function<void(const std::string&)> cb) const {
for (const auto& itr : _enabled) {
cb(itr.first);
@@ -127,4 +135,12 @@ std::string FilteredConfig::toStringForCompiler() const {
return resultStream.str();
}
+void FilteredConfig::markAsInitialized() {
+ _initialized = true;
+}
+
+bool FilteredConfig::wasInitialized() const {
+ return _initialized;
+}
+
} // namespace intel_npu
diff --git a/src/plugins/intel_npu/src/plugin/include/plugin.hpp b/src/plugins/intel_npu/src/plugin/include/plugin.hpp
index 2fad2f0c2be..5d53aa52062 100644
--- a/src/plugins/intel_npu/src/plugin/include/plugin.hpp
+++ b/src/plugins/intel_npu/src/plugin/include/plugin.hpp
@@ -13,6 +13,7 @@
#include "intel_npu/common/icompiler_adapter.hpp"
#include "intel_npu/common/npu.hpp"
#include "intel_npu/config/config.hpp"
+#include "intel_npu/config/options.hpp"
#include "intel_npu/utils/logger/logger.hpp"
#include "metadata.hpp"
#include "metrics.hpp"
@@ -65,6 +66,8 @@ public:
private:
void init_options();
+ void filter_global_config_safe(
+ const std::optional<ov::intel_npu::CompilerType>& compilerChange = std::nullopt) const;
void filter_config_by_compiler_support(FilteredConfig& cfg) const;
FilteredConfig fork_local_config(const std::map<std::string, std::string>& rawConfig,
const std::unique_ptr<ICompilerAdapter>& compiler,
@@ -93,12 +96,13 @@ private:
ov::SoPtr<IEngineBackend> _backend;
std::shared_ptr<OptionsDesc> _options;
- FilteredConfig _globalConfig;
+ mutable FilteredConfig _globalConfig;
mutable Logger _logger;
std::shared_ptr<Metrics> _metrics;
std::unique_ptr<Properties> _properties;
static std::atomic<int> _compiledModelLoadCounter;
+ mutable std::mutex _mutex;
};
} // namespace intel_npu
diff --git a/src/plugins/intel_npu/src/plugin/include/properties.hpp b/src/plugins/intel_npu/src/plugin/include/properties.hpp
index 22f6f5ebb95..52f3d95227c 100644
--- a/src/plugins/intel_npu/src/plugin/include/properties.hpp
+++ b/src/plugins/intel_npu/src/plugin/include/properties.hpp
@@ -52,6 +52,11 @@ public:
*/
void set_property(const ov::AnyMap& properties);
+ /**
+ * @brief Checks whether a property was registered by its name
+ */
+ bool isPropertyRegistered(const std::string& propertyName) const;
+
private:
PropertiesType _pType;
FilteredConfig& _config;
diff --git a/src/plugins/intel_npu/src/plugin/src/plugin.cpp b/src/plugins/intel_npu/src/plugin/src/plugin.cpp
index 8ddc8901dea..484f8cb3af5 100644
--- a/src/plugins/intel_npu/src/plugin/src/plugin.cpp
+++ b/src/plugins/intel_npu/src/plugin/src/plugin.cpp
@@ -14,7 +14,6 @@
#include "intel_npu/common/igraph.hpp"
#include "intel_npu/common/itt.hpp"
#include "intel_npu/config/npuw.hpp"
-#include "intel_npu/config/options.hpp"
#include "intel_npu/utils/utils.hpp"
#include "intel_npu/utils/zero/zero_init.hpp"
#include "npuw/compiled_model.hpp"
@@ -335,9 +334,6 @@ void Plugin::init_options() {
// parse again env_variables to update registered configs which have env vars set
_globalConfig.parseEnvVars();
- // filter out unsupported options
- filter_config_by_compiler_support(_globalConfig);
-
// NPUW properties are requested by OV Core during caching and have no effect on the NPU plugin. But we still need
// to enable those for OV Core to query. Note: do this last to not filter them out. register npuw caching properties
REGISTER_OPTION(NPU_USE_NPUW);
@@ -395,6 +391,11 @@ void Plugin::init_options() {
REGISTER_OPTION(NPUW_LLM_GENERATE_ATTENTION_HINT);
REGISTER_OPTION(NPUW_LLM_SHARED_LM_HEAD_CONFIG);
REGISTER_OPTION(NPUW_LLM_ADDITIONAL_SHARED_LM_HEAD_CONFIG);
+
+ _globalConfig.enableRuntimeOptions();
+
+ // Special cases
+ _globalConfig.enable(ov::log::level.name(), true); // needed also by runtime options
}
void Plugin::filter_config_by_compiler_support(FilteredConfig& cfg) const {
@@ -483,32 +484,65 @@ void Plugin::filter_config_by_compiler_support(FilteredConfig& cfg) const {
}
}
+void Plugin::filter_global_config_safe(const std::optional<ov::intel_npu::CompilerType>& compilerChange) const {
+ std::lock_guard<std::mutex> lock(_mutex);
+ if (compilerChange.has_value()) {
+ _globalConfig.update({{std::string(COMPILER_TYPE::key()), COMPILER_TYPE::toString(compilerChange.value())}});
+ }
+ if (!_globalConfig.wasInitialized() || compilerChange.has_value()) {
+ // filter out unsupported options
+ filter_config_by_compiler_support(_globalConfig);
+ // reset properties for the new options
+ _properties->registerProperties();
+ // set globalConfig as filtered
+ _globalConfig.markAsInitialized();
+ }
+}
+
FilteredConfig Plugin::fork_local_config(const std::map<std::string, std::string>& rawConfig,
const std::unique_ptr<ICompilerAdapter>& compiler,
OptionMode mode) const {
update_log_level(rawConfig);
// create a copy of the global config
- FilteredConfig localConfig = _globalConfig;
+ std::unique_ptr<FilteredConfig>
+ localConfigPtr; // no default constructor from FilteredConfig, needed to switch to ptr
+ {
+ std::lock_guard<std::mutex> lock(_mutex);
+ localConfigPtr = std::make_unique<FilteredConfig>(_globalConfig);
+ }
bool compiler_changed = false;
// Check if compiler was changed
// 1. Check for compiler change
auto it = rawConfig.find(std::string(COMPILER_TYPE::key()));
if (it != rawConfig.end()) {
- if (localConfig.getString<COMPILER_TYPE>() != it->second) {
+ if (localConfigPtr->getString<COMPILER_TYPE>() != it->second) {
// Compiler type has changed!
// Set new compiler type
- localConfig.update({{std::string(COMPILER_TYPE::key()), it->second}});
+ localConfigPtr->update({{std::string(COMPILER_TYPE::key()), it->second}});
// enable/disable config keys based on what the new compiler supports
- filter_config_by_compiler_support(localConfig);
+ filter_config_by_compiler_support(*localConfigPtr);
compiler_changed = true;
+ // set localConfig as filtered
+ localConfigPtr->markAsInitialized();
}
}
+
+ // If localConfig was not initialized not even by compiler type change, then both localConfig and _globalConfig need
+ // to be initialized
+ if (!localConfigPtr->wasInitialized()) {
+ filter_global_config_safe();
+ {
+ std::lock_guard<std::mutex> lock(_mutex);
+ localConfigPtr = std::make_unique<FilteredConfig>(_globalConfig);
+ }
+ }
+
// 2. Revalidate unknown internal configs
// look for unsupported internals
// first in what we inherited from globalconfig by forking it - ONLY if compiler has changed
if (compiler_changed) {
- localConfig.walkInternals([&](const std::string& key) {
+ localConfigPtr->walkInternals([&](const std::string& key) {
if (!compiler->is_option_supported(key)) {
OPENVINO_THROW("[ NOT_FOUND ] Option '", key, "' is not supported for current configuration");
}
@@ -517,12 +551,12 @@ FilteredConfig Plugin::fork_local_config(const std::map<std::string, std::string
// secondly, in the new config provided by user
std::map<std::string, std::string> cfgs_to_set;
for (const auto& [key, value] : rawConfig) {
- if (!localConfig.hasOpt(key)) {
+ if (!localConfigPtr->hasOpt(key)) {
// not a known config key
if (!compiler->is_option_supported(key)) {
OPENVINO_THROW("[ NOT_FOUND ] Option '", key, "' is not supported for current configuration");
} else {
- localConfig.addOrUpdateInternal(key, value);
+ localConfigPtr->addOrUpdateInternal(key, value);
}
} else {
cfgs_to_set.emplace(key, value);
@@ -530,29 +564,38 @@ FilteredConfig Plugin::fork_local_config(const std::map<std::string, std::string
}
// 3. If all good so far, update values
- localConfig.update(cfgs_to_set, mode);
- return localConfig;
+ localConfigPtr->update(cfgs_to_set, mode);
+ return *localConfigPtr;
}
void Plugin::set_property(const ov::AnyMap& properties) {
+ if (properties.empty()) {
+ return;
+ }
+
// 1. Check for compiler change
if (properties.count(std::string(COMPILER_TYPE::key())) != 0) {
// Compiler change detected
// Set new compiler in _globalConfig
auto it = properties.find(std::string(COMPILER_TYPE::key()));
if (it != properties.end()) {
- _globalConfig.update({{std::string(COMPILER_TYPE::key()), it->second.as<std::string>()}});
// enable/disable config keys based on what the new compiler supports
- filter_config_by_compiler_support(_globalConfig);
- // 2. Reset properties for the new options
- _properties->registerProperties();
+ filter_global_config_safe(COMPILER_TYPE::parse(it->second.as<std::string>()));
}
}
- // 2. Set the property via Properties interface
+ // 2. Check if configs have been initialized
+ for (const auto& prop : properties) {
+ if (!_properties->isPropertyRegistered(prop.first)) {
+ filter_global_config_safe();
+ break;
+ }
+ }
+
+ // 3. Set the property via Properties interface
_properties->set_property(properties);
- // 3. Extra hooks
+ // 4. Extra hooks
// Update log level if it was provided
if (properties.count(std::string(LOG_LEVEL::key())) != 0) {
Logger::global().setLevel(_globalConfig.get<LOG_LEVEL>());
@@ -566,6 +609,10 @@ void Plugin::set_property(const ov::AnyMap& properties) {
ov::Any Plugin::get_property(const std::string& name, const ov::AnyMap& arguments) const {
auto npu_plugin_properties = arguments;
exclude_model_ptr_from_map(npu_plugin_properties);
+
+ if ((!_properties->isPropertyRegistered(name) || name == ov::supported_properties.name())) {
+ filter_global_config_safe();
+ }
return _properties->get_property(name, npu_plugin_properties);
}
diff --git a/src/plugins/intel_npu/src/plugin/src/properties.cpp b/src/plugins/intel_npu/src/plugin/src/properties.cpp
index e17efcf920d..18884a4c3f4 100644
--- a/src/plugins/intel_npu/src/plugin/src/properties.cpp
+++ b/src/plugins/intel_npu/src/plugin/src/properties.cpp
@@ -311,6 +311,7 @@ Properties::Properties(const PropertiesType pType,
void Properties::registerProperties() {
// Reset
_properties.clear();
+ _supportedProperties.clear();
switch (_pType) {
case PropertiesType::PLUGIN:
@@ -517,7 +518,6 @@ void Properties::registerPluginProperties() {
_metrics->GetDeviceTotalMemSize(get_specified_device_name(config)));
REGISTER_SIMPLE_METRIC(ov::intel_npu::driver_version, true, _metrics->GetDriverVersion());
REGISTER_SIMPLE_METRIC(ov::intel_npu::backend_name, false, _metrics->GetBackendName());
- REGISTER_SIMPLE_METRIC(ov::intel_npu::batch_mode, false, _metrics->GetDriverVersion());
REGISTER_CUSTOM_METRIC(ov::device::architecture,
!_metrics->GetAvailableDevicesNames().empty(),
[&](const Config& config) {
@@ -675,7 +675,12 @@ ov::Any Properties::get_property(const std::string& name, const ov::AnyMap& argu
amends.emplace(value.first, value.second.as<std::string>());
}
FilteredConfig amendedConfig = _config;
- amendedConfig.update(amends, OptionMode::Both);
+ try {
+ amendedConfig.update(amends, OptionMode::Both);
+ } catch (const ov::Exception& /* unusedOVException */) {
+ Logger("Properties", ov::log::Level::WARNING)
+ .warning("Amended config couldn't be updated with the given arguments");
+ }
auto&& configIterator = _properties.find(name);
if (configIterator != _properties.cend()) {
@@ -691,22 +696,22 @@ ov::Any Properties::get_property(const std::string& name, const ov::AnyMap& argu
void Properties::set_property(const ov::AnyMap& properties) {
std::map<std::string, std::string> cfgs_to_set;
- std::unique_ptr<ICompilerAdapter> compiler = nullptr;
- if (_pType == PropertiesType::PLUGIN) {
- try {
- // Only accepting unknown config keys in plugin
- CompilerAdapterFactory compilerAdapterFactory;
- compiler = compilerAdapterFactory.getCompiler(_backend, _config.get<COMPILER_TYPE>());
- } catch (...) {
- // nothing to do here. we will just throw exception bellow in case unknown property check is called
- // if its not called, nothing to do
- }
- }
-
for (auto&& value : properties) {
if (_properties.find(value.first) == _properties.end()) {
// property doesn't exist
// checking as internal now
+
+ std::unique_ptr<ICompilerAdapter> compiler = nullptr;
+ if (_pType == PropertiesType::PLUGIN) {
+ try {
+ // Only accepting unknown config keys in plugin
+ CompilerAdapterFactory compilerAdapterFactory;
+ compiler = compilerAdapterFactory.getCompiler(_backend, _config.get<COMPILER_TYPE>());
+ } catch (...) {
+ // just throw the exception below in case unknown property check is called
+ }
+ }
+
if (compiler != nullptr) {
if (compiler->is_option_supported(value.first)) {
// if compiler reports it supported > registering as internal
@@ -731,4 +736,8 @@ void Properties::set_property(const ov::AnyMap& properties) {
}
}
+bool Properties::isPropertyRegistered(const std::string& propertyName) const {
+ return _properties.find(propertyName) != _properties.end();
+}
+
} // namespace intel_npu
diff --git a/src/plugins/intel_npu/src/utils/include/intel_npu/utils/zero/zero_init.hpp b/src/plugins/intel_npu/src/utils/include/intel_npu/utils/zero/zero_init.hpp
index 0a6b24a70fa..2438bc92198 100644
--- a/src/plugins/intel_npu/src/utils/include/intel_npu/utils/zero/zero_init.hpp
+++ b/src/plugins/intel_npu/src/utils/include/intel_npu/utils/zero/zero_init.hpp
@@ -10,10 +10,12 @@
#include <ze_intel_npu_uuid.h>
#include <memory>
+#include <mutex>
#include "intel_npu/utils/logger/logger.hpp"
#include "intel_npu/utils/zero/zero_api.hpp"
#include "intel_npu/utils/zero/zero_types.hpp"
+#include "intel_npu/utils/zero/zero_utils.hpp"
namespace intel_npu {
/**
@@ -50,12 +52,6 @@ public:
inline uint32_t getDriverVersion() const {
return driver_properties.driverVersion;
}
- inline uint32_t getCompilerVersion() const {
- return ZE_MAKE_VERSION(compiler_properties.compilerVersion.major, compiler_properties.compilerVersion.minor);
- }
- inline ze_device_graph_properties_t getCompilerProperties() const {
- return compiler_properties;
- }
inline uint32_t getMutableCommandListExtVersion() const {
return mutable_command_list_ext_version;
}
@@ -81,6 +77,10 @@ public:
static const std::shared_ptr<ZeroInitStructsHolder>& getInstance();
+ ze_device_graph_properties_t getCompilerProperties();
+
+ uint32_t getCompilerVersion();
+
private:
void initNpuDriver();
@@ -104,10 +104,12 @@ private:
ze_api_version_t ze_drv_api_version = {};
- ze_device_graph_properties_t compiler_properties = {};
+ std::unique_ptr<ze_device_graph_properties_t> compiler_properties = nullptr;
bool _external_memory_standard_allocation_supported = false;
bool _external_memory_fd_win32_supported = false;
+
+ std::mutex _mutex;
};
} // namespace intel_npu
diff --git a/src/plugins/intel_npu/src/utils/src/zero/zero_init.cpp b/src/plugins/intel_npu/src/utils/src/zero/zero_init.cpp
index 3835b7ec2a0..f0a97ae9055 100644
--- a/src/plugins/intel_npu/src/utils/src/zero/zero_init.cpp
+++ b/src/plugins/intel_npu/src/utils/src/zero/zero_init.cpp
@@ -9,8 +9,6 @@
#include <regex>
-#include "intel_npu/utils/zero/zero_utils.hpp"
-
#ifdef _WIN32
namespace {
constexpr uint32_t WIN_DRIVER_NO_MCL_SUPPORT = 2688;
@@ -304,11 +302,6 @@ ZeroInitStructsHolder::ZeroInitStructsHolder()
THROW_ON_FAIL_FOR_LEVELZERO("zeContextCreate", zeContextCreate(driver_handle, &context_desc, &context));
log.debug("ZeroInitStructsHolder initialize complete");
- // Obtain compiler-in-driver properties
- compiler_properties.stype = ZE_STRUCTURE_TYPE_DEVICE_GRAPH_PROPERTIES;
- auto result = graph_dditable_ext_decorator->pfnDeviceGetGraphProperties(device_handle, &compiler_properties);
- THROW_ON_FAIL_FOR_LEVELZERO("pfnDeviceGetGraphProperties", result);
-
// Discover if standard allocation is supported
ze_device_external_memory_properties_t external_memory_properties_desc = {};
external_memory_properties_desc.stype = ZE_STRUCTURE_TYPE_DEVICE_EXTERNAL_MEMORY_PROPERTIES;
@@ -336,6 +329,26 @@ const std::shared_ptr<ZeroInitStructsHolder>& ZeroInitStructsHolder::getInstance
return instance;
}
+ze_device_graph_properties_t ZeroInitStructsHolder::getCompilerProperties() {
+ std::lock_guard<std::mutex> lock(_mutex);
+ if (!compiler_properties) {
+ // Obtain compiler-in-driver properties
+ compiler_properties = std::make_unique<ze_device_graph_properties_t>();
+ compiler_properties->stype = ZE_STRUCTURE_TYPE_DEVICE_GRAPH_PROPERTIES;
+ auto result =
+ graph_dditable_ext_decorator->pfnDeviceGetGraphProperties(device_handle, compiler_properties.get());
+ THROW_ON_FAIL_FOR_LEVELZERO("pfnDeviceGetGraphProperties", result);
+ }
+ return *compiler_properties;
+}
+
+uint32_t ZeroInitStructsHolder::getCompilerVersion() {
+ if (!compiler_properties) {
+ (void)getCompilerProperties();
+ }
+ return ZE_MAKE_VERSION(compiler_properties->compilerVersion.major, compiler_properties->compilerVersion.minor);
+}
+
ZeroInitStructsHolder::~ZeroInitStructsHolder() {
if (context) {
log.debug("ZeroInitStructsHolder - performing zeContextDestroy");
diff --git a/src/plugins/intel_npu/tests/functional/internal/compiler_adapter/zero_init_mock.cpp b/src/plugins/intel_npu/tests/functional/internal/compiler_adapter/zero_init_mock.cpp
index fba54ae7085..0e067bb7738 100644
--- a/src/plugins/intel_npu/tests/functional/internal/compiler_adapter/zero_init_mock.cpp
+++ b/src/plugins/intel_npu/tests/functional/internal/compiler_adapter/zero_init_mock.cpp
@@ -269,11 +269,6 @@ ZeroInitStructsMock::ZeroInitStructsMock(int extVersion)
THROW_ON_FAIL_FOR_LEVELZERO("zeContextCreate", zeContextCreate(driver_handle, &context_desc, &context));
log.debug("ZeroInitStructsMock initialize complete");
- // Obtain compiler-in-driver properties
- compiler_properties.stype = ZE_STRUCTURE_TYPE_DEVICE_GRAPH_PROPERTIES;
- auto result = graph_dditable_ext_decorator->pfnDeviceGetGraphProperties(device_handle, &compiler_properties);
- THROW_ON_FAIL_FOR_LEVELZERO("pfnDeviceGetGraphProperties", result);
-
// Discover if standard allocation is supported
ze_device_external_memory_properties_t external_memory_properties_desc = {};
external_memory_properties_desc.stype = ZE_STRUCTURE_TYPE_DEVICE_EXTERNAL_MEMORY_PROPERTIES;
diff --git a/src/plugins/intel_npu/tests/functional/internal/compiler_adapter/zero_init_mock.hpp b/src/plugins/intel_npu/tests/functional/internal/compiler_adapter/zero_init_mock.hpp
index b0e9a650df9..dc30bb00f80 100644
--- a/src/plugins/intel_npu/tests/functional/internal/compiler_adapter/zero_init_mock.hpp
+++ b/src/plugins/intel_npu/tests/functional/internal/compiler_adapter/zero_init_mock.hpp
@@ -10,6 +10,7 @@
#include <ze_intel_npu_uuid.h>
#include <memory>
+#include <mutex>
#include "intel_npu/utils/logger/logger.hpp"
#include "intel_npu/utils/zero/zero_api.hpp"
@@ -43,10 +44,12 @@ struct ZeroInitStructsMock {
ze_api_version_t ze_drv_api_version = {};
- ze_device_graph_properties_t compiler_properties = {};
+ std::unique_ptr<ze_device_graph_properties_t> compiler_properties = nullptr;
bool _external_memory_standard_allocation_supported = false;
bool _external_memory_fd_win32_supported = false;
+
+ std::mutex _mutex;
};
} // namespace intel_npu