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 94f2c4ce06ee61..01b2de868e7572 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 @@ -52,6 +52,9 @@ class ZeroInitStructsHolder final { inline uint32_t getMutableCommandListVersion() const { return mutable_command_list_version; } + inline ze_api_version_t getZeDrvApiVersion() const { + return ze_drv_api_version; + } // Helper function to check if extension with exists and its newer than inline bool isExtensionSupported(std::string ext_name, uint32_t version) const { auto iter = driver_extension_properties.find(ext_name); @@ -78,6 +81,8 @@ class ZeroInitStructsHolder final { ze_driver_properties_t driver_properties = {}; uint32_t mutable_command_list_version = 0; + + ze_api_version_t ze_drv_api_version = {}; }; } // 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 ac6e3c2306f39c..e87f8db788b9b8 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 @@ -79,7 +79,6 @@ ZeroInitStructsHolder::ZeroInitStructsHolder() : log("NPUZeroInitStructsHolder", } // Check L0 API version - ze_api_version_t ze_drv_api_version = {}; THROW_ON_FAIL_FOR_LEVELZERO("zeDriverGetApiVersion", zeDriverGetApiVersion(driver_handle, &ze_drv_api_version)); if (ZE_MAJOR_VERSION(ZE_API_VERSION_CURRENT) != ZE_MAJOR_VERSION(ze_drv_api_version)) { diff --git a/src/plugins/intel_npu/src/utils/src/zero/zero_wrappers.cpp b/src/plugins/intel_npu/src/utils/src/zero/zero_wrappers.cpp index 96028755671da7..858e65d4b5e6ee 100644 --- a/src/plugins/intel_npu/src/utils/src/zero/zero_wrappers.cpp +++ b/src/plugins/intel_npu/src/utils/src/zero/zero_wrappers.cpp @@ -108,7 +108,11 @@ CommandList::~CommandList() { } void CommandList::updateMutableCommandList(uint32_t arg_index, const void* arg_value) const { ze_mutable_graph_argument_exp_desc_t desc = { - static_cast(ZE_STRUCTURE_TYPE_MUTABLE_GRAPH_ARGUMENT_EXP_DESC_DEPRECATED), + (ZE_MAJOR_VERSION(_initStructs->getZeDrvApiVersion()) > 1 || + (ZE_MAJOR_VERSION(_initStructs->getZeDrvApiVersion()) == 1 && + ZE_MINOR_VERSION(_initStructs->getZeDrvApiVersion()) >= 11)) + ? ZE_STRUCTURE_TYPE_MUTABLE_GRAPH_ARGUMENT_EXP_DESC + : static_cast(ZE_STRUCTURE_TYPE_MUTABLE_GRAPH_ARGUMENT_EXP_DESC_DEPRECATED), nullptr, _command_id, arg_index,