Skip to content

[NPUW] Fix failsafe port mapping for imported NPUW-cached models#35635

Open
OrestChura wants to merge 3 commits intoopenvinotoolkit:masterfrom
OrestChura:oc/npuw-fix-failsafe-inferrequest-port
Open

[NPUW] Fix failsafe port mapping for imported NPUW-cached models#35635
OrestChura wants to merge 3 commits intoopenvinotoolkit:masterfrom
OrestChura:oc/npuw-fix-failsafe-inferrequest-port

Conversation

@OrestChura
Copy link
Copy Markdown
Contributor

@OrestChura OrestChura commented May 1, 2026

Details:

  • map failsafe wrapper ports to inner compiled-model ports by (is_output, idx)
    (implemented in a new method ov::npuw::failsafe::InferRequest::map_to_inner_port_locked())

    • the idea is to add the logic similar to ov::npuw::accuracy_checked::InferRequest
  • use the mapped inner ports in infer(), get_tensor(), and set_tensor()

  • add require_port() helper for ov::npuw::failsafe::InferRequest

  • Add regression test for failsafe imported-port remapping which

    • Simulates a restored inner compiled model whose input and output names differ from the outer failsafe wrapper model.
    • Verifies that failsafe still accepts outer set_tensor calls, runs infer, and returns the expected tensors and values.
    • Ensures port mapping relies on input/output side and index, not reconstructed friendly names.
    • Guards against the cached model regression where a restored inner request fails with “Cannot find tensor for port ...”.

Tickets:

AI Assistance:

  • AI assistance used: yes
    • debugging the problem
    • generating proper fix
    • generating the test
    • generating the comments and descriptions

- map failsafe wrapper ports to inner compiled-model ports by (is_output, idx)
- use the mapped inner ports in infer(), get_tensor(), and set_tensor()
- add require_port() helper to ov::npuw::failsafe::InferRequest
The test:
- Simulates a restored inner compiled model whose input and output names
differ from the outer failsafe wrapper model.
- Verifies that failsafe still accepts outer set_tensor calls, runs infer,
and returns the expected tensors and values.
- Ensures port mapping relies on input/output side and index, not
reconstructed friendly names.
- Guards against the cached model regression where a restored inner
request fails with “Cannot find tensor for port ...”.
@OrestChura OrestChura requested review from AsyaPronina and sshumihi May 1, 2026 14:26
@OrestChura OrestChura requested review from a team as code owners May 1, 2026 14:26
@github-actions github-actions Bot added category: NPU OpenVINO NPU plugin category: NPUW NPUW plugin labels May 1, 2026
@dmatveev
Copy link
Copy Markdown
Contributor

dmatveev commented May 4, 2026

Simulates a restored inner compiled model whose input and output names differ from the outer failsafe wrapper model.

So how can this be possible? They're all compiled from the same source IR?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants