Skip to content

[NPUW] validate pyramid attention port indices on deserialize - #37433

Open
darktears wants to merge 1 commit into
openvinotoolkit:masterfrom
darktears:CVS-192805
Open

[NPUW] validate pyramid attention port indices on deserialize#37433
darktears wants to merge 1 commit into
openvinotoolkit:masterfrom
darktears:CVS-192805

Conversation

@darktears

Copy link
Copy Markdown
Contributor

Tickets:

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.

### 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: NPU OpenVINO NPU plugin category: NPUW NPUW plugin ExternalIntelPR External contributor from Intel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants