Skip to content

Conversation

@dylanneve1
Copy link

@dylanneve1 dylanneve1 commented Jan 29, 2026

Introduces the NPUW_DUMP_SUBS_DIR configuration option for specifying NPUW dump directory. When NPUW_DUMP_SUBS is enabled, the plugin will now generate JSON files (.sg format) containing the pipeline structure, including unique subgraphs and their repetitions.

Details:

  • Adds feature for specifying dump output directory and dumping decomposed model information to JSON.

Tickets:

@dylanneve1 dylanneve1 requested review from a team as code owners January 29, 2026 15:33
@github-actions github-actions bot added category: NPU OpenVINO NPU plugin category: NPUW NPUW plugin labels Jan 29, 2026
@sys-openvino-ci sys-openvino-ci added the ExternalPR External contributor label Jan 29, 2026
@dylanneve1 dylanneve1 force-pushed the EISW-196509 branch 3 times, most recently from e065500 to c221f5e Compare January 30, 2026 10:19
Copy link
Contributor

@dmatveev dmatveev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for the first PR! Here's some comments though.

  • Is the PR description up to date? I belive there's no mentioned option in place now?
  • I believe you're familiar now with the attention mechanisms and the way we handle it, would your schema reflect such structure with e.g. a PYRAMID hint? How would it look like?

if (subgraph_counts.find(name) == subgraph_counts.end()) {
subgraph_order.push_back(name);
}
subgraph_counts[name]++;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I believe you're counting by name(s) which you synthesize yourself based on real_id.. Are you sure these names match the subgraph names as we dump them? What I see here you reconstruct the same format but if it changes during the dump procedure well'get a discrepancy

Don't we have this name specified as the subgraph's ov::Model's friendly_name? I don't remember.

Probably it makes sense to:

  1. Introduce a tiny helper method here to format you a subgraph name - the way it'll be dumped - and use it in both places
  2. Simplify the counting method - you can just traverse through orderedSubgraphs and collect their .replaced_by() to a set. This set will give you a list of uniqe subgraphs.. so then you iterate over it again and poll their names

@dylanneve1 dylanneve1 force-pushed the EISW-196509 branch 3 times, most recently from ab4a46e to 84bb68f Compare January 30, 2026 13:32
@dmatveev dmatveev added this to the 2026.1 milestone Jan 30, 2026
@dylanneve1 dylanneve1 force-pushed the EISW-196509 branch 3 times, most recently from 047b116 to 29f2f2a Compare February 3, 2026 16:03
Introduces the NPUW_DUMP_SUBS_COMPOSITION configuration option. When enabled, generates a JSON file (.sg) containing the pipeline structure, including unique subgraphs and their repetitions. Also adds NPUW_DUMP_SUBS_DIR option to specify output directory.
Remove dedicated NPUW_DUMP_SUBS_COMPOSITION option. The .sg file is now
automatically generated whenever subgraphs are dumped via NPUW_DUMP_SUBS.
Remove unnecessary "./" prefix from subgraph paths in the JSON output.
Refactor path construction in dump_subgraph_model and dump_subgraph_composition to use ov::util::join_path instead of manual string with dir_prefix.
- Reorder includes alphabetically (fstream before iostream)
- Fix indentation alignment for multi-line statements
- Introduce format_subgraph_name() helper to ensure consistent naming
- Simplify dump_subgraph_composition() to use replaced_by() for unique subgraphs
- Update all dump paths to use the helper method
…FA logic

- Use format_subgraph_name helper for consistent naming
- Always use first occurrence's id for subgraph names (matches dump)
- Optimize counting of subgraph repetitions (single-pass)
- Fix MoE early-return logic: pyramid/HFA files only listed when MoE is NOT present
- Add clarifying comments about naming, ordering, and dump logic
- Ensure composition file matches actual dumped files
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 ExternalPR External contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants