diff --git a/src/plugins/intel_npu/src/compiler_adapter/include/ze_graph_ext_wrapper.hpp b/src/plugins/intel_npu/src/compiler_adapter/include/ze_graph_ext_wrapper.hpp index 93a9a53dacb53d..e1b4e91cf4356c 100644 --- a/src/plugins/intel_npu/src/compiler_adapter/include/ze_graph_ext_wrapper.hpp +++ b/src/plugins/intel_npu/src/compiler_adapter/include/ze_graph_ext_wrapper.hpp @@ -71,7 +71,7 @@ class ZeGraphExtWrappers final : public ZeGraphExtWrappersInterface { void setGraphArgumentValue(ze_graph_handle_t graphHandle, uint32_t argi_, const void* argv) const override; - void initializeGraph(ze_graph_handle_t graphHandle, const Config& config, std::optional> /* unusedBlobOpt */) const override; + void initializeGraph(ze_graph_handle_t graphHandle, const Config& config) const override; private: template = true> diff --git a/src/plugins/intel_npu/src/compiler_adapter/include/ze_graph_ext_wrapper_interface.hpp b/src/plugins/intel_npu/src/compiler_adapter/include/ze_graph_ext_wrapper_interface.hpp index 58a22aefaf8512..ac44f9853e11e3 100644 --- a/src/plugins/intel_npu/src/compiler_adapter/include/ze_graph_ext_wrapper_interface.hpp +++ b/src/plugins/intel_npu/src/compiler_adapter/include/ze_graph_ext_wrapper_interface.hpp @@ -34,7 +34,7 @@ class ZeGraphExtWrappersInterface { virtual void setGraphArgumentValue(ze_graph_handle_t graphHandle, uint32_t argi_, const void* argv) const = 0; - virtual void initializeGraph(ze_graph_handle_t graphHandle, const Config& config, std::optional> blobOpt) const = 0; + virtual void initializeGraph(ze_graph_handle_t graphHandle, const Config& config) const = 0; virtual ~ZeGraphExtWrappersInterface() = default; }; diff --git a/src/plugins/intel_npu/src/compiler_adapter/src/driver_graph.cpp b/src/plugins/intel_npu/src/compiler_adapter/src/driver_graph.cpp index 50db31fa16b988..640adeb21bfc02 100644 --- a/src/plugins/intel_npu/src/compiler_adapter/src/driver_graph.cpp +++ b/src/plugins/intel_npu/src/compiler_adapter/src/driver_graph.cpp @@ -117,7 +117,9 @@ void DriverGraph::initialize(const Config& config) { set_workload_type(config.get()); } - _zeGraphExt->initializeGraph(_handle, config, std::move(_blob)); + _zeGraphExt->initializeGraph(_handle, config); + _blob.clear(); + _blob.shrink_to_fit(); _logger.debug("Graph initialize finish"); } diff --git a/src/plugins/intel_npu/src/compiler_adapter/src/plugin_graph.cpp b/src/plugins/intel_npu/src/compiler_adapter/src/plugin_graph.cpp index c1479e6902c2ab..097d0a3820e160 100644 --- a/src/plugins/intel_npu/src/compiler_adapter/src/plugin_graph.cpp +++ b/src/plugins/intel_npu/src/compiler_adapter/src/plugin_graph.cpp @@ -116,7 +116,9 @@ void PluginGraph::initialize(const Config& config) { set_workload_type(config.get()); } - _zeGraphExt->initializeGraph(_handle, config, std::move(_blob)); + _zeGraphExt->initializeGraph(_handle, config); + _blob.clear(); + _blob.shrink_to_fit(); _logger.debug("Graph initialize finish"); } diff --git a/src/plugins/intel_npu/src/compiler_adapter/src/ze_graph_ext_wrapper.cpp b/src/plugins/intel_npu/src/compiler_adapter/src/ze_graph_ext_wrapper.cpp index 60e8f035d119af..3f87fe9d050725 100644 --- a/src/plugins/intel_npu/src/compiler_adapter/src/ze_graph_ext_wrapper.cpp +++ b/src/plugins/intel_npu/src/compiler_adapter/src/ze_graph_ext_wrapper.cpp @@ -145,7 +145,7 @@ void ZeGraphExtWrappers::setGraphArgumentValue(ze_graph_handle_t } template -void ZeGraphExtWrappers::initializeGraph(ze_graph_handle_t graphHandle, const Config& config, std::optional> /* unusedBlob */) const { +void ZeGraphExtWrappers::initializeGraph(ze_graph_handle_t graphHandle, const Config& config) const { if (_zeroInitStruct->getGraphDdiTable().version() < ZE_GRAPH_EXT_VERSION_1_8) { initialize_graph_through_command_list(graphHandle, config); } else {