Skip to content

Studio: GGUF gpu_ids selection unsupported on torch-less Vulkan-only hosts #7201

Closed

Description

@danielhanchen

Follow-up from #7188 (which adds GGUF gpu_ids selection + Vulkan --device translation).

Limitation

On a torch-less Vulkan-only host (AMD APU / Intel iGPU with a Vulkan llama.cpp build and no CUDA/ROCm torch), with CUDA_VISIBLE_DEVICES unset:

  • get_device() returns CPU, so get_physical_gpu_count() is 0 and get_parent_visible_gpu_ids() returns [].
  • The route's up-front resolve_requested_gpu_ids([N]) rejects with 'outside the parent-visible set []' (HTTP 400).
  • Even if the route resolve were skipped, the backend's Vulkan translation parent_visible.index(g) raises identically on the empty set.

So explicit gpu_ids selection is unreachable on exactly the host class the Vulkan --device path targets.

Not a regression

Before #7188, GGUF + gpu_ids was a hard 400 for all hosts. After #7188 it works on hosts with physical enumeration (ROCm/CUDA present, or CUDA_VISIBLE_DEVICES set) and still 400s on torch-less Vulkan-only hosts, so those users are no worse off; this issue tracks completing the feature there.

Why it is not a minimal in-PR fix

  • Gating the route resolve on get_device() bypasses the resolver on GPU-less CI and breaks the hermetic route tests (test_gpu_selection / test_chat_load_during_training) that assert the up-front 400s.
  • It requires a route+backend coordinated change and a decision on what gpu_ids means on a non-CUDA host (physical CUDA id vs compact Vulkan ordinal).

Proposed direction

  • Enumerate physical/Vulkan devices from the ggml Vulkan probe when get_device()==CPU and a Vulkan build is present, and let the backend validate gpu_ids against that probe (treating them as Vulkan ordinals) instead of the CUDA/HIP parent-visible set.
  • Add a regression test that does NOT patch get_parent_visible_gpu_ids to a non-empty list.

Activity

  1. danielhanchen commented on Aug 28, 2026

    @danielhanchen
    MemberAuthor

    This should be supported now - sorry on the delay - please update Unsloth Studio to the latest via curl -fsSL https://unsloth.ai/install.sh | sh for Linux, Mac, WSL or irm https://unsloth.ai/install.ps1 | iex for Windows - if it's not supported yet, it'll be in the next Studio release - if it's still not working after that, please open another issue - appreciate it again!

    GGUF GPU selection now validates and pins in ggml Vulkan ordinals, so picking a device works on a Vulkan-only build with no torch installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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