diff --git a/src/plugins/intel_npu/src/compiler_adapter/include/driver_compiler_adapter.hpp b/src/plugins/intel_npu/src/compiler_adapter/include/driver_compiler_adapter.hpp index 3a2af03df8cead..daf401100e6239 100644 --- a/src/plugins/intel_npu/src/compiler_adapter/include/driver_compiler_adapter.hpp +++ b/src/plugins/intel_npu/src/compiler_adapter/include/driver_compiler_adapter.hpp @@ -55,7 +55,7 @@ class DriverCompilerAdapter final : public ICompilerAdapter { std::shared_ptr _zeroInitStruct; std::shared_ptr _zeGraphExt; - ze_device_graph_properties_t _deviceGraphProperties = {}; + ze_device_graph_properties_t _compilerProperties = {}; Logger _logger; }; diff --git a/src/plugins/intel_npu/src/compiler_adapter/src/driver_compiler_adapter.cpp b/src/plugins/intel_npu/src/compiler_adapter/src/driver_compiler_adapter.cpp index 1d19854618a237..624ba448fed44f 100644 --- a/src/plugins/intel_npu/src/compiler_adapter/src/driver_compiler_adapter.cpp +++ b/src/plugins/intel_npu/src/compiler_adapter/src/driver_compiler_adapter.cpp @@ -145,10 +145,7 @@ DriverCompilerAdapter::DriverCompilerAdapter(const std::shared_ptrgetGraphDdiTable().version(); - _deviceGraphProperties.stype = ZE_STRUCTURE_TYPE_DEVICE_GRAPH_PROPERTIES; - auto result = _zeroInitStruct->getGraphDdiTable().pfnDeviceGetGraphProperties(_zeroInitStruct->getDevice(), - &_deviceGraphProperties); - THROW_ON_FAIL_FOR_LEVELZERO_EXT("pfnDeviceGetGraphProperties", result, _zeroInitStruct->getGraphDdiTable()); + _compilerProperties = _zeroInitStruct->getCompilerProperties(); _logger.info("DriverCompilerAdapter creating adapter using graphExtVersion"); @@ -163,8 +160,8 @@ std::shared_ptr DriverCompilerAdapter::compile(const std::shared_ptr()); // TODO: generation of available backends list can be done during execution of CMake scripts std::vector backendRegistry; 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 e96d47445534ba..3178aecd182759 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 @@ -50,7 +50,10 @@ class ZeroInitStructsHolder final { return driver_properties.driverVersion; } inline uint32_t getCompilerVersion() const { - return compiler_version; + 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 getMutableCommandListVersion() const { return mutable_command_list_version; @@ -89,7 +92,7 @@ class ZeroInitStructsHolder final { ze_api_version_t ze_drv_api_version = {}; - uint32_t compiler_version = 0; + ze_device_graph_properties_t compiler_properties = {}; }; } // 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 ff2daaccafb775..135f648d5975e1 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 @@ -313,12 +313,10 @@ ZeroInitStructsHolder::ZeroInitStructsHolder() : log("NPUZeroInitStructsHolder", THROW_ON_FAIL_FOR_LEVELZERO("zeContextCreate", zeContextCreate(driver_handle, &context_desc, &context)); log.debug("ZeroInitStructsHolder initialize complete"); - // Obtain compiler-in-driver (vcl) version - ze_device_graph_properties_t graph_props; - graph_props.stype = ZE_STRUCTURE_TYPE_DEVICE_GRAPH_PROPERTIES; - auto result = graph_dditable_ext_decorator->pfnDeviceGetGraphProperties(device_handle, &graph_props); + // 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); - compiler_version = ZE_MAKE_VERSION(graph_props.compilerVersion.major, graph_props.compilerVersion.minor); } ZeroInitStructsHolder::~ZeroInitStructsHolder() {