[NPUW] validate pyramid attention port indices on deserialize - #37433
Open
darktears wants to merge 1 commit into
Open
[NPUW] validate pyramid attention port indices on deserialize#37433darktears wants to merge 1 commit into
darktears wants to merge 1 commit into
Conversation
### Tickets: - [CVS-192805](https://jira.devtools.intel.com/browse/CVS-192805) ### Details: - Validate pyramid-attention port indices after deserializing compiled models and before using them at runtime. - Reject malformed serialized pyramid state instead of allowing out-of-bounds access into compiled model inputs. - The auto mask_iport assignment now uses `pyramid->_compiled_models[pyramid_id]->inputs().at(dyn_mask_idx);` to ensure invalid serialized metadata fails cleanly with `ov::Exception` instead of indexing past the end of the model input vector. - Add regression coverage for valid, invalid, and malformed serialized pyramid-attention states to lock in the fix for the issue described in CVS-192805. - Preserve the runtime guard in the import/deserialization path where the corrupted pyramid state is rehydrated and attached to compiled models. ### AI Assistance: - AI assistance used: yes - AI found the issue and helped generate the fix and regression coverage. Human validated the regression coverage.
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.
Tickets:
Details:
pyramid->_compiled_models[pyramid_id]->inputs().at(dyn_mask_idx);to ensure invalid serialized metadata fails cleanly withov::Exceptioninstead of indexing past the end of the model input vector.AI Assistance: