Commit 45921fa
authored
[NPU] Model marshalling: fallback to copying weights for all unhandled Constant nodes (#33068)
### Details:
- The [new model marshalling
algorithm](#31939) is
not handling subgraphs properly. See [this code
passage](https://github.com/openvinotoolkit/openvino/blob/0f37471fb697a07c46f03c01dedb624c85628b34/src/plugins/intel_npu/src/compiler_adapter/src/vcl_serializer.cpp#L152-L163):
the attribute is added only on `ov::Constant` nodes found at depth level
one. Models within models, which may be registered as "subgraph
operators" (e.g. `TensorIterator`) are omitted. In this current state,
the attribute is required on all constant nodes, otherwise the run will
fail at the deserialization stage.
- As a temporary fix to unblock [this
PR](#30732), all
constant nodes that have been omitted will have their weights copied in
a separate buffer. We may consider this a safety measure for now, with
no real impact on performance. The impact can be great if, say, a model
has a huge submodel within it, but the data we've gathered so far
suggests these cases are not frequent (none of our models from the CI
validation jobs use this feature).
### Tickets:
- *CVS-177414*1 parent f77f0f6 commit 45921fa
File tree
2 files changed
+32
-1
lines changed- src/plugins/intel_npu/src/compiler_adapter
- include
- src
2 files changed
+32
-1
lines changedLines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
48 | 52 | | |
49 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
50 | 60 | | |
51 | 61 | | |
52 | 62 | | |
| |||
56 | 66 | | |
57 | 67 | | |
58 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
59 | 76 | | |
| 77 | + | |
60 | 78 | | |
61 | 79 | | |
62 | 80 | | |
| |||
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
14 | 27 | | |
15 | 28 | | |
16 | 29 | | |
| |||
0 commit comments