Skip to content

test(e2e): expand winml perf coverage across EPs and devices#698

Merged
xieofxie merged 9 commits into
mainfrom
hualxie/vitisa
May 22, 2026
Merged

test(e2e): expand winml perf coverage across EPs and devices#698
xieofxie merged 9 commits into
mainfrom
hualxie/vitisa

Conversation

@xieofxie
Copy link
Copy Markdown
Contributor

@xieofxie xieofxie commented May 21, 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

@xieofxie xieofxie requested a review from a team as a code owner May 21, 2026 09:04
Comment thread src/winml/modelkit/session/ep_registry.py
Comment thread src/winml/modelkit/session/session.py
@xieofxie xieofxie merged commit 87cb7c6 into main May 22, 2026
9 checks passed
@xieofxie xieofxie deleted the hualxie/vitisa branch May 22, 2026 02:29
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>
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.

EP discovery should be resilient to per-provider failures Identify functional scenarios and implement E2E tests for winml perf

2 participants