When a Linux host has ROCm installed but the venv received CPU-only torch (common when pip resolves torch from PyPI without an explicit index URL), the new _ensure_rocm_torch() function detects this and reinstalls torch with the correct ROCm wheels. New functions: - _detect_rocm_version(): probes /opt/rocm version files, hipconfig, and ROCM_PATH to determine (major, minor) of the installed ROCm stack - _ensure_rocm_torch(): checks whether torch is GPU-enabled; if not and ROCm is present, reinstalls torch from the best-matching ROCm wheel index and installs bitsandbytes for AMD The ROCm version-to-wheel mapping covers ROCm 6.0 through 7.1. ROCm 7.2 is excluded from the active mapping because the only torch build on that index (2.11.0) exceeds the current upper bound (<2.11.0); ROCm 7.2 hosts get the rocm7.1 wheels via the >= fallback. The torch GPU probe subprocess has a 30-second timeout to prevent hangs if torch import stalls (e.g. broken CUDA/HIP driver). The step count is incremented on Linux (non-macOS, non-no-torch) to account for the new "ROCm torch check" progress step. |
||
|---|---|---|
| .. | ||
| backend | ||
| frontend | ||
| __init__.py | ||
| install_llama_prebuilt.py | ||
| install_python_stack.py | ||
| LICENSE.AGPL-3.0 | ||
| setup.bat | ||
| setup.ps1 | ||
| setup.sh | ||
| Unsloth_Studio_Colab.ipynb | ||