mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-08-17 12:25:18 +00:00
llama : allow virtual igpu devices (#26953)
* llama : allow virtual igpu devices * cont : better comment
This commit is contained in:
parent
77918caf30
commit
4c1a0af40d
1 changed files with 5 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue