"hipErrorNoBinaryForGpu: Unable to find code object for all current devices!"
The program (usually PyTorch) has no compiled code for your AMD GPU's gfx target. Either install a build that includes it, or, for cards no build covers, use the override workaround.
What you see
On ROCm 6.x and earlier, the HIP runtime logs:
hipErrorNoBinaryForGpu: Unable to find code object for all current devices!The error PyTorch raises uses the same wording as the CUDA one, or reports an invalid function:
RuntimeError: HIP error: no kernel image is available for execution on the deviceRuntimeError: HIP error: invalid device functionWhy it happens
AMD code is compiled per gfx target, with no compatibility between targets: code for gfx1030 does not run ongfx1031, even though both are RDNA 2. So the build must include your exact target. Find yours with rocminfo | grep gfx.
Which PyTorch build covers your card
| GPU | gfx target | Newest PyTorch ROCm build for it | AMD support today |
|---|---|---|---|
| Instinct MI350X | gfx950 | 2.14.0, ROCm 7.14 | Official |
| Instinct MI355X | gfx950 | 2.14.0, ROCm 7.14 | Official |
| Radeon AI PRO R9700 | gfx1201 | 2.14.0, ROCm 7.14 | Official |
| Radeon RX 9060 XT (16GB) | gfx1200 | 2.14.0, ROCm 7.14 | Official |
| Radeon RX 9060 XT (8GB) | gfx1200 | 2.14.0, ROCm 7.14 | Official |
| Radeon RX 9070 | gfx1201 | 2.14.0, ROCm 7.14 | Official |
| Radeon RX 9070 XT | gfx1201 | 2.14.0, ROCm 7.14 | Official |
| Ryzen AI Max+ 395 | gfx1151 | 2.14.0, ROCm 7.14 | Official |
| Instinct MI325X | gfx942 | 2.14.0, ROCm 7.14 | Official |
| Radeon RX 7600 XT | gfx1102 | 2.14.0, ROCm 7.14 | Runs, not officially listed |
| Instinct MI300A | gfx942 | 2.14.0, ROCm 7.14 | Official |
| Instinct MI300X | gfx942 | 2.14.0, ROCm 7.14 | Official |
| Radeon RX 7700 XT | gfx1101 | 2.14.0, ROCm 7.14 | Official |
| Radeon RX 7800 XT | gfx1101 | 2.14.0, ROCm 7.14 | Official |
| Radeon RX 7900 GRE | gfx1100 | 2.14.0, ROCm 7.14 | Official |
| Instinct MI210 | gfx90a | 2.14.0, ROCm 7.14 | Official |
| Radeon RX 6650 XT | gfx1032 | none (2.6.0 onward) | Never |
| Radeon RX 6750 XT | gfx1031 | none (2.6.0 onward) | Never |
| Radeon RX 6950 XT | gfx1030 | 2.14.0, ROCm 7.14 | Runs, not officially listed |
| Radeon RX 7900 XT | gfx1100 | 2.14.0, ROCm 7.14 | Official |
| Radeon RX 7900 XTX | gfx1100 | 2.14.0, ROCm 7.14 | Official |
| Instinct MI250X | gfx90a | 2.14.0, ROCm 7.14 | Official |
| Radeon RX 6600 | gfx1032 | none (2.6.0 onward) | Never |
| Radeon RX 6700 XT | gfx1031 | none (2.6.0 onward) | Never |
| Instinct MI100 | gfx908 | 2.14.0, ROCm 7.14 | Official |
| Radeon RX 6800 | gfx1030 | 2.14.0, ROCm 7.14 | Runs, not officially listed |
| Radeon RX 6800 XT | gfx1030 | 2.14.0, ROCm 7.14 | Runs, not officially listed |
| Radeon RX 6900 XT | gfx1030 | 2.14.0, ROCm 7.14 | Runs, not officially listed |
| Radeon VII | gfx906 | 2.14.0, ROCm 7.2 | Dropped |
| Radeon Instinct MI50 | gfx906 | 2.14.0, ROCm 7.2 | Dropped |
| Radeon Instinct MI60 | gfx906 | 2.14.0, ROCm 7.2 | Dropped |
| Radeon Instinct MI25 | gfx900 | 2.14.0, ROCm 7.2 | Dropped before ROCm 4.5.0 |
| Radeon Instinct MI6 | gfx803 | none (2.6.0 onward) | Dropped before ROCm 4.5.0 |
| Radeon Instinct MI8 | gfx803 | none (2.6.0 onward) | Dropped before ROCm 4.5.0 |
A build existing isn't the same as AMD supporting the card: PyTorch keeps compiling some older targets into builds for ROCm releases that no longer support them. The install checker picks the right pairing for your card and explains which kind it is.
Cards no build covers
For targets no PyTorch build includes, like the RX 6700 XT's gfx1031, the usual workaround is HSA_OVERRIDE_GFX_VERSION, which makes ROCm treat the card as a supported target from the same generation. It's unofficial and can break in subtle ways; seeROCm on consumer GPUs for when it works. For llama.cpp, the Vulkan backend avoids the question entirely.
Sources: each PyTorch ROCm build's gfx list from PyTorch's .ci/docker/manywheel/build.sh at each release; AMD's per-card support lists from the ROCm documentation (see ROCm versions); error text from ROCm's HIP runtime (hip_error.cpp, and hip_code_object.cpp in ROCm 6.3).