Repository navigation
vulkan: clearer message when --gpu vulkan is explicitly unavailable - #1006
Merged
Merged
Conversation
When Vulkan is explicitly requested (--gpu vulkan) but the probe finds no usable device -- or the driver faulted during probe and was skipped to keep the process alive (the #988 out-of-process probe / crash guard) -- we still exit(1) rather than silently downgrading to CPU, which would surprise users with ~10x slower inference. But the old message ('it wasn't available') gave no next step. Spell out the two causes and point at --gpu auto (graceful fallback) and --gpu disabled (force CPU). Behavior unchanged; messaging only. --gpu auto already falls back silently. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
When Vulkan is explicitly requested (
--gpu vulkan) but no usable device is found, llamafile already exits with a fatal error instead of silently downgrading to CPU. This keeps that behavior (a silent downgrade would surprise users with ~10× slower inference on an explicit GPU request) but replaces the dead-end message:with an actionable one that names the two real causes and the way forward:
Why
The "driver failed/crashed during probe and was skipped" case is real on some Windows configurations (e.g. certain Intel iGPU setups, issue #938), where the out-of-process probe / crash guard (#988) correctly skips a faulting backend so the process stays alive. In
--gpu autothat already falls back to CPU silently and correctly; only the explicit-request path surfaced a message that left users with no next step.Scope
--gpu autofallback and theexit(1)on explicit request are unchanged.llamafile/vulkan.conly (11 lines). The siblingcuda.c/metal.cmessages could get the same treatment in a follow-up if desired.🤖 Generated with Claude Code