RUNLOCALAIv38
->Will it run?Best GPUCompareTroubleshootStartLearnPulseModelsHardwareToolsBench
Run check
RUNLOCALAI

Independently operated catalog for local-AI hardware and software. Hand-written verdicts. Source-cited claims. Reproducible commands when we have them.

OP·Fredoline Eruo
DIR
  • Models
  • Hardware
  • Tools
  • Benchmarks
TOOLS
  • Will it run?
  • Compare hardware
  • Cost vs cloud
  • Choose my GPU
  • Prompting kits
  • Quick answers
REF
  • All buyer guides
  • Learn local AI
  • Methodology
  • Glossary
  • Errors KB
  • Trust
EDITOR
  • About
  • Author
  • How we make money
  • Editorial policy
  • Contact
LEGAL
  • Privacy
  • Terms
  • Sitemap
MAIL · MONTHLY DIGEST
Get monthly local AI changes
Monthly recap. No spam.
DISCLOSURE

Some links on this site are affiliate links (Amazon Associates and other first-class retailers). When you buy through them, we earn a small commission at no extra cost to you. Affiliate links do not influence our verdicts — there are cards we rate highly that we don't have affiliate relationships with, and cards that sell well that we refuse to recommend. Read more →

© 2026 runlocalai.coIndependently operated
RUNLOCALAI · v38
Errors / ROCm / AMD / ROCm: hipErrorInvalidDeviceFunction on RX 7000-series
ROCm / AMD

ROCm: hipErrorInvalidDeviceFunction on RX 7000-series

HIP error: invalid device function / hipErrorInvalidDeviceFunction (typical wording when HSA_OVERRIDE_GFX_VERSION is unset or the kernel was built for a different gfx target)
By Fredoline Eruo · Last verified Jun 12, 2026

Cause

Environment: AMD RDNA3 cards (RX 7900 XTX, RX 7800 XT, W7900) on Linux with ROCm 6.x running vLLM, PyTorch ROCm, or llama.cpp HIP backend.

Severity: high — kernels fail to launch on this device.

  • The pre-built kernel is pinned to a different gfx target (e.g. compiled for gfx1030 / RDNA2 but you're on gfx1100)
  • ROCm version is older than the GPU (RX 7900 XTX requires ROCm 5.7+; full support arrives in 6.x)
  • Mixed PyTorch ROCm wheel + system ROCm drift
  • Multi-GPU host with a mix of RDNA2 + RDNA3 cards and ROCR_VISIBLE_DEVICES not set

Solution

1. Set HSA_OVERRIDE_GFX_VERSION to make ROCm dispatch RDNA2 kernels onto your RDNA3 card (works because RDNA3 ISA is mostly backward-compat for compute):

# RX 7900 XTX / 7800 XT (gfx1100)
export HSA_OVERRIDE_GFX_VERSION=11.0.0
# RX 6000-series (gfx1030)
export HSA_OVERRIDE_GFX_VERSION=10.3.0

Add to ~/.bashrc or your systemd service env-file.

2. Upgrade ROCm (preferred over override on RDNA3):

sudo amdgpu-install --uninstall
sudo amdgpu-install -y --usecase=rocm --rocmrelease=6.3

3. Reinstall PyTorch with matching ROCm wheel:

pip install --force-reinstall torch \
  --index-url https://download.pytorch.org/whl/rocm6.3

4. Pin the visible device if you have mixed-gen GPUs:

export ROCR_VISIBLE_DEVICES=0
export HIP_VISIBLE_DEVICES=0

5. Verify:

python -c "import torch; print(torch.cuda.is_available(), torch.cuda.get_device_name(0))"

Alternative solutions

If you're on RDNA1 (RX 5000) or Polaris (RX 580), ROCm 6 dropped support. Use the Vulkan backend in llama.cpp instead — pre-built binaries with -DGGML_VULKAN=ON work on every GPU with a Vulkan 1.2 driver.

Related errors

  • ROCm: HIP error: invalid device — no GPU detected
  • ROCm: HIP error: invalid device function
  • ROCm: HSA_STATUS_ERROR_INVALID_DEVICE — GPU not detected

Did this fix it?

If your case was different, email Contact support with what you saw and we'll update the page. If it worked but took different commands on your platform, we want to know that too.