]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
llama : skip main_gpu validation when no devices are available (#23405)
authorDev-iL <redacted>
Wed, 17 Jun 2026 14:30:26 +0000 (17:30 +0300)
committerGitHub <redacted>
Wed, 17 Jun 2026 14:30:26 +0000 (17:30 +0300)
src/llama.cpp

index a67fa8039a48df3415bee04d4c0bae9c2db02906..0de6048f2820f78fe8486ffff6ee930074517eeb 100644 (file)
@@ -249,7 +249,7 @@ static bool llama_prepare_model_devices(const llama_model_params & params, llama
     }
 
     // if using single GPU mode, remove all except the main GPU
-    if (params.split_mode == LLAMA_SPLIT_MODE_NONE) {
+    if (params.split_mode == LLAMA_SPLIT_MODE_NONE && !model->devices.empty()) {
         if (params.main_gpu < 0) {
             model->devices.clear();
         } else {