Skip to content

Fix analyze default auto target selection - #1228

Open
DingmaomaoBJTU wants to merge 2 commits into
mainfrom
dingmaomaobjtu-fix-qnn-default-device
Open

Fix analyze default auto target selection#1228
DingmaomaoBJTU wants to merge 2 commits into
mainfrom
dingmaomaobjtu-fix-qnn-default-device

Conversation

@DingmaomaoBJTU

@DingmaomaoBJTU DingmaomaoBJTU commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Default winml analyze should choose the strongest exact local EP/device target, not inherit a lower-priority device axis from the session fallback before EP selection. On hosts where one provider exposes both NPU and GPU bindings, the previous auto/auto path could settle on the GPU binding even when the NPU binding was locally available.

This updates analyze's default target selection to rank exact local EP/device bindings by DEVICE_PRIORITY before resolving the EP. Explicit targets and existing fan-out behavior are preserved. The regression test derives a multi-device EP from EP_SUPPORTED_DEVICES so the coverage follows the provider matrix rather than hardcoding a provider-specific rule.

Validation:

  • ruff check src\winml\modelkit\commands\analyze.py tests\unit\analyze\test_static_analyzer_cli.py
  • pytest tests\unit\analyze\test_static_analyzer_cli.py -q

@DingmaomaoBJTU
DingmaomaoBJTU requested a review from a team as a code owner July 27, 2026 10:02
@DingmaomaoBJTU DingmaomaoBJTU changed the title Fix analyze default QNN device selection Fix analyze default auto target selection Jul 27, 2026
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.

1 participant