From d723b4943be99860cd63ed9fa89a1a1fd219cd0b Mon Sep 17 00:00:00 2001 From: rasbid <104773487+rasbid@users.noreply.github.com> Date: Mon, 13 Oct 2025 20:00:23 +0300 Subject: [PATCH] Add AMD GCN Vulkan pipeline subgroup overrides --- ggml/src/ggml-vulkan/ggml-vulkan.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ggml/src/ggml-vulkan/ggml-vulkan.cpp b/ggml/src/ggml-vulkan/ggml-vulkan.cpp index ebbb412e55f..cc84c6136ae 100644 --- a/ggml/src/ggml-vulkan/ggml-vulkan.cpp +++ b/ggml/src/ggml-vulkan/ggml-vulkan.cpp @@ -2324,10 +2324,25 @@ static const std::unordered_map rdna2_pipelines = { {"soft_max", 64}, {"im2col", 64}, }; +// Pipeline configuration for GCN GPUs. +static const std::unordered_map amd_gcn_pipelines = { + {"mul_mat_vec", 64}, + {"soft_max", 64}, + {"im2col", 64}, +}; + static constexpr uint32_t RDNA_DEFAULT_SUBGROUP_SIZE = 32; +static constexpr uint32_t GCN_DEFAULT_SUBGROUP_SIZE = 64; // Define configurations for different GPUs. static std::vector gpu_pipeline_configs = { + { + vk_device_architecture::AMD_GCN, + { + amd_gcn_pipelines, + }, + GCN_DEFAULT_SUBGROUP_SIZE + }, { vk_device_architecture::AMD_RDNA1, {