Repository navigation
Gemma 4 vLLM fallback: check the engine's GPU, not the current one - #14778
Merged
Merged
Conversation
_vllm_needs_newer_gpu read torch.cuda.get_device_capability() with no device, which is the current card. fast_inference's vLLM engine runs on unsloth_zoo's target device (cuda:0; vLLM's UniProcExecutor takes the device config's index, 0 when unset). With a T4 current and an A100 as cuda:0 the check switched vLLM off for nothing, and the reverse kept vLLM on for a card that cannot run Gemma 4. Ask on get_target_device(), falling back to cuda:0 for an older zoo. One GPU: same card, same answer.
Member
Author
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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.
The Gemma 4 fast_inference fallback (vLLM has no attention backend for it below
sm80) asked torch.cuda.get_device_capability() with no device, which reads the
current card. The vLLM engine runs on unsloth_zoo's target device instead
(cuda:0: unsloth passes no device, and vLLM's UniProcExecutor takes the device
config's index, 0 when unset). On a host with two GPU models the check could
answer for the wrong card:
Changes
cuda:0 when an older zoo lacks it.
One GPU hosts are unchanged: the engine card is the current card. Non CUDA
devices and a failed probe behave as before.
Tests: tests/test_fast_inference_old_gpu_fallback.py now mocks a per device
capability. The four mixed GPU cases fail on main and pass here; the single GPU
and existing cases pass on both, with a GPU visible and with
CUDA_VISIBLE_DEVICES="".