From: Georgi Gerganov Date: Fri, 14 Aug 2026 12:14:19 +0000 (+0300) Subject: llama : allow virtual igpu devices (#26953) X-Git-Tag: upstream/0.0.10438~8 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=4c1a0af40d88c7fbb3b15c85bf2e8016d1d5b64c;p=pkg%2Fggml%2Fsources%2Fllama.cpp llama : allow virtual igpu devices (#26953) * llama : allow virtual igpu devices * cont : better comment --- diff --git a/src/llama.cpp b/src/llama.cpp index 9ff1902fc..1609fec88 100644 --- a/src/llama.cpp +++ b/src/llama.cpp @@ -257,7 +257,11 @@ static bool llama_prepare_model_devices(const llama_model_params & params, llama } case GGML_BACKEND_DEVICE_TYPE_IGPU: - if (igpus.empty()) { + // igpus.empty() - workaround for integrated devices seen by multiple backends + // ref: https://github.com/ggml-org/llama.cpp/pull/23897 + // ggml_backend_dev_backend_reg - allow devices of the same backend regardless if integrated + // ref: https://github.com/ggml-org/llama.cpp/pull/23897#issuecomment-5264222997 + if (igpus.empty() || ggml_backend_dev_backend_reg(dev) == ggml_backend_dev_backend_reg(igpus.back().dev)) { igpus.push_back({false, dev}); } break;