diff --git a/ggml/src/ggml-vulkan/vulkan-shaders/mul_mmq_cm1.comp b/ggml/src/ggml-vulkan/vulkan-shaders/mul_mmq_cm1.comp index 38f38a2b26..fb63acc06c 100644 --- a/ggml/src/ggml-vulkan/vulkan-shaders/mul_mmq_cm1.comp +++ b/ggml/src/ggml-vulkan/vulkan-shaders/mul_mmq_cm1.comp @@ -86,10 +86,10 @@ const uint QPITCH = BK_STEP * (BK / 4) + 4; // Shared memory cache shared uint32_t buf_a_qs[BM * QPITCH]; -shared float16_t buf_a_d[BM * BK_STEP]; +shared float buf_a_d[BM * BK_STEP]; shared uint32_t buf_b_qs[BN * QPITCH]; -shared float16_t buf_b_d[BN * BK_STEP]; +shared float buf_b_d[BN * BK_STEP]; #define LOAD_VEC_A (4 * QUANT_R) #define LOAD_VEC_B 16 @@ -283,7 +283,7 @@ void main() { const uint idx = li * BK_STEP + ks; \ STORE_A_QS(buf_ib, ks, idx) \ if (loadr_a == 0) { \ - buf_a_d[ks * BM + buf_ib] = pre_a_d[idx]; \ + buf_a_d[ks * BM + buf_ib] = float(pre_a_d[idx]); \ } \ } \ } \ @@ -301,7 +301,7 @@ void main() { buf_b_qs[base + 2] = v.z; \ buf_b_qs[base + 3] = v.w; \ if (loadr_b == 0) { \ - buf_b_d[ks * BN + buf_ib] = in_bounds ? pre_b_d[idx] : float16_t(0.0); \ + buf_b_d[ks * BN + buf_ib] = in_bounds ? float(pre_b_d[idx]) : 0.0f; \ } \ } \ } \ diff --git a/ggml/src/ggml-vulkan/vulkan-shaders/mul_mmq_cm1_funcs.glsl b/ggml/src/ggml-vulkan/vulkan-shaders/mul_mmq_cm1_funcs.glsl index 3f9a1c440e..14cb6bfd87 100644 --- a/ggml/src/ggml-vulkan/vulkan-shaders/mul_mmq_cm1_funcs.glsl +++ b/ggml/src/ggml-vulkan/vulkan-shaders/mul_mmq_cm1_funcs.glsl @@ -29,7 +29,7 @@ void block_a_to_shmem(const uint buf_ib, const uint ib, const uint iqs, const ui if (iqs == 0) { #ifdef DATA_A_Q4_0 - buf_a_d[ks * BM + buf_ib] = FLOAT_TYPE(data_a_packed16[ib].d); + buf_a_d[ks * BM + buf_ib] = float(data_a_packed16[ib].d); #else // DATA_A_Q4_1 #endif } @@ -51,7 +51,7 @@ void block_a_to_shmem(const uint buf_ib, const uint ib, const uint iqs, const ui buf_a_qs[buf_ib * QPITCH + ks * (BK / 4) + iqs] = vui; if (iqs == 0) { - buf_a_d[ks * BM + buf_ib] = FLOAT_TYPE(data_a_packed16[ib].d); + buf_a_d[ks * BM + buf_ib] = float(data_a_packed16[ib].d); } } #endif @@ -83,7 +83,7 @@ void block_b_to_shmem(const uint buf_ib, const uint ib, const uint iqs, const ui const uint ib_inner = ib % 4; if (iqs == 0) { - buf_b_d[ks * BN + buf_ib] = data_b[ib_outer].ds[ib_inner].x; + buf_b_d[ks * BN + buf_ib] = float(data_b[ib_outer].ds[ib_inner].x); } const ivec4 values = data_b[ib_outer].qs[ib_inner * 2 + iqs];