Commit d4365d955 for llama.cpp

commit d4365d955488d21688c0a4d8d06bcfd68225ad01
Author: SG-Amadeus <74057036+SG-Amadeus@users.noreply.github.com>
Date:   Wed Sep 16 14:45:44 2026 +0800

    vulkan: make MUL_MAT_ID BN/2 tail unconditional (#28923)

    Use BN/2 as the default for BNover2 and as the disabled fallback for BNover4, and remove the enable gate from the MUL_MAT_ID BN/2 branch. The BN/4 branch remains gated by enable_smaller_matrices, while the p.N path is unchanged.

diff --git a/ggml/src/ggml-vulkan/vulkan-shaders/mul_mm_cm2.comp b/ggml/src/ggml-vulkan/vulkan-shaders/mul_mm_cm2.comp
index 189788a86..9b59e8bca 100644
--- a/ggml/src/ggml-vulkan/vulkan-shaders/mul_mm_cm2.comp
+++ b/ggml/src/ggml-vulkan/vulkan-shaders/mul_mm_cm2.comp
@@ -41,8 +41,8 @@ layout (constant_id = 2) const uint BN = 64;
 layout (constant_id = 3) const uint BK = 16;  // Assumed to be 32 if working with a quant

 layout (constant_id = 4) const bool enable_smaller_matrices = false;
-const uint BNover2 = enable_smaller_matrices ? (BN / 2) : BN;
-const uint BNover4 = enable_smaller_matrices ? (BN / 4) : BN;
+const uint BNover2 = BN / 2;
+const uint BNover4 = enable_smaller_matrices ? (BN / 4) : (BN / 2);
 layout (constant_id = 5) const uint ALIGNED = 0;
 layout (constant_id = 6) const uint subgroup_size = 32;

@@ -677,7 +677,7 @@ void main() {
             coopMatPerElementNV(mat_d, mat_d, perElemOpD, ir, ic);
             return;
         }
-        if (enable_smaller_matrices && ic * BN + BNover2 >= _ne1) {
+        if (ic * BN + BNover2 >= _ne1) {
             coopmat<ACC_TYPE, gl_ScopeWorkgroup, BM, BNover2, gl_MatrixUseAccumulator> sum;
             sum = coopmat<ACC_TYPE, gl_ScopeWorkgroup, BM, BNover2, gl_MatrixUseAccumulator>(0.0);