analyze: resolve --ep/--device auto to a single best target#919
Open
fangyangci wants to merge 2 commits into
Open
analyze: resolve --ep/--device auto to a single best target#919fangyangci wants to merge 2 commits into
fangyangci wants to merge 2 commits into
Conversation
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.
What
winml analyzepreviously treated--ep auto/--device autoas "fan out over every locally-available EP/device pair", which was inconsistent withbuild/run/perf(they resolve a single best target). This PR makesanalyze'sautoresolution single-target, reusing the sharedsysinfohelpers (resolve_device/resolve_eps).--ep all/--device allkeep their full fan-out semantics — unchanged.Resolution rules (per axis)
autoresolve_device()/resolve_eps()— local-availability based (device priority NPU > GPU > CPU, EP priority IHV-first)allqnn,gpu, …)The cartesian product +
EP_SUPPORTED_DEVICESfiltering is unchanged, so mixed combos like--ep all --device autowork naturally (all EPs × the one resolved device). The old local-pairs intersection / half-auto warning block is removed — single-targetautois local by construction.Behavior changes
analyze(defaultauto/auto)--ep openvino(device auto)--ep auto --device gpu--ep all --device allBreaking:
autonow requires local hardwareBecause
autoresolves from local availability (likebuild/run), pinning a non-local EP with--device autonow exits2instead of warning-and-running:To statically analyze an EP you don't physically have, specify the device explicitly (
--ep qnn --device npu) or use--device all.Verified on real hardware
On a box with Intel OpenVINO (NPU + CPU) and NVIDIA TensorRT-RTX (GPU):
analyze(default)OpenVINOExecutionProvider (NPU)--device gpuNvTensorRTRTXExecutionProvider (GPU)--ep openvino --device autoOpenVINOExecutionProvider (NPU)--ep openvino --device allOpenVINO × NPU / GPU / CPU--ep qnn