Improve MLOps NPU validation and context-aware listing - #2575
Conversation
Select default hardware and simulator targets by capability, using their declaration position as starting point. Restrict NPU listings to the selected device processor. Warn when explicit NPU requirements do not match DFP info.
f9b8927 to
177c7c1
Compare
There was a problem hiding this comment.
Pull request overview
This PR improves ProjMgr’s MLOps behavior by making implicit target resolution more flexible, adding validation warnings when MLOps NPU requirements don’t match DFP device capabilities, and making list npus context-aware (restricted to the selected device/processor).
Changes:
- Update implicit MLOps target-type/target-set resolution to search in declaration order (hardware) or reverse order (simulator).
- Emit warnings when
mlops.npu.typeand/ormlops.npu.macsdon’t match NPU capabilities derived from DFP device information. - Restrict
list npusoutput to the processor selected by a context, and add unit coverage plus a new test solution for mismatch scenarios.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tools/projmgr/test/src/ProjMgrUnitTests.cpp | Adds unit tests for context-filtered NPU listings and for NPU mismatch warnings during MLOps generation. |
| tools/projmgr/test/data/MLOps/npu_mismatch.csolution.yml | Introduces a test solution that intentionally mismatches NPU MACs vs DFP capabilities for warning validation. |
| tools/projmgr/src/ProjMgrWorker.cpp | Ensures list npus respects the selected context’s processor when collecting NPU info. |
| tools/projmgr/src/ProjMgrMlops.cpp | Improves implicit target resolution and adds warnings for NPU type/MAC mismatches against DFP-derived NPU capabilities. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Test Results 2 files - 41 14 suites - 113 13m 25s ⏱️ - 4m 8s Results for commit 68d56a6. ± Comparison against base commit c629175. This pull request removes 634 tests.♻️ This comment has been updated with latest results. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2575 +/- ##
==========================================
- Coverage 72.13% 72.13% -0.01%
==========================================
Files 185 185
Lines 30198 30221 +23
Branches 17813 17825 +12
==========================================
+ Hits 21784 21800 +16
- Misses 6107 6110 +3
- Partials 2307 2311 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Fixes
Note in the reproducer attached to the issue the hardware and simulator targets are in the wrong order.
Changes
list npusresults to the device and processor selected by a context.Checklist