Skip to content

[NPU][WS] Remove the references towards original weights sooner during init execution#34072

Merged
razvanapetroaie merged 4 commits intoopenvinotoolkit:masterfrom
razvanapetroaie:ws-release-weights-earlier
Feb 16, 2026
Merged

[NPU][WS] Remove the references towards original weights sooner during init execution#34072
razvanapetroaie merged 4 commits intoopenvinotoolkit:masterfrom
razvanapetroaie:ws-release-weights-earlier

Conversation

@razvanapetroaie
Copy link
Contributor

Details:

  • This is an optimization that should decrease the memory consumed by the execution of the init schedules.
  • Note that, since in these changes we are freeing shared_ptr objects sooner, the benefit of this optimization can be observed only if the NPU plugin was the only component to hold the original weights pointers. Therefore, in cases such as the compilation flow, we don't expect to see any impact (the user holds a pointer towards the model, and implictly all original weights). But there might be an impact on the import flow, if the weights_path config option is used. Atm, no meaningful measurements have been taken.

andrey-golubev and others added 2 commits February 11, 2026 15:11
Move the OV model through compilation pipeline to allow earlier deletion
of it. In theory, this should enable early deletion of original weights
and in turn reduce the RAM footprint of WS schedule.

This seems possible due to OV model being always cloned internally for
the compilation.
@github-actions github-actions bot added the category: NPU OpenVINO NPU plugin label Feb 11, 2026
@razvanapetroaie razvanapetroaie marked this pull request as ready for review February 11, 2026 19:43
@razvanapetroaie razvanapetroaie requested review from a team as code owners February 11, 2026 19:43
@razvanapetroaie razvanapetroaie added this pull request to the merge queue Feb 16, 2026
Merged via the queue into openvinotoolkit:master with commit d2f4173 Feb 16, 2026
186 checks passed
@razvanapetroaie razvanapetroaie deleted the ws-release-weights-earlier branch February 16, 2026 12:53
Naseer-010 pushed a commit to Naseer-010/openvino that referenced this pull request Feb 18, 2026
…g init execution (openvinotoolkit#34072)

### Details:
- This is an optimization that should decrease the memory consumed by
the execution of the init schedules.
- Note that, since in these changes we are freeing `shared_ptr` objects
sooner, the benefit of this optimization can be observed only if the NPU
plugin was the only component to hold the original weights pointers.
Therefore, in cases such as the compilation flow, we don't expect to see
any impact (the user holds a pointer towards the model, and implictly
all original weights). But there might be an impact on the import flow,
if the `weights_path` config option is used. Atm, no meaningful
measurements have been taken.

---------

Co-authored-by: Golubev, Andrey <andrey.golubev@intel.com>
wilson-seok pushed a commit to wilson-seok/openvino that referenced this pull request Feb 19, 2026
…g init execution (openvinotoolkit#34072)

### Details:
- This is an optimization that should decrease the memory consumed by
the execution of the init schedules.
- Note that, since in these changes we are freeing `shared_ptr` objects
sooner, the benefit of this optimization can be observed only if the NPU
plugin was the only component to hold the original weights pointers.
Therefore, in cases such as the compilation flow, we don't expect to see
any impact (the user holds a pointer towards the model, and implictly
all original weights). But there might be an impact on the import flow,
if the `weights_path` config option is used. Atm, no meaningful
measurements have been taken.

---------

Co-authored-by: Golubev, Andrey <andrey.golubev@intel.com>
mvafin pushed a commit to mvafin/openvino that referenced this pull request Feb 20, 2026
…g init execution (openvinotoolkit#34072)

### Details:
- This is an optimization that should decrease the memory consumed by
the execution of the init schedules.
- Note that, since in these changes we are freeing `shared_ptr` objects
sooner, the benefit of this optimization can be observed only if the NPU
plugin was the only component to hold the original weights pointers.
Therefore, in cases such as the compilation flow, we don't expect to see
any impact (the user holds a pointer towards the model, and implictly
all original weights). But there might be an impact on the import flow,
if the `weights_path` config option is used. Atm, no meaningful
measurements have been taken.

---------

Co-authored-by: Golubev, Andrey <andrey.golubev@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: NPU OpenVINO NPU plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants