run_eval: forward --device to winml build subprocess#674
Merged
Conversation
`winml config`, `winml perf`, and `winml eval` already receive `--device` from run_eval; `winml build` was the only step missing it. With this change, the build subprocess respects the caller's device choice instead of relying on its own auto-detection. Verified e2e: `python scripts/e2e_eval/run_eval.py --hf-model BAAI/bge-base-en-v1.5 --ep cpu --device cpu --eval-type perf` on a cold cache -> exit 0, [PASS] 2.4s, build config emitted "compile": null (correct for cpu).
DingmaomaoBJTU
approved these changes
May 19, 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
winml config,winml perf, andwinml evalalready receive--devicefrom run_eval;winml buildwas the only step missing it. With this change, the build subprocess respects the caller's device choice instead of relying on its own auto-detection.Companion to #667 (which forwarded
--epand added device-aware EP auto-select in the build CLI). With both PRs in, run_eval consistently propagates--device/--epto every winml subprocess it spawns.Diff
Verification
E2E on a cold cache:
```
python scripts/e2e_eval/run_eval.py --hf-model BAAI/bge-base-en-v1.5 --ep cpu --device cpu --eval-type perf
```
→ exit 0, `[PASS] 2.4s`. Generated build config has `"compile": null` (correct for cpu — no EP-specific compile needed).