[winml perf] Compiled w8a16 model is incorrectly reported as w16a16
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- machine-learning, python
調査の方向性
The issue is in winml-cli's reporting logic for compiled models. Start by examining the code that generates the model_info.precision field in the perf command output, likely in a module handling model metadata or report generation. Compare how precision is determined for raw vs. compiled models. Look at the EPContext handling and the Q/DQ initializers. Run the provided reproduction script to see the discrepancy in the generated JSON files.
索引モデルが issue の本文から書いたものです。
説明
Summary
Compiled w8a16 model is reported as w16a16
Priority: P1, confirmed by the release driver on 2026-09-23.
Bugbash reference: 2026-09-22 / BUG-004.
Status: Observed in the first test round; no fix or post-fix regression is recorded. This issue is based on retained test evidence, not a new test run.
Environment
- Test date: 2026-09-22; findings triaged on 2026-09-23.
- CLI: winml-cli 0.4.0, installed from a local wheel. The exact source commit/build provenance is not recorded in the test evidence.
- Hardware: Snapdragon X Elite X1E80100, Qualcomm Hexagon NPU.
- OS: Windows 11 26H1, build 28000.2956, ARM64.
- Python: 3.11.15, workspace virtual environment.
- EP: QNNExecutionProvider from WinML Catalog, package 2.2480.49.0.
- ONNX Runtime: 1.27.1.202607110137, Windows ML distribution.
- ONNX: 1.18.0; PyTorch: 2.14.0; Transformers: 4.57.6.
- Model: catalog microsoft/resnet-50, image-classification, pixel_values FP32 [1, 3, 224, 224].
- Quantization, where applicable: w8a16, uint8 weights / uint16 activations, 10 calibration samples.
Reproduction
Run in PowerShell with winml-cli 0.4.0 installed. Use a new output directory and retain the external files generated alongside the compiled ONNX.
$results = '.\repro-compiled-precision'
New-Item -ItemType Directory -Path $results | Out-Null
uv run winml export -m microsoft/resnet-50 -o "$results\resnet.onnx"
uv run winml optimize -m "$results\resnet.onnx" --ep qnn --device npu --disable-ort-graph-optimization -o "$results\resnet-opt-no-ort.onnx"
uv run winml quantize -m "$results\resnet-opt-no-ort.onnx" -p w8a16 --samples 10 --task image-classification --model-id microsoft/resnet-50 -o "$results\resnet-w8a16.onnx"
uv run winml compile -m "$results\resnet-w8a16.onnx" --ep qnn --device npu -o "$results\resnet-compiled.onnx"
uv run winml perf -m "$results\resnet-w8a16.onnx" --ep qnn --device npu --iterations 10 --warmup 2 -o "$results\precision-raw.json"
uv run winml perf -m "$results\resnet-compiled.onnx" --ep qnn --device npu --iterations 20 --warmup 3 -o "$results\precision-compiled.json"
Compare model_info.precision in the two reports. The optimize flag in preparation bypasses a separate serialization issue.
Expected result
Preserve the source precision, or report it as unknown when compiled weights are opaque.
Actual result
Both perf commands exit successfully, but their model_info.precision values disagree:
| Input | Reported precision |
|---|---|
| Raw uint8-weight / uint16-activation QDQ model | w8a16 |
| Compiled EPContext from that same model | w16a16 |
This discrepancy was independently confirmed from the saved JSON reports.
Workaround
Use the verified pre-compile quantization metadata when interpreting results; there is no verified CLI workaround that corrects the compiled report field.
Scope and evidence
The compiled outer ONNX exposes UINT16 activation-side Q/DQ initializers, while weights are opaque in the external EPContext. This confirms a report-label defect, not an actual conversion of weights to 16 bits. Successful inference/exit code does not make the precision field correct. Preserve known source precision or report unknown when weight precision cannot be established.
The following evidence is retained locally by the reporter; these filenames are an index, not uploaded attachments:
quantize-w8a16.stdout.logperf-raw.jsonperf-compiled.jsononnx-validation.json
- 主要言語
- Python
- スター
- 47
- フォーク
- 12
- 平均マージ
- 1日 10時間
- マージ済み PR(30日)
- 33
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/winml-cli のほかの issue
-
bug P1
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
bug P1 triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
microsoft/winml-cli#1097 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
P2 refactor triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
[winml perf] Build output directory fails architecture resolution対応中かも @fangyangci が 24 日前に担当しました。 オープンbug P1
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
bug P1
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
microsoft/winml-cli の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ok-oldking/ok-wuthering-waves#1785 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
healthchecks/healthchecks#1349 ·
-
deployment release-lag
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
nolte/kamerplanter#2374 ·
メンテナーはふだん 1 日以内に返信
-
bug v1 v2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
modelcontextprotocol/python-sdk#3725 ·
メンテナーはふだん 1 日以内に返信
-
batchterms() drops queries without a similar() clause, misaligning results with inputs対応中かも @MohammadHijjawi97 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信