Studio: forward the resolved AMD gfx arch to the prebuilt installer (#5923)
setup.sh and setup.ps1 resolve the AMD gfx target (rocminfo/hipinfo/amd-smi, name inference, or UNSLOTH_ROCM_GFX_ARCH) but never passed it to install_llama_prebuilt.py. The installer re-probed on its own and, on hosts where hipinfo/amd-smi cannot report the arch (amd-smi-only Linux, HIP-runtime-only Strix Halo, name-inferred GPUs), left rocm_gfx_target unset. The lemonade HIP prebuilt selection needs that arch, so those hosts got no GPU prebuilt and fell back to a source build. Add a --rocm-gfx argument (defaulting to UNSLOTH_ROCM_GFX_ARCH) and fold it into the host profile via _apply_host_overrides: a forwarded gfx is authoritative (setup already applied visible-device selection) and implies has_rocm. setup.sh and setup.ps1 now forward their resolved arch. Add unit tests for _normalize_forwarded_gfx and _apply_host_overrides, plus source checks that both setup scripts forward --rocm-gfx.
D
Daniel Han committed
86b1918056eb23dae321c22d85d66a4de506da77
Parent: ef43b5f
Committed by GitHub <noreply@github.com>
on 6/1/2026, 1:55:35 PM