Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Trim comments
  • Loading branch information
danielhanchen committed Oct 12, 2026
commit b6f617a9e55774f5d90f83d1df15e64d10c054b8
5 changes: 1 addition & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6142,9 +6142,7 @@ _cu130_torch213_route() {
_pypi_unsloth_admits_torch "2.13.0"
}

# "yes" when a NEW install here can use the 2.13/2.14 kernel wheels: a GIL-enabled interpreter (torch
# 2.13 has no cp313t wheel) and glibc 2.35+ (the floor the wheels are built and checked against).
# Only gates the new-install choice; an existing 2.13/2.14 is kept regardless.
# New installs only: torch 2.13 has no cp313t wheel, and the kernel wheels need glibc 2.35.
_cu130_torch213_host_ok() {
_cth_gil=$("$VENV_DIR/bin/python" -c "import sysconfig; print('gil-disabled' if sysconfig.get_config_var('Py_GIL_DISABLED') else 'gil-enabled')" 2>/dev/null || echo "")
[ "$_cth_gil" = "gil-enabled" ] || { echo "no"; return; }
Expand All @@ -6157,7 +6155,6 @@ _cu130_torch213_host_ok() {
_cu130_torch213_platform() {
[ "$(_torch_index_url_leaf "$1")" = "cu130" ] || { echo "no"; return; }
case "$OS" in linux|wsl) ;; *) echo "no"; return ;; esac
# aarch64 too: prebuilt-wheels-cu13 carries linux_aarch64 builds (Grace, GB10), and upstream's stop at torch 2.10.
case "$_ARCH" in x86_64|amd64|aarch64|arm64) ;; *) echo "no"; return ;; esac

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Gate the ARM torch 2.13 route on glibc 2.35

On supported aarch64 hosts with glibc 2.28–2.34, this enables torch 2.13 even though the linux_aarch64 kernel wheels are built on Ubuntu 22.04 with a documented practical glibc 2.35 floor (.github/scripts/prebuilt_wheels.py:84-89) and are tagged generically enough for pip to accept them. Their import verification then rejects them; for a Mamba model the fallback source build lacks the workflow-only C++20 patch required by torch 2.13 and ensure_ssm_runtime raises, whereas the former torch 2.11 route could build that source. Either retain the old route below glibc 2.35 or publish wheels carrying a compatible manylinux floor.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 22a760b. The new-install choice now also needs glibc 2.35 or newer (read the same way as the uv installer check; musl or an unreadable libc answers no), on x86_64 and aarch64 alike since both builds share that floor. Below it a fresh install stays on the default range. The preservation window is unchanged, so an existing 2.13/2.14 is still kept.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Exclude free-threaded Python 3.13 from the ARM route

When --python points at a free-threaded aarch64 Python 3.13 interpreter, the new ARM branch accepts it because the following probe checks only sys.version_info, then requests torch 2.13; the cu130 index has cp313 aarch64 wheels but no cp313t build for torch 2.13 (official torch index), so a fresh install fails resolution. The repository's ARM kernel resolver likewise explicitly supports only GIL-enabled cp313, so this route should also inspect Py_GIL_DISABLED before opting in.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 22a760b. The new-install choice now probes Py_GIL_DISABLED and requires a GIL-enabled interpreter; torch 2.13 has no cp313t wheel on any platform, so a free-threaded 3.13 stays on the default range.

_ctr_py=$("$VENV_DIR/bin/python" -c "import sys; print('%d.%d' % sys.version_info[:2])" 2>/dev/null || echo "")
[ "$_ctr_py" = "3.13" ] && echo "yes" || echo "no"
Expand Down
3 changes: 1 addition & 2 deletions studio/install_python_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,8 +569,7 @@ def _torch_index_leaf(url: str) -> str:


def _cu130_first_torch_minor() -> int:
"""The oldest minor cu130 serves the whole trio for: aarch64 has torch 2.9 but no
torchvision 0.24 / torchaudio 2.9, so it starts at 2.10."""
"""cu130 has no aarch64 torchvision 0.24 / torchaudio 2.9, so aarch64 starts at 2.10."""
if sys.platform.startswith("linux") and platform.machine().lower() in ("aarch64", "arm64"):
return 10
return _CU130_FIRST_TORCH_MINOR
Expand Down