unsloth/.github/workflows
JoshuaL3000 e662af769b
fix: enable XPU support and update hardcoded CUDA selections for tests (#7401)
* fix: add XPU device support and update hardcoded CUDA selections

* fix: add XPU device support for pytest CUDA skipped tests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix device handling for PR #7401

- perplexity_eval.py: use DEVICE_TYPE_TORCH, not DEVICE_TYPE. The latter can
  be "hip" or "mlx", which .to() rejects, so this regressed ROCm.
- test_batched_leftpad_generation_gpu.py: XPU diverges here today, so mark it
  non-strict xfail on XPU instead of reverting to a CUDA-only guard. Keeps the
  real XPU gap visible and turns green once it is fixed.
- Guard torch.xpu.is_available() with hasattr, matching device_type.py.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Re-enable the flash varlen attention test in CI for PR #7401

attention_dispatch.py now predefines flash_attn_func / flash_attn_varlen_func
as None, so test_run_attention_flash_varlen_receives_window_and_softcap no
longer needs flash_attn importable to be monkeypatched. Verified on a runner
shaped like the CPU-only one: the test fails against main's attention_dispatch
and passes at this head, so the deselect is now dead weight.

* Tighten comments for PR #7401

Drop the hasattr rationale: torch.xpu has existed since torch 2.3 and the
dependency floor is 2.4, so no supported build predates the namespace. The
guard stays as cheap defence, but the comment claimed something untrue.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: danielhanchen <danielhanchen@gmail.com>
2026-07-28 15:38:57 -07:00
..
consolidated-tests-ci.yml fix: enable XPU support and update hardcoded CUDA selections for tests (#7401) 2026-07-28 15:38:57 -07:00
cross-platform-parity-ci.yml Installer: restore interrupted updates and clean stale rollback environments (#7342) 2026-07-23 01:29:53 -07:00
lint-ci.yml Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
local-agent-guides-ci.yml Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
lockfile-audit.yml CI: pin lockfile-audit actions to commit SHAs (#6902) 2026-07-06 07:11:33 -07:00
mlx-ci.yml Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
notebooks-ci.yml CI: add PyPI extra-index to CPU torch installs to fix sympy resolution (#6660) 2026-06-29 17:35:26 -03:00
ossf.yml Create ossf.yml (#6952) 2026-07-07 17:10:01 -07:00
release-desktop.yml Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
security-audit.yml Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
stale.yml CI: scope GITHUB_TOKEN permissions, add MLX CI, unblock ~60 skipped tests (#5312) 2026-05-11 03:19:13 -07:00
studio-api-smoke.yml Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
studio-backend-ci.yml AMD: CI coverage for recent fixes, plus three wrong gfx ids (#7431) 2026-07-25 18:58:02 -05:00
studio-export-capability-ci.yml Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
studio-frontend-ci.yml Studio: preserve durations across reasoning blocks (#7520) 2026-07-28 04:53:26 -07:00
studio-inference-smoke.yml Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
studio-load-orchestrator-ci.yml Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
studio-mac-api-smoke.yml Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
studio-mac-inference-smoke.yml Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
studio-mac-install-matrix.yml Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
studio-mac-ui-smoke.yml Studio: clarify tool permission controls (#7181) 2026-07-20 09:55:39 -03:00
studio-mac-update-smoke.yml Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
studio-tauri-smoke.yml Studio: run the src-tauri unit tests in CI and fix the two that never ran (#7558) 2026-07-28 07:01:13 -07:00
studio-ui-smoke.yml Studio: drive UI font size through a typography scale instead of the root font size (#7359) 2026-07-23 01:26:56 -07:00
studio-update-smoke.yml Studio: detect an interrupted dependency install instead of launching a backend that cannot import (#7492) 2026-07-28 10:57:20 +02:00
studio-windows-api-smoke.yml Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
studio-windows-inference-smoke.yml Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
studio-windows-ui-smoke.yml Studio: clarify tool permission controls (#7181) 2026-07-20 09:55:39 -03:00
studio-windows-update-smoke.yml Fix Windows no-torch setup (#7511) 2026-07-28 05:54:25 -07:00
version-compat-ci.yml version-compat CI: fake CPU training runs for SFT/GRPO/DPO (#6965) 2026-07-08 04:06:28 -07:00
wheel-smoke.yml Studio: detect an interrupted dependency install instead of launching a backend that cannot import (#7492) 2026-07-28 10:57:20 +02:00