From 1783236b0544dc55ac14f891a1e8a83a91ea83d8 Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Sat, 27 Jun 2026 16:44:48 +0800 Subject: [PATCH] fix for https://github.com/ggml-org/llama.cpp/issues/21724 , and use wbruna's heuristic https://github.com/ggml-org/llama.cpp/pull/24872 --- ggml/src/ggml-vulkan/ggml-vulkan.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ggml/src/ggml-vulkan/ggml-vulkan.cpp b/ggml/src/ggml-vulkan/ggml-vulkan.cpp index 3b7abe0c7..1b7542257 100644 --- a/ggml/src/ggml-vulkan/ggml-vulkan.cpp +++ b/ggml/src/ggml-vulkan/ggml-vulkan.cpp @@ -5907,7 +5907,8 @@ static vk_device ggml_vk_get_device(size_t idx) { (vk11_props.subgroupSupportedOperations & vk::SubgroupFeatureFlagBits::eVote); // Submit at least every 100 nodes, in case there are workloads without as much matmul. - device->max_nodes_per_submit = 100; + // device->max_nodes_per_submit = 100; + device->max_nodes_per_submit = device->uma ? 8 : 64; //kcpp fix for https://github.com/ggml-org/llama.cpp/issues/21724 const char* GGML_VK_MAX_NODES_PER_SUBMIT = getenv("GGML_VK_MAX_NODES_PER_SUBMIT"); if (GGML_VK_MAX_NODES_PER_SUBMIT != nullptr) { uint32_t max_nodes_per_submit = std::stoul(GGML_VK_MAX_NODES_PER_SUBMIT);