Skip to content

Conversation

@godnight10061
Copy link
Contributor

@godnight10061 godnight10061 commented Jan 4, 2026

Refs #25

This adds build-selection knobs (now including --policy presets) so app developers can opt into preview wheels and/or fail fast on EOL/unsupported stacks.

Changes:

  • Add get_torch_platform(..., preview=False, unsupported=True) gating:
    • preview=False avoids preview-only recommendations (Navi 4x falls back to CPU; preview=True selects rocm6.4).
    • unsupported=False errors on EOL/unsupported selections (directml, ipex, rocm4.2, rocm5.2).
  • Plumb options through install(...) and CLI:
    • --policy {compat,stable,preview} (alias: nightly) sets presets for (preview, unsupported).
    • Precedence: defaults -> --policy -> explicit flags (--preview, --no-unsupported).
    • --preview enables preview/test/nightly installs; --no-unsupported turns EOL/unsupported selections into an error.
  • Installer tweaks:
    • XPU uses stable /whl/xpu by default; --preview switches to /whl/test/xpu.
    • nightly/* installs require preview.
  • Tests: add/adjust unit tests for preview/EOL gating and XPU/nightly behavior.

Test plan:

  • python -m pytest -q

@iwr-redmond
Copy link
Contributor

Thanks @godnight10061! What made you decide to use different flags for the various gates rather than a single policy parameter?

@godnight10061
Copy link
Contributor Author

Good question — the gates are intentionally orthogonal, so separate flags let you tweak one dimension without implicitly changing the others (handy for debugging and incremental rollout).

That said, we agreed the “common path” should be simpler, so I added a --policy preset/alias (compat/stable/preview, with a nightly alias) to cover the usual combinations.

The individual flags are still there so advanced users/CI can override specific gates when needed without fighting a single coarse policy knob.

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