Ov weight sharing - #37373
Draft
akodanka wants to merge 4 commits into
Draft
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details:
Tickets:
AI Assistance: