From 73af4de996897cb45dcf5034d16a551a3cf476f7 Mon Sep 17 00:00:00 2001 From: talregev Date: Wed, 8 Oct 2025 20:44:00 +0300 Subject: [PATCH] [ggml] Remove unnecessary patch (#47691) --- ports/ggml/vcpkg.json | 1 + ports/ggml/vulkan-loader-storage.diff | 44 --------------------------- versions/baseline.json | 2 +- versions/g-/ggml.json | 5 +++ 4 files changed, 7 insertions(+), 45 deletions(-) delete mode 100644 ports/ggml/vulkan-loader-storage.diff diff --git a/ports/ggml/vcpkg.json b/ports/ggml/vcpkg.json index 7ba09534a2..8ee70b44d5 100644 --- a/ports/ggml/vcpkg.json +++ b/ports/ggml/vcpkg.json @@ -1,6 +1,7 @@ { "name": "ggml", "version": "0.9.4", + "port-version": 1, "description": "Tensor library for machine learning", "homepage": "https://github.com/ggml-org/ggml", "license": "MIT", diff --git a/ports/ggml/vulkan-loader-storage.diff b/ports/ggml/vulkan-loader-storage.diff deleted file mode 100644 index f6ab10ed26..0000000000 --- a/ports/ggml/vulkan-loader-storage.diff +++ /dev/null @@ -1,44 +0,0 @@ -diff --git a/src/ggml-vulkan/ggml-vulkan.cpp b/src/ggml-vulkan/ggml-vulkan.cpp -index ebbb412e55f4b..977e38f79b66d 100644 ---- a/src/ggml-vulkan/ggml-vulkan.cpp -+++ b/src/ggml-vulkan/ggml-vulkan.cpp -@@ -7,12 +7,14 @@ - - // See https://github.com/KhronosGroup/Vulkan-Hpp?tab=readme-ov-file#extensions--per-device-function-pointers- - #define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 1 -+// We use VULKAN_HPP_DEFAULT_DISPATCHER, but not VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE -+// to avoid conflicts with applications or other libraries who might use it. -+namespace vk::detail { class DispatchLoaderDynamic; } -+vk::detail::DispatchLoaderDynamic & ggml_vk_default_dispatcher(); -+#define VULKAN_HPP_DEFAULT_DISPATCHER ggml_vk_default_dispatcher() - - #include - --// See https://github.com/KhronosGroup/Vulkan-Hpp?tab=readme-ov-file#extensions--per-device-function-pointers- --VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE -- - #include - #include - #include -@@ -4498,6 +4500,12 @@ static bool ggml_vk_instance_portability_enumeration_ext_available(const std::ve - static bool ggml_vk_instance_debug_utils_ext_available(const std::vector & instance_extensions); - static bool ggml_vk_device_is_supported(const vk::PhysicalDevice & vkdev); - -+static vk::detail::DispatchLoaderDynamic ggml_vk_default_dispatcher_instance; -+ -+vk::detail::DispatchLoaderDynamic & ggml_vk_default_dispatcher() { -+ return ggml_vk_default_dispatcher_instance; -+} -+ - static void ggml_vk_instance_init() { - if (vk_instance_initialized) { - return; -@@ -4505,7 +4513,7 @@ static void ggml_vk_instance_init() { - VK_LOG_DEBUG("ggml_vk_instance_init()"); - - // See https://github.com/KhronosGroup/Vulkan-Hpp?tab=readme-ov-file#extensions--per-device-function-pointers- -- VULKAN_HPP_DEFAULT_DISPATCHER.init(vkGetInstanceProcAddr); -+ ggml_vk_default_dispatcher_instance.init(vkGetInstanceProcAddr); - - uint32_t api_version = vk::enumerateInstanceVersion(); - diff --git a/versions/baseline.json b/versions/baseline.json index 463a54a6f9..582392de8d 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3286,7 +3286,7 @@ }, "ggml": { "baseline": "0.9.4", - "port-version": 0 + "port-version": 1 }, "ghc-filesystem": { "baseline": "1.5.14", diff --git a/versions/g-/ggml.json b/versions/g-/ggml.json index 2df9fb6487..8b6e7a574a 100644 --- a/versions/g-/ggml.json +++ b/versions/g-/ggml.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "75f950cbe4289050f3f580709fe3f387b2a1bd74", + "version": "0.9.4", + "port-version": 1 + }, { "git-tree": "c52c163a8197eb8200068213e3732495628a2148", "version": "0.9.4",