~ruther/guix-local

ref: 35dcc2845ac3114c96c3946ffee5bd6985bb3d37 guix-local/gnu/packages/patches/llama-cpp-vulkan-optional.patch -rw-r--r-- 707 bytes
35dcc284 — Danny Milosavljevic gnu: gimp: Enable xpm support. 1 year, 1 month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Author: Danny Milosavljevic <dannym@friendly-machines.com>
Date: 2025-01-29
License: Expat
Subject: Make Vulkan optional

--- orig/llama.cpp/ggml/src/ggml-vulkan/ggml-vulkan.cpp	2025-01-29 10:24:10.922476480 +0100
+++ llama.cpp/ggml/src/ggml-vulkan/ggml-vulkan.cpp	2025-01-29 22:33:19.955087552 +0100
@@ -8174,8 +8174,13 @@
         /* .iface       = */ ggml_backend_vk_reg_i,
         /* .context     = */ nullptr,
     };
-
-    return &reg;
+    try {
+        ggml_vk_instance_init();
+        return &reg;
+    } catch (const vk::SystemError& e) {
+        VK_LOG_DEBUG("ggml_vk_get_device_count() -> Error: System error: " << e.what());
+        return nullptr;
+    }
 }
 
 // Extension availability