mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
* gnu/packages/patches/llama-cpp-vulkan-optional.patch: Make the runtime check safer. Change-Id: If72148fb3e8bf500d35c0987126a788ec410cdbd
23 lines
707 B
Diff
23 lines
707 B
Diff
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 ®
|
|
+ try {
|
|
+ ggml_vk_instance_init();
|
|
+ return ®
|
|
+ } catch (const vk::SystemError& e) {
|
|
+ VK_LOG_DEBUG("ggml_vk_get_device_count() -> Error: System error: " << e.what());
|
|
+ return nullptr;
|
|
+ }
|
|
}
|
|
|
|
// Extension availability
|