llama : add missing call to ggml_backend_load_all() (#22752)

Signed-off-by: Adrien Gallouët <angt@huggingface.co>
This commit is contained in:
Adrien Gallouët 2026-05-07 07:24:47 +02:00 committed by GitHub
parent 2496f9c149
commit 3980e04d5a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -71,12 +71,18 @@ bool llama_supports_mlock(void) {
}
bool llama_supports_gpu_offload(void) {
if (!ggml_backend_reg_count()) {
ggml_backend_load_all();
}
return ggml_backend_dev_by_type(GGML_BACKEND_DEVICE_TYPE_GPU) != nullptr ||
ggml_backend_dev_by_type(GGML_BACKEND_DEVICE_TYPE_IGPU) != nullptr ||
llama_supports_rpc();
}
bool llama_supports_rpc(void) {
if (!ggml_backend_reg_count()) {
ggml_backend_load_all();
}
return ggml_backend_reg_by_name("RPC") != nullptr;
}