unsloth/tests
Daniel Han 688312fe63 Add AMD ROCm detection to install.sh with validation and shell tests
Extend get_torch_index_url() to detect AMD ROCm when nvidia-smi is not
found. The detection chain tries, in order: amd-smi, /opt/rocm version
file, hipconfig, dpkg-query (rocm-core), and rpm (rocm-core).

Key design decisions:
- NVIDIA always takes precedence (ROCm detection only runs when
  nvidia-smi is absent)
- ROCm 7.2+ is capped to rocm7.1 index because torch 2.11.0 (the only
  version on the rocm7.2 index) exceeds the current upper bound <2.11.0
- macOS returns CPU immediately before any ROCm check
- A validation guard rejects malformed _rocm_tag values (e.g. "rocm."
  from garbled amd-smi output with empty version fields)
- Debian epoch prefixes (e.g. "2:6.2.0") are stripped from dpkg-query
  output before parsing

Also adds ROCm status messaging (CPU-only hint mentions AMD, ROCm
detected message), and installs bitsandbytes for AMD when a ROCm
PyTorch index is selected.

Shell tests expanded from 8 to 23 cases covering all CUDA tiers, ROCm
versions 6.0-8.0, CUDA+ROCm precedence, malformed amd-smi output
(empty version, "N/A", trailing text), and CUDA regression checks.
2026-03-31 08:29:15 +00:00
..
python tests: add no-torch / Intel Mac test suite (#4646) 2026-03-27 02:33:45 -07:00
qlora Revert "[pre-commit.ci] auto fixes from pre-commit.com hooks" 2025-12-01 07:24:58 -08:00
saving Revert "[pre-commit.ci] auto fixes from pre-commit.com hooks" 2025-12-01 07:24:58 -08:00
sh Add AMD ROCm detection to install.sh with validation and shell tests 2026-03-31 08:29:15 +00:00
studio/install Use prebuilt llama.cpp for unsloth studio setup (#4562) 2026-03-25 05:42:43 -07:00
utils feat: Implement Q-GaLore optimizer and custom embedding learning rate… (#4511) 2026-03-25 01:03:10 -07:00
__init__.py Qwen 3, Bug Fixes (#2445) 2025-04-30 22:38:39 -07:00
run_all.sh tests: add no-torch / Intel Mac test suite (#4646) 2026-03-27 02:33:45 -07:00
test_get_model_name.py Fixup mapper issues and resolve properly (#4124) 2026-03-03 06:57:25 -08:00
test_model_registry.py Revert "[FIX] Vllm guided decoding params (#3662)" 2025-12-01 05:43:45 -08:00
test_raw_text.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2026-01-08 11:35:21 +00:00