unsloth/studio/backend/utils/hardware
LeoBorcherding 74c871d109 fix: detect ROCm unified memory (Strix Halo / AMD iGPU) via torch fallback
amd-smi on iGPUs with shared/unified memory (e.g. Radeon 8060S on Strix
Halo) reports only the dedicated VRAM slice (~512 MB) in its metric output,
so get_visible_gpu_utilization() was returning usable_gb ≈ 0.35 GB instead
of the full GTT pool (~128 GB).  torch.cuda.mem_get_info() already surfaces
the correct unified-pool size.

Add _reconcile_rocm_unified_memory(): after amd-smi returns a valid result
on a ROCm device, cross-check each device's vram_total_gb against
torch.cuda.mem_get_info().  When torch reports a larger total, replace the
amd-smi VRAM fields in-place.  No-op for discrete AMD GPUs where the two
sources agree.

Fixes: "Falling back to all visible GPUs -- model may not fit" on AMD iGPU
machines even when 100+ GB of unified memory is available.
2026-05-05 23:42:09 -05:00
..
__init__.py Add AMD ROCm/HIP support across installer and hardware detection (#4720) 2026-04-10 01:56:12 -07:00
amd.py Add native GGUF intake to Studio (#5246) 2026-05-04 11:46:18 +02:00
hardware.py fix: detect ROCm unified memory (Strix Halo / AMD iGPU) via torch fallback 2026-05-05 23:42:09 -05:00
nvidia.py Add native GGUF intake to Studio (#5246) 2026-05-04 11:46:18 +02:00
VRAM_ESTIMATION.md Update VRAM estimator to cater to broader model configs (#5175) 2026-05-05 04:12:36 -07:00
vram_estimation.py Update VRAM estimator to cater to broader model configs (#5175) 2026-05-05 04:12:36 -07:00