test(e2e): strengthen perf CLI coverage - #1149
Open
xieofxie wants to merge 17 commits into
Open
Conversation
added 2 commits
July 21, 2026 13:50
xieofxie
commented
Jul 21, 2026
The perf ONNX suite shared one generated float MatMul across CPU/GPU/NPU tests, which is not representative of NPU (QNN/VitisAI) execution. Add an npu_model_arg fixture that defaults to model_arg, override it in TestPerfONNXDirect to point at tests/assets/model.onnx, and route the NPU tests (memory, monitor, ep-device, op-tracing) through it. CPU/GPU tests keep the lightweight generated model. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR strengthens end-to-end coverage of the winml perf CLI by expanding argument-level tests and tightening expectations for monitored GPU/NPU runs, while introducing a real ONNX asset to better represent NPU execution.
Changes:
- Require monitored GPU/NPU runs to report positive utilization in
hw_monitor. - Add CPU E2E tests for
--batch-sizeand--input-data. - Add QNN NPU E2E coverage for
--op-tracing basicand validation of the generated op-trace report.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
tests/e2e/test_perf_e2e.py |
Adds new perf CLI E2E test coverage (batch size, input data, op tracing), introduces an NPU-specific model fixture, and strengthens monitoring assertions. |
tests/assets/model.onnx.data |
Adds external data sidecar needed by the repo-shipped ONNX model used in NPU E2E tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Restore the model_arg parameter on TestPerfONNXDirect.npu_model_arg so it matches the _PerfBenchmarkSuite base fixture signature, resolving the CodeQL signature-mismatch alert.
…-cli into hualxie/perf_e2e
# Conflicts: # tests/e2e/test_perf_e2e.py
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 6 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (3)
tests/e2e/test_perf_e2e.py:141
- When duration_overwrite is set, this helper still always passes an explicit --iterations value. That contradicts the docstring (“replaces the fixed benchmark count”), and also marks iterations as CLI-provided, which can change perf CLI defaulting/behavior compared to real duration-mode usage. Consider omitting --iterations entirely when duration_overwrite is provided.
e2e speed). ``duration_overwrite`` replaces the fixed benchmark count with
a wall-clock budget. Warmup is always 1.
"""
iterations = 300 if monitor else 3
args: list[str] = [
tests/assets/resnet.md:7
- The asset provenance note references an internal/private Hugging Face model ID without indicating that access is required or giving enough detail to reproduce the artifacts. Please clarify that the source model is internal/private and add a short, reproducible description of where the recipe lives and what stage produces the fp32 vs w8a8 outputs.
# resnet_w8a8
Generated by using hf-tiny-model-private/tiny-random-ResNetForImageClassification in FTK's AMD npu Microsoft/resnet-50 recipe.
# resnet_fp32
tests/e2e/test_perf_e2e.py:499
- This GPU monitor test disables utilization assertions unconditionally, which undermines the stated goal of requiring positive utilization for monitored runs. Since the JSON report includes the resolved EP, you can relax the utilization requirement only for OpenVINO (which doesn’t reliably bump PDH counters) while keeping the stronger assertion for other EPs.
# TODO skip all due to openvino gpu could not emit valid pdh counter
_assert_monitor_result(data, device="gpu", require_utilization=False)
KayMKM
approved these changes
Jul 29, 2026
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.
Summary
--batch-sizeand--input-data--op-tracing basicand its trace reportConvert hf-tiny-model-private/tiny-random-ResNetForImageClassification via FTK's amd npu resnet recipe