Skip to content

llama : allow virtual igpu devices - #26953

Merged
ggerganov merged 2 commits into
masterfrom
gg/llama-allow-virtual-igpu-devices
Aug 14, 2026
Merged

ggerganov merged 2 commits into
masterfrom
gg/llama-allow-virtual-igpu-devices

Conversation

@ggerganov

@ggerganov ggerganov commented Aug 12, 2026 •

Copy link
Copy Markdown
Member

Overview

cont #23897
fix #25228 (comment)

Allow adding multiple iGPU devices of the same backend (e.g. CUDA). For example, this is useful when using virtual CUDA devices (#25228) on DGX Spark (treated as "integrated" GPU).

GGML_CUDA_DEVICES=2 ./bin/llama-completion -hf ggml-org/Qwen3-0.6B-GGUF:Q8_0 -p "I believe the meaning of life is" -n 32 --sampling-seq "k" --top-k 1 -no-cnv -lv 4
0.01.573.213 I common_memory_breakdown_print: | memory breakdown [MiB]                                 | total    free    self   model   context   compute    unaccounted |
0.01.573.215 I common_memory_breakdown_print: |   - CUDA0 (GB10 (physical device 0, virtual device 0)) | 61286 = 55454 + (2831 =   239 +    2400 +     192) +        3000 |
0.01.573.216 I common_memory_breakdown_print: |   - CUDA1 (GB10 (physical device 0, virtual device 1)) | 61286 = 55454 + (2919 =   364 +    2080 +     474) +        2912 |
0.01.573.216 I common_memory_breakdown_print: |   - Host   

CI run: https://github.com/ggml-org/llama.cpp/actions/runs/31581256852/job/94064620191

Requirements

@ggerganov
ggerganov requested a review from 0cc4m August 12, 2026 08:37
@0cc4m

0cc4m commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Is it not possible to just set -dev for those virtual GPU CI cases? It sounds like an edge case that doesn't really warrant a code change for default device selection. But if that is not possible this PR is probably fine.

@ggerganov

Copy link
Copy Markdown
Member Author

The goal is virtual devices to become widely used in the CI, so not really an edge case. In any case, it's not more of an edge case compared to the use case that introduced this workaround in #23897. The idea when specifying virtual devices is for the developers to get the same experience as if they had multiple GPUs on their machine, which does not require listing them with -dev normally.

Comment thread src/llama.cpp Outdated
@ggerganov
ggerganov force-pushed the gg/llama-allow-virtual-igpu-devices branch from 0adbd9a to 30b7913 Compare August 14, 2026 06:14
@0cc4m

0cc4m commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

I don't agree my original case was an edge case, it was just trying to use an Nvidia/AMD iGPU on a llama.cpp version compiled with CUDA/ROCm + Vulkan support.

But regardless, I can't think of a case where the logic of this PR would cause an issue, so it's probably fine.

@ggerganov
ggerganov merged commit 4c1a0af into master Aug 14, 2026
23 of 28 checks passed
@ggerganov
ggerganov deleted the gg/llama-allow-virtual-igpu-devices branch August 14, 2026 12:14
brittlewis12 pushed a commit to brittlewis12/llama.cpp that referenced this pull request Aug 17, 2026
* llama : allow virtual igpu devices

* cont : better comment
thecodacus pushed a commit to thecodacus/llama.cpp that referenced this pull request Sep 7, 2026
* llama : allow virtual igpu devices

* cont : better comment
zbrad pushed a commit to zbrad/llama.cpp that referenced this pull request Sep 10, 2026
* llama : allow virtual igpu devices

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants