Measure model loading memory and prepare GPU baseline counters - #1429
Merged
Qiong Wu (qiowu) (DingmaomaoBJTU) merged 3 commits intoSep 18, 2026
Conversation
Qiong Wu (qiowu) (DingmaomaoBJTU)
requested a review
from a team
as a code owner
September 18, 2026 09:17
xieofxie
approved these changes
Sep 18, 2026
Qiong Wu (qiowu) (DingmaomaoBJTU)
merged commit Sep 18, 2026
bd7fb42
into
microsoft:main
9 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Model construction can allocate memory before the existing perf baseline, while missing GPU process counters leave the pre-model delta unavailable. This ports the loading-memory and GPU-baseline changes from gim-home/winml-cli-mirror PRs #10 and #11 onto current main.
Compatibility: the outer report remains schema version 2 and
load_memory.versionis 1. Classicmemory_measurement.schema_versionis 3 because its structure and legacy-named baseline/delta boundaries change; documentation describes migration and limitations. Existing upstream CGIR changes are retained.Validation on Windows / Python 3.11:
src/andtests/, changed-file formatting, license headers, andgit diff --checkpassed.Review follow-up: distinguish configured polling delay from observed mean/max sampling intervals, including GPU-query overhead. Add native factory/adapter/device failure-injection tests and idempotent COM cleanup checks. The updated memory/GPU suite passes all 40 tests.
A fresh-process native smoke test on Qualcomm Adreno X1-85 successfully created the baseline device on the selected LUID, discovered valid PDH counters, recorded final observations, and released the retained device. This validates baseline preparation/cleanup; full model hardware benchmarks from the source PRs were not rerun.