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 a170701cc911e2..eae1403b0bddb4 100644 --- a/src/plugins/intel_npu/src/backend/include/zero_utils.hpp +++ b/src/plugins/intel_npu/src/backend/include/zero_utils.hpp @@ -8,8 +8,6 @@ #include #include -#include - #include "intel_npu/al/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_init.cpp b/src/plugins/intel_npu/src/backend/src/zero_init.cpp index 7e34176259d7d0..5a00938115e53e 100644 --- a/src/plugins/intel_npu/src/backend/src/zero_init.cpp +++ b/src/plugins/intel_npu/src/backend/src/zero_init.cpp @@ -165,6 +165,35 @@ ZeroInitStructsHolder::ZeroInitStructsHolder() : log("NPUZeroInitStructsHolder", zeDriverGetExtensionFunctionAddress(driver_handle, graph_ext_name.c_str(), reinterpret_cast(&graph_ddi_table_ext))); + #ifdef NPU_PLUGIN_DEVELOPER_BUILD + auto graphExtManualConfig = std::getenv("GRAPH_EXT_VERSION_MANUAL"); + if (graphExtManualConfig != nullptr) { + if (strcmp(graphExtManualConfig, "ZE_extension_graph_1_8") == 0) { + log.info("With GRAPH_EXT_VERSION_MANUAL. Using ZE_GRAPH_EXT_VERSION_1_8"); + graph_ext_version = ZE_GRAPH_EXT_VERSION_1_8; + } else if (strcmp(graphExtManualConfig, "ZE_extension_graph_1_7") == 0) { + log.info("With GRAPH_EXT_VERSION_MANUAL. Using ZE_GRAPH_EXT_VERSION_1_7"); + graph_ext_version = ZE_GRAPH_EXT_VERSION_1_7; + } else if (strcmp(graphExtManualConfig, "ZE_extension_graph_1_6") == 0) { + log.info("With GRAPH_EXT_VERSION_MANUAL. Using ZE_GRAPH_EXT_VERSION_1_6"); + graph_ext_version = ZE_GRAPH_EXT_VERSION_1_6; + } else if (strcmp(graphExtManualConfig, "ZE_extension_graph_1_5") == 0) { + log.info("With GRAPH_EXT_VERSION_MANUAL. Using ZE_GRAPH_EXT_VERSION_1_5"); + graph_ext_version = ZE_GRAPH_EXT_VERSION_1_5; + } else if (strcmp(graphExtManualConfig, "ZE_extension_graph_1_4") == 0) { + log.info("With GRAPH_EXT_VERSION_MANUAL. Using ZE_GRAPH_EXT_VERSION_1_4"); + graph_ext_version = ZE_GRAPH_EXT_VERSION_1_4; + } else if (strcmp(graphExtManualConfig, "ZE_extension_graph_1_3") == 0) { + log.info("With GRAPH_EXT_VERSION_MANUAL. Using ZE_GRAPH_EXT_VERSION_1_3"); + graph_ext_version = ZE_GRAPH_EXT_VERSION_1_3; + } else if (strcmp(graphExtManualConfig, "ZE_extension_graph_1_2") == 0) { + log.info("With GRAPH_EXT_VERSION_MANUAL. Using ZE_GRAPH_EXT_VERSION_1_2"); + graph_ext_version = ZE_GRAPH_EXT_VERSION_1_2; + } else { + log.info("With GRAPH_EXT_VERSION_AUTO."); + } + } + #endif graph_dditable_ext_decorator = std::make_unique(graph_ddi_table_ext, graph_ext_version);