Skip to content

[Bug] AMD: ROCm auto-selection picks a gfx1036 iGPU over the gfx1101 dGPU with the Studio-installed gfx110X prebuilt — "device kernel image is invalid" #7669

Closed

Description

@LeoBorcherding

Same defect as #7624, hit through the other install path: there the crash was with a custom-linked llama.cpp (UNSLOTH_LOCAL_LLAMA_CPP_DIR); here it's the Studio-installed prebuilt, where the bundle's built-arch list is known at install time and the wrong pick is fully preventable. Filed separately so the prebuilt-path fix has a tracking anchor; from a Discord support case.

Environment:

  • Windows 11, Unsloth Studio (fresh install)
  • RX 7700 XT (gfx1101, 12GB) + Ryzen 5 7600X with its Raphael iGPU (gfx1036) enabled
  • Studio-installed prebuilt b10107-mix-1911198-windows-x64-rocm-gfx110X (covers gfx1100–1103; no gfx1036)

What happens:

Every GGUF load crashes, including a 135MB SmolLM2:

GGUF size: 0.1 GB, est. KV cache: 0.2 GB, context: 8192, GPUs free: [(0, 12049), (1, 12176)], selected: [1], fit: False
llama-server exited with code 3221226505
ROCm error: device kernel image is invalid
  current device: 0, in function ggml_cuda_kernel_launch

Device 1 is the iGPU: its shared-RAM "free memory" (12176 MiB) narrowly outranks the dGPU (12049 MiB, desktop using a slice), so the free-memory heuristic pins llama-server to a device the gfx110X bundle has no kernels for. All four fit/flash-attn retries crash identically, and the surfaced error blames the GGUF/memory. hipinfo from the HIP SDK lists only the dGPU, which makes the two-device log line extra confusing for users.

Workaround (reporter-confirmed): $env:HIP_VISIBLE_DEVICES = "0" before unsloth studio (or disabling the iGPU in Device Manager). Model then loads and runs on the 7700 XT.

Suggested fix: the prebuilt's concrete mapped_targets list is already matched at install time (published_rocm_choice_for_host) — record it and gate device enumeration on it before the free-memory rank, plus a reactive "kernel image is invalid → retry on remaining GPUs" net for builds without a manifest (which would also cover #7624's custom-linked case). PR incoming.

Activity

  1. changed the title [-][Bug] Unsloth Studio: ROCm auto-selection picks a gfx1036 iGPU over the gfx1101 dGPU with the Studio-installed gfx110X prebuilt — "device kernel image is invalid"[/-] [+][Bug] AMD: ROCm auto-selection picks a gfx1036 iGPU over the gfx1101 dGPU with the Studio-installed gfx110X prebuilt — "device kernel image is invalid"[/+] on Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions