ROCm: iGPU triggers HSA_OVERRIDE_GFX_VERSION=10.3.0 on RDNA3 dGPU → GPU hang / driver crash
Summary
On a system with an AMD iGPU + an RDNA3 discrete GPU, the backend's automatic HSA_OVERRIDE_GFX_VERSION detection picks the oldest GPU reported by rocminfo and applies 10.3.0 globally. The discrete RDNA3 card then runs gfx1030 code, which leads to HIP errors and a full GPU hang when loading a model.
Environment
- GPU: AMD Radeon RX 7900 GRE (gfx1100) + AMD integrated graphics (gfx1034)
- WSL2 on Windows, Docker
- torch
2.13.0+rocm7.14.0, HIP7.14.60850 - Engine: Qwen3-TTS 0.6B (Base)
Symptoms
- First attempt: model load fails in
transformerscaching_allocator_warmup→torch.cuda.mem_get_info():
CUDA error: invalid argument (hipErrorInvalidValue)- Later attempts: the screen goes black for several seconds while loading the model, then the display comes back, and the generation task stays "loading" forever. Windows logs a LiveKernelEvent 141 (
VIDEO_ENGINE_TIMEOUT_DETECTED).
The same model loads and runs fine in a standalone script in the same container (with HSA_OVERRIDE_GFX_VERSION unset), so the GPU/ROCm/torch stack itself is working.
Root cause
backend/app.py collects every gfx* entry from rocminfo and bases the decision on the oldest one:
oldest_num = min(gfx_nums)
oldest_gfx = gfx_versions[gfx_nums.index(oldest_num)]
if oldest_num < 1100:
os.environ["HSA_OVERRIDE_GFX_VERSION"] = "10.3.0"With an iGPU (gfx1031) next to a gfx1100 card, min() selects the iGPU, and the override is applied process-wide, so it also affects the RX 7900 GRE.
This probably affects any recent Ryzen desktop/laptop with integrated graphics paired with an RDNA3/RDNA4 GPU.
Workaround
Set the override explicitly to the dGPU's target (so auto-detection is skipped) and hide the iGPU:
environment:
- HSA_OVERRIDE_GFX_VERSION=11.0.0
- HIP_VISIBLE_DEVICES=0Suggested fix
Base the decision on the newest GPU (normally the discrete card) instead of the oldest, so an older iGPU never forces an override on a natively supported dGPU:
newest_num = max(gfx_nums)
newest_gfx = gfx_versions[gfx_nums.index(newest_num)]
if newest_num < 1100:
os.environ["HSA_OVERRIDE_GFX_VERSION"] = "10.3.0"
...
else:
logger.info("AMD GPU detected (%s), native ROCm support available, skipping HSA_OVERRIDE_GFX_VERSION. All GPUs: %s", newest_gfx, ", ".join(gfx_versions))The issue has been made with the help of Claude, that helped me solve this problem
Source: jamiepine/voicebox