Skip to content

Improve MLOps NPU validation and context-aware listing - #2575

Merged
brondani merged 2 commits into
mainfrom
improve-mlops-npu-validation
Aug 25, 2026
Merged

Improve MLOps NPU validation and context-aware listing#2575
brondani merged 2 commits into
mainfrom
improve-mlops-npu-validation

Conversation

@brondani

@brondani brondani commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Fixes

Changes

  • Make implicit MLOps target resolution more flexible: for hardware targets, search from the top down; for simulator targets, search from the bottom up. Do not restrict the search to only the first and last entries, as strictly defined in the specification.
  • Warn when configured MLOps NPU type or MAC count does not match DFP device information.
  • Restrict list npus results to the device and processor selected by a context.
  • Add unit coverage for context-filtered NPU listings and mismatched NPU requirements.

Checklist

  • 🤖 This change is covered by unit tests (if applicable).
  • 🤹 Manual testing has been performed (if necessary).
  • 🛡️ Security impacts have been considered (if relevant).
  • 📖 Documentation updates are complete (if required).
  • 🧠 Third-party dependencies and TPIP updated (if required).

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.
@brondani
brondani force-pushed the improve-mlops-npu-validation branch from f9b8927 to 177c7c1 Compare August 24, 2026 13:44
@brondani
brondani requested a lite review from Copilot August 24, 2026 13:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.type and/or mlops.npu.macs don’t match NPU capabilities derived from DFP device information.
  • Restrict list npus output 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.

Comment thread tools/projmgr/test/src/ProjMgrUnitTests.cpp Outdated
@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown

Test Results

  2 files   -    41   14 suites   - 113   13m 25s ⏱️ - 4m 8s
481 tests  -   634  481 ✅  -   617  0 💤  - 17  0 ❌ ±0 
962 runs   - 1 407  962 ✅  - 1 349  0 💤  - 58  0 ❌ ±0 

Results for commit 68d56a6. ± Comparison against base commit c629175.

This pull request removes 634 tests.
AuxCmdTests ‑ MkdirCmdTest
AuxCmdTests ‑ RmdirCmdTest
AuxCmdTests ‑ TouchCmdTest
BuildSystemGeneratorTests ‑ GenAuditFile
BuildSystemGeneratorTests ‑ GenAuditFile_WithOut_Existing_Audit_File
BuildSystemGeneratorTests ‑ GenAuditFile_With_Existing_Audit_File
BuildSystemGeneratorTests ‑ GetString
BuildSystemGeneratorTests ‑ StrConv
BuildSystemGeneratorTests ‑ StrNorm
CBuildGCCTests ‑ Asm
…

♻️ This comment has been updated with latest results.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@brondani
brondani marked this pull request as ready for review August 24, 2026 14:29
@brondani
brondani requested a review from edriouk August 24, 2026 14:29
@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.37838% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.13%. Comparing base (c629175) to head (68d56a6).

Files with missing lines Patch % Lines
tools/projmgr/src/ProjMgrMlops.cpp 86.66% 2 Missing and 2 partials ⚠️
tools/projmgr/src/ProjMgrWorker.cpp 42.85% 2 Missing and 2 partials ⚠️
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     
Flag Coverage Δ
projmgr-cov 88.01% <78.37%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
tools/projmgr/src/ProjMgrMlops.cpp 82.23% <86.66%> (+0.46%) ⬆️
tools/projmgr/src/ProjMgrWorker.cpp 87.50% <42.85%> (-0.08%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@edriouk edriouk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@brondani
brondani merged commit 91180e9 into main Aug 25, 2026
31 checks passed
@brondani
brondani deleted the improve-mlops-npu-validation branch August 25, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants