Skip to content

Commit 7184682

Browse files
committed
opencl: recover broadcast semantic for mul_mv_mxfp4_f32_flat
1 parent 36676c0 commit 7184682

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ggml/src/ggml-opencl/kernels/mul_mv_mxfp4_f32_flat.cl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ kernel void kernel_mul_mv_mxfp4_f32_flat(
108108
uint i12 = im % ne12;
109109
uint i13 = im / ne12;
110110

111-
ulong offset_src0 = first_row * nb;
111+
uint offset_src0 = first_row*nb01 + (i12/r2)*nb02 + (i13/r3)*nb03;
112+
// 17 = sizeof(block_mxfp4)
113+
offset_src0 /= 17;
112114
#ifdef SRC0Q_IMG
113115
ulong offset_q = offset_src0;
114116
#else

0 commit comments

Comments
 (0)