I wanted to train a small segmentation network on a laptop with no discrete GPU, only the Radeon 860M integrated into a Ryzen chip. Out of the box, PyTorch’s ROCm build simply did not see it. The fix is one environment variable, but the obvious value for it is the slow one.
TL;DR — Export HSA_OVERRIDE_GFX_VERSION=11.0.0 before importing torch. It makes the gfx1152 iGPU usable and was 2.6× faster than 11.5.1 (0.51 against 1.33 s per step). Train under bf16 autocast, and run the job with systemd-run --user -p MemoryMax=6G -p MemorySwapMax=512M so that, since the iGPU shares system RAM, a memory spike kills the training job instead of your desktop session.
The setup
The machine: a Ryzen laptop with a Radeon 860M iGPU (LLVM target gfx1152) and 28 GB of RAM shared between CPU and GPU (about 2 GB dedicated VRAM, the rest reachable as GTT). The model: torchvision’s LR-ASPP with a MobileNetV3-Large backbone, 3.2 M parameters, 512×512 inputs, batch 8. Installation needed no system packages and no sudo, because the ROCm runtime ships inside the wheel. The user only has to be in the render group for /dev/kfd.
python3.12 -m venv .venv && . .venv/bin/activate
pip install torch==2.14.1 torchvision==0.29.1 --index-url https://download.pytorch.org/whl/rocm7.2
The torch wheel alone is 6.2 GB, and the venv ends up around 15 GB.
What I expected
gfx1152 is not in ROCm’s supported list, so I expected to need an override. The usual advice is to spoof the closest supported target. RDNA 3.5 parts are gfx115x, so 11.5.1 looked like the natural choice, closer than 11.0.0 (gfx1100, the desktop RX 7900 family).
What actually happens
Without any override, torch imports fine and reports no GPU:
$ python -c "import torch; print(torch.__version__, torch.cuda.is_available())"
2.14.1+rocm7.2 False
$ HSA_OVERRIDE_GFX_VERSION=11.0.0 python -c "import torch; print(torch.cuda.is_available(), torch.cuda.get_device_name(0))"
True AMD Radeon 860M
Both 11.0.0 and 11.5.1 worked, without errors. But they ran at very different speeds on the same benchmark: 30 training steps of the model above with AdamW, after one warm-up step.

With 11.5.1 the iGPU was no faster than the 16-thread CPU. With 11.0.0 and bf16 autocast it was 2.6× faster than the CPU and needed 1.4 GB of GPU memory instead of 2.6 GB in fp32. In practice that meant about 20 s per epoch of 240 images, and 127 epochs in about 43 minutes.
The fix
The training step, trimmed from the real loop. bf16 needs no GradScaler, unlike fp16:
with torch.autocast("cuda", dtype=torch.bfloat16, enabled=dev == "cuda"):
logits = model(x)["out"]
logits = logits.float() # loss in fp32
loss = F.cross_entropy(logits, y, weight=cw, ignore_index=255) + 0.5 * dice_loss(logits, y)
if not torch.isfinite(loss):
nans += 1
opt.zero_grad(set_to_none=True)
if nans > 10:
raise SystemExit("too many NaNs")
continue
opt.zero_grad(set_to_none=True)
loss.backward()
torch.nn.utils.clip_grad_norm_(model.parameters(), 5.0)
opt.step()
The NaN guard is there because the override makes the chip pretend to be another one. Over every run, including one of 388 epochs at 640 px, the counter stayed at 0.
The second half of the fix is memory. The GPU allocates from the same RAM as everything else, and data-loader workers each hold a copy of the augmentation pipeline. When a laptop runs out, the kernel OOM killer can pick your browser or your session. A transient systemd unit gives the job its own cgroup with a hard limit:
export HSA_OVERRIDE_GFX_VERSION=11.0.0
systemd-run --user --unit=train-job -p MemoryMax=6G -p MemorySwapMax=512M \
/path/to/project/run.sh
journalctl --user -u train-job -f
When the limit is hit, only that unit dies, and systemd says so plainly. A deliberate test with a 300 MB cap and an 800 MB allocation:
oomdemo.service: Main process exited, code=killed, status=9/KILL
oomdemo.service: Failed with result 'oom-kill'.
oomdemo.service: Consumed 127ms CPU time over 165ms wall clock time, 300M memory peak.
With MemoryMax=6G and 2 data-loader workers, the training runs peaked between 2.6 and 4 GB. The one ML job that did hit its cap (5 GB) was a post-training quantisation calibration. It died in 30 seconds and nothing else on the machine noticed. When the unit exits, the same journal line reports the peak memory for free, which is a handy way to size the next limit. Shared memory bites at inference time too: an image upscaler on a similar Ryzen AI iGPU fails with HTTP 500 above 384² for the same reason.
Why it works
HSA_OVERRIDE_GFX_VERSION tells the ROCm runtime to treat the device as the given target, so it loads that target’s precompiled kernels. The wheel’s libraries contain kernels for officially supported targets only. My guess is that gfx1100 kernels are the mature, tuned set, while whatever the runtime picks for 11.5.1 is less optimised. I did not profile which kernels ran, so treat that as a hypothesis. The 2.6× gap is measured.
MemoryMax is a cgroup v2 limit. The kernel reclaims and then OOM-kills inside the cgroup before touching anything outside it. MemorySwapMax=512M stops the job from thrashing swap for minutes before it dies.
What I did not test
Only one chip (gfx1152), one wheel (torch 2.14.1 with ROCm 7.2) and one model family. The first batch of every run took 65–90 s while MIOpen compiled its kernels; the cache makes later runs start faster. Speeds varied with what else was running, because two Android emulators shared the same RAM. I did not try fp16 autocast or torch.compile.
The models trained this way are being released under CC BY-NC 4.0 on a public model page that is being set up now. Caveat: the backbone was initialised from torchvision’s ImageNet weights, and ImageNet is licensed for non-commercial research.
Facts
context: Training a 3.2M-parameter segmentation model on an AMD Radeon 860M integrated GPU with PyTorch ROCm wheels
problem: torch.cuda.is_available() is False on gfx1152; the intuitive override 11.5.1 is as slow as the CPU; shared RAM risks OOM-killing the desktop
solution: HSA_OVERRIDE_GFX_VERSION=11.0.0, bf16 autocast, run under systemd-run --user -p MemoryMax=6G -p MemorySwapMax=512M
verified_on: 2026-10-03
applies_to: [PyTorch 2.14.1+rocm7.2, Radeon 860M gfx1152, Linux with systemd user sessions and cgroup v2]
does_not_apply_to: [Windows, officially supported discrete Radeon GPUs, other gfx115x chips not tested]