Skip to content

feat: Add automatic perf runtime selection - #1308

Open
xieofxie wants to merge 1 commit into
mainfrom
hualxie/perf_auto_runtime
Open

feat: Add automatic perf runtime selection#1308
xieofxie wants to merge 1 commit into
mainfrom
hualxie/perf_auto_runtime

Conversation

@xieofxie

Copy link
Copy Markdown
Contributor

Summary

  • add auto as the default perf --runtime choice
  • select winml-genai for model folders containing genai_config.json
  • fall back to winml for all other model inputs while preserving explicit runtime choices
  • cover automatic selection and CLI dispatch behavior with unit tests

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@xieofxie
xieofxie requested a review from a team as a code owner August 13, 2026 06:42
@xieofxie xieofxie changed the title Add automatic perf runtime selection feat: Add automatic perf runtime selection Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto runtime selection works for ordinary paths, but normalized local paths are not propagated to the GenAI dispatch path, causing valid bundle inputs such as ~/bundle to be misrouted after detection.

except Exception as e:
raise click.ClickException(f"Failed to resolve Hub-hosted ONNX path {model!r}: {e}") from e
model = hf_model
runtime = _resolve_runtime(runtime, model)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto detection uses the normalized model path here, but _run_genai_runtime later reads the original value from ctx.params['model']. For example, normalize_model_arg expands ~/bundle, so this selects winml-genai, then the runner sees the unexpanded ~/bundle, Path(...).is_dir() is false, and it attempts to auto-build it as a model ID. Please pass the normalized model into the GenAI runner or synchronize ctx.params['model'] after normalization, and add a CLI-level regression test.

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.

2 participants