fix(install): route Linux Intel GPU hosts away from CPU-only torch#5274
fix(install): route Linux Intel GPU hosts away from CPU-only torch#5274andomeder wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for Intel XPU GPUs by adding detection logic via DRM sysfs and a dedicated installation path for Intel-enabled PyTorch and Unsloth extras. It also refactors the Unsloth installation stages and updates the test suite to include Intel GPU scenarios. Review feedback identified a typo in a function call for runtime dependencies, accidental version downgrades for the Unsloth package, and missing unsloth-zoo git overlays in several refactored local installation paths.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for Intel XPU GPUs in the installation script. Key changes include the addition of Intel GPU detection via DRM sysfs, a specialized installation routine for the Intel XPU PyTorch stack, and updates to the torch index URL selection logic. The PR also refactors local repository overlay logic into a reusable function and includes unit tests for the new detection paths. Review feedback recommends adding the --upgrade-package flag to Intel-specific installation commands for consistency and ensuring the new overlay function is used in all applicable local installation branches.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for Intel XPU GPUs in the installation script by adding detection logic via DRM sysfs and a dedicated installation path for Intel-enabled PyTorch and Unsloth extras. It also refactors local repository overlay logic into a reusable function and updates the test suite to cover Intel GPU detection. A review comment identifies a discrepancy in the Intel XPU installation stack where version constraints and the unsloth-zoo package were missing in the non-local installation path, and suggests using the dynamic package name variable for better consistency.
| fi | ||
| } | ||
|
|
||
| _overlay_local_repos() { |
There was a problem hiding this comment.
why do you have this in your PR? seems like it leaked from another PR i already merged?
Linux Intel GPU hosts can currently fall through to the CPU-only torch path in the normal local Studio install flow.
That means a user doing:
git clone https://github.com/leizhenyuan/unsloth unsloth-intel cd unsloth-intel git checkout zhenyuan_enable_studio ./install.sh --localcan get the wrong install path even when
/sys/class/drmshows an Intel GPU.This patch keeps that Linux install flow on the Intel/XPU path instead of the CPU fallback.
What changed
_has_intel_xpu_gpu()ininstall.shxpuinstall path_install_intel_xpu_stack()for the Intel extras path--localoverlay flow after the Intel install path runsLinux installer routing only.
Validation
Ran locally on an Intel Linux machine:
bash tests/sh/test_get_torch_index_url.sh→28 passed, 0 failedbash -n install.sh→ pass./install.sh --local→ passInstaller output now includes:
Note
UV_SKIP_WHEEL_FILENAME_CHECK=1stays inside the installer for the current Intel extras path because one preview-wheel filename is rejected byuvotherwise.Related: