Repository navigation
fix(install): route Linux Intel GPU hosts away from CPU-only torch - #5274
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?
|
Confirmed main's get_torch_index_url still has no Intel autodetect, so routing Linux Intel hosts to the xpu index is worth having, though matching any 0x8086 DRM vendor id will also catch ordinary integrated graphics on CPU-only laptops. Could you narrow the detection and drop the unrelated hunks Roland flagged, the removed tauri_log STEP line and the reshuffled unsloth install block, then rebase since this now conflicts? |
|
Re-checked against main and the branch is unchanged since my last note, so the 0x8086 match still catches ordinary Intel integrated graphics and the unrelated hunks (removed tauri_log STEP line, reshuffled unsloth install block) are still in. Could you narrow the detection, drop those hunks and rebase, and also take a look at #9084 which is covering similar ground so you two are not duplicating work? |
|
Main still has no Intel autodetect in get_torch_index_url, but matching any 0x8086 DRM vendor would also send Linux machines with only Intel integrated graphics to the xpu torch and extras install. Could you limit detection to discrete or XPU-capable devices, drop the unrelated overlay changes Roland flagged, and rebase? |
Co-authored-by: andomeder <[email protected]>
f8dddca to
a5a2134
Compare
|
Thank you so much for the PR and for looking into Intel GPU support on Linux, we really appreciate it! We won't be taking the change itself, for a few reasons:
We still want to credit your contribution, so this PR is merged as an empty commit that keeps you as the author. If you would like to pursue autodetection further, a narrower probe limited to XPU-supported device ids, or a hint pointing Intel GPU users to |
|
You have reached your Codex usage limits for security reviews. Please try again later. |
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: