Skip to content

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

[NPU] Fix compiler options (#31748)

Bogdan Pereanu2c21520a037d
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 f9682b94338..658391d873f 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
@@ -315,7 +315,7 @@ struct CACHE_MODE final : OptionBase<CACHE_MODE, ov::CacheMode> {
}
static uint32_t compilerSupportVersion() {
- return ONEAPI_MAKE_VERSION(7, 21);
+ return ONEAPI_MAKE_VERSION(7, 23);
}
static ov::CacheMode parse(std::string_view val) {
@@ -1244,7 +1244,7 @@ struct QDQ_OPTIMIZATION_AGGRESSIVE final : OptionBase<QDQ_OPTIMIZATION_AGGRESSIV
}
static uint32_t compilerSupportVersion() {
- return ONEAPI_MAKE_VERSION(7, 21);
+ return ONEAPI_MAKE_VERSION(7, 25);
}
};
@@ -1339,7 +1339,7 @@ struct WEIGHTLESS_BLOB final : OptionBase<WEIGHTLESS_BLOB, bool> {
}
static uint32_t compilerSupportVersion() {
- return ONEAPI_MAKE_VERSION(7, 21);
+ return ONEAPI_MAKE_VERSION(7, 23);
}
};
diff --git a/src/plugins/intel_npu/src/compiler_adapter/src/ze_graph_ext_wrappers.cpp b/src/plugins/intel_npu/src/compiler_adapter/src/ze_graph_ext_wrappers.cpp
index 21e6396c752..c46647b9ed8 100644
--- a/src/plugins/intel_npu/src/compiler_adapter/src/ze_graph_ext_wrappers.cpp
+++ b/src/plugins/intel_npu/src/compiler_adapter/src/ze_graph_ext_wrappers.cpp
@@ -591,6 +591,17 @@ std::string ZeGraphExtWrappers::getCompilerSupportedOptions() const {
if (_graphExtVersion < ZE_MAKE_VERSION(1, 11)) {
return {};
}
+
+#ifdef _WIN32
+ // Driver shall return NO_THROW_ON_UNSUPPORTED_FEATURE as supported to go further here
+ if (_zeroInitStruct->getGraphDdiTable().pfnCompilerIsOptionSupported(_zeroInitStruct->getDevice(),
+ ZE_NPU_DRIVER_OPTIONS,
+ "NO_THROW_ON_UNSUPPORTED_FEATURE",
+ nullptr) != ZE_RESULT_SUCCESS) {
+ return {};
+ }
+#endif
+
// 1. ask driver for size of compiler supported options list
_logger.debug("pfnCompilerGetSupportedOptions - obtain string size");
size_t str_size = 0;
@@ -639,6 +650,17 @@ bool ZeGraphExtWrappers::isOptionSupported(std::string optname) const {
if (_graphExtVersion < ZE_MAKE_VERSION(1, 11)) {
return false;
}
+
+#ifdef _WIN32
+ // Driver shall return NO_THROW_ON_UNSUPPORTED_FEATURE as supported to go further here
+ if (_zeroInitStruct->getGraphDdiTable().pfnCompilerIsOptionSupported(_zeroInitStruct->getDevice(),
+ ZE_NPU_DRIVER_OPTIONS,
+ "NO_THROW_ON_UNSUPPORTED_FEATURE",
+ nullptr) != ZE_RESULT_SUCCESS) {
+ return false;
+ }
+#endif
+
const char* optname_ch = optname.c_str();
auto result = _zeroInitStruct->getGraphDdiTable().pfnCompilerIsOptionSupported(_zeroInitStruct->getDevice(),
ZE_NPU_COMPILER_OPTIONS,