"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 device
RuntimeError: HIP error: invalid device function

Why 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

GPUgfx targetNewest PyTorch ROCm build for itAMD support today
Instinct MI350Xgfx9502.14.0, ROCm 7.14Official
Instinct MI355Xgfx9502.14.0, ROCm 7.14Official
Radeon AI PRO R9700gfx12012.14.0, ROCm 7.14Official
Radeon RX 9060 XT (16GB)gfx12002.14.0, ROCm 7.14Official
Radeon RX 9060 XT (8GB)gfx12002.14.0, ROCm 7.14Official
Radeon RX 9070gfx12012.14.0, ROCm 7.14Official
Radeon RX 9070 XTgfx12012.14.0, ROCm 7.14Official
Ryzen AI Max+ 395gfx11512.14.0, ROCm 7.14Official
Instinct MI325Xgfx9422.14.0, ROCm 7.14Official
Radeon RX 7600 XTgfx11022.14.0, ROCm 7.14Runs, not officially listed
Instinct MI300Agfx9422.14.0, ROCm 7.14Official
Instinct MI300Xgfx9422.14.0, ROCm 7.14Official
Radeon RX 7700 XTgfx11012.14.0, ROCm 7.14Official
Radeon RX 7800 XTgfx11012.14.0, ROCm 7.14Official
Radeon RX 7900 GREgfx11002.14.0, ROCm 7.14Official
Instinct MI210gfx90a2.14.0, ROCm 7.14Official
Radeon RX 6650 XTgfx1032none (2.6.0 onward)Never
Radeon RX 6750 XTgfx1031none (2.6.0 onward)Never
Radeon RX 6950 XTgfx10302.14.0, ROCm 7.14Runs, not officially listed
Radeon RX 7900 XTgfx11002.14.0, ROCm 7.14Official
Radeon RX 7900 XTXgfx11002.14.0, ROCm 7.14Official
Instinct MI250Xgfx90a2.14.0, ROCm 7.14Official
Radeon RX 6600gfx1032none (2.6.0 onward)Never
Radeon RX 6700 XTgfx1031none (2.6.0 onward)Never
Instinct MI100gfx9082.14.0, ROCm 7.14Official
Radeon RX 6800gfx10302.14.0, ROCm 7.14Runs, not officially listed
Radeon RX 6800 XTgfx10302.14.0, ROCm 7.14Runs, not officially listed
Radeon RX 6900 XTgfx10302.14.0, ROCm 7.14Runs, not officially listed
Radeon VIIgfx9062.14.0, ROCm 7.2Dropped
Radeon Instinct MI50gfx9062.14.0, ROCm 7.2Dropped
Radeon Instinct MI60gfx9062.14.0, ROCm 7.2Dropped
Radeon Instinct MI25gfx9002.14.0, ROCm 7.2Dropped before ROCm 4.5.0
Radeon Instinct MI6gfx803none (2.6.0 onward)Dropped before ROCm 4.5.0
Radeon Instinct MI8gfx803none (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).

← All error fixes