microsoft / microsoft/winml-cli
P1-FEATURE-011: Optimization Report — Graph Change Verbose Output
Open
@DingmaomaoBJTU is already working on this.
Since Mar 31, 2026.
dev experience
feature scale
graph-optimizer
P1
triaged
- Dominant language
- Python
- Stars
- 40
- Forks
- 11
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 50
Description
Summary
Implement a detailed optimization report that shows node-level changes made by the graph optimizer — before/after diff, per-capability breakdown, and graph size reduction statistics.
Context
Users and developers need detailed visibility into what the graph optimizer changed. This complements the build report (#P1-FEATURE-010) with a deep-dive into optimization decisions.
From plans/release/0501_release_plan/P0_CHECKLIST.md (P1-FEATURE-011).
Current State
- Graph optimizer applies transformations but doesn't generate a change log
- Users can't tell which optimization pass changed what
- Related: #312 (verbose log for graph optimizer), #311 (metadata for rewrite results)
Desired State
artifacts/optimization_report.jsongenerated after eachwmk buildrun- Content:
- Per-pass summary: pass name, nodes removed/added/modified
- Node-level diff: before/after for each changed node
- Graph size reduction: node count delta, model size delta (MB)
- Per-capability breakdown: which optimizations were applied/skipped
Acceptance Criteria
-
artifacts/optimization_report.jsongenerated on everywmk buildrun - Per-pass record: pass name, nodes removed/added/modified count
- Node-level changes: for each modified node, record op type + change type (fused/removed/rewritten)
- Graph size reduction statistics: total node delta, size delta
-
--verboseflag: show full per-node diff in console output - All existing tests pass
Technical Notes
- Collect change events during each optimizer pass (observer pattern or pass return value)
- Follow-up on #312 and #311 — this issue is the unified report implementation
- Report schema must be stable (will be public API)
Related Files
plans/release/0501_release_plan/feature-scale.md— P1.11 Optimization Reportplans/release/0501_release_plan/P0_CHECKLIST.md— P1-FEATURE-011- #312 — verbose log feature request
- #311 — metadata for rewrite results
- #313 — keep op metadata after fusion
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.