test(e2e): expand winml perf coverage across EPs and devices#698
Merged
Conversation
xieofxie
commented
May 21, 2026
xieofxie
commented
May 21, 2026
added 2 commits
May 21, 2026 17:06
timenick
approved these changes
May 22, 2026
DingmaomaoBJTU
pushed a commit
that referenced
this pull request
May 22, 2026
## Summary
- Expands `tests/e2e/test_perf_e2e.py` with parametrized `--ep` tests
across `qnn`, `vitisai`, `openvino`, `dml`, `nv_tensorrt_rtx`,
`migraphx`, combined with `--device cpu/gpu/npu`. Adds a CPU `--monitor`
test and a new `TestPerfHuggingFace` class that runs the same EP/device
matrix against `microsoft/resnet-50` loaded via the perf command.
- Refactors duplicated CLI-invocation and result-assertion code into
`_build_perf_args`, `_assert_hw_monitor_section`, and
`_assert_monitor_result` helpers so each scenario is a few lines instead
of a hand-rolled argv list.
- Hardens `WinMLEPRegistry`: when a provider's `ensure_ready()` raises,
log a warning and skip it instead of aborting registry initialization,
so one broken EP no longer prevents the rest from being discovered.
- `tests/e2e/require_ep.py`: short-circuit `DmlExecutionProvider`
alongside `CPUExecutionProvider` since DML ships with ORT and is not
enumerated by `WinMLEPRegistry`, so `require_ep("dml")` no longer
spuriously skips.
- `WinMLSession`: drop the `WINMLSESSION_VERBOSE` env-var gating;
"Compiling for device" / "Already compiled" now log unconditionally at
INFO.
- `test_benchmark_auto`: accept that `--device auto` resolves to a
concrete `gpu`/`npu` in the output, since `resolve_device` no longer
leaves the literal `"auto"` in `benchmark_info`.
Closes #502
Closes #688
---------
Co-authored-by: hualxie <hualxie@microsoft.com>
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
tests/e2e/test_perf_e2e.pywith parametrized--eptests acrossqnn,vitisai,openvino,dml,nv_tensorrt_rtx,migraphx, combined with--device cpu/gpu/npu. Adds a CPU--monitortest and a newTestPerfHuggingFaceclass that runs the same EP/device matrix againstmicrosoft/resnet-50loaded via the perf command._build_perf_args,_assert_hw_monitor_section, and_assert_monitor_resulthelpers so each scenario is a few lines instead of a hand-rolled argv list.WinMLEPRegistry: when a provider'sensure_ready()raises, log a warning and skip it instead of aborting registry initialization, so one broken EP no longer prevents the rest from being discovered.tests/e2e/require_ep.py: short-circuitDmlExecutionProvideralongsideCPUExecutionProvidersince DML ships with ORT and is not enumerated byWinMLEPRegistry, sorequire_ep("dml")no longer spuriously skips.WinMLSession: drop theWINMLSESSION_VERBOSEenv-var gating; "Compiling for device" / "Already compiled" now log unconditionally at INFO.test_benchmark_auto: accept that--device autoresolves to a concretegpu/npuin the output, sinceresolve_deviceno longer leaves the literal"auto"inbenchmark_info.Closes #502
Closes #688