Skip to content

Ov weight sharing - #37373

Draft
akodanka wants to merge 4 commits into
openvinotoolkit:masterfrom
akodanka:ov_weight_sharing
Draft

Ov weight sharing#37373
akodanka wants to merge 4 commits into
openvinotoolkit:masterfrom
akodanka:ov_weight_sharing

Conversation

@akodanka

Copy link
Copy Markdown
Contributor

Details:

  • item1
  • ...

Tickets:

  • ticket-id

AI Assistance:

  • AI assistance used: no / yes
  • If yes, summarize how AI was used and what human validation was performed (build/tests/manual checks).

Extension::get_constant_origin now derives the weight-sharing identity from
the Constant's buffer descriptor (descriptor id -> source id, descriptor
offset -> bin offset) and falls back to the deprecated
WeightlessCacheAttribute rt_info only when no descriptor is present.

This makes the origin self-describing: consumers such as NPUW no longer need
an ov::weight_sharing::Context threaded through compile properties, and
LiteRT does not need a copy of weight_sharing_util.hpp to build one.

Signed-off-by: Anoob Anto Kodankandath <anoob.anto.kodankandath@intel.com>
Replace NPUW's direct WeightlessCacheAttribute rt_info reads with
ov::npuw::wsh::resolve_origin(), a thin wrapper over
ov::weight_sharing::Extension::get_constant_origin(). Constants that carry a
weight-sharing buffer descriptor are now resolvable in the weights
separation / weightless serialization flows, alongside the existing WLCA
path.

Signed-off-by: Anoob Anto Kodankandath <anoob.anto.kodankandath@intel.com>
TensorMetaInfo gains an optional (m_source_id, m_bin_offset) weight identity.
When m_source_id is non-zero, load_model() builds the ov::op::v0::Constant on
an IdentifiedBuffer carrying a base descriptor with that identity, so
downstream consumers (NPUW) can recover the weight's origin via
Constant->m_data->get_descriptor().

Signed-off-by: Anoob Anto Kodankandath <anoob.anto.kodankandath@intel.com>
Signed-off-by: Anoob Anto Kodankandath <anoob.anto.kodankandath@intel.com>
@github-actions github-actions Bot added category: Core OpenVINO Core (aka ngraph) category: CPP API OpenVINO CPP API bindings category: TFL FE OpenVINO TensorFlow Lite FrontEnd category: NPU OpenVINO NPU plugin category: NPUW NPUW plugin labels Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: Core OpenVINO Core (aka ngraph) category: CPP API OpenVINO CPP API bindings category: NPU OpenVINO NPU plugin category: NPUW NPUW plugin category: TFL FE OpenVINO TensorFlow Lite FrontEnd

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant