Skip to content

Commit 38d3af1

Browse files
authored
opencl: fix im2col when KW!=KH (#14803)
1 parent 6c9ee3b commit 38d3af1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ kernel void kernel_im2col_f16(
3131
src1 = (global float*)((global char*)src1 + offset1);
3232
dst = (global half*)((global char*)dst + offsetd);
3333

34-
long ksize = OW * (KH > 1 ? KW : 1);
34+
long ksize = OW * KH;
3535
long kx = i / ksize;
3636
long kd = kx * ksize;
3737
long ky = (i - kd) / OW;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ kernel void kernel_im2col_f32(
3131
src1 = (global float*)((global char*)src1 + offset1);
3232
dst = (global float*)((global char*)dst + offsetd);
3333

34-
long ksize = OW * (KH > 1 ? KW : 1);
34+
long ksize = OW * KH;
3535
long kx = i / ksize;
3636
long kd = kx * ksize;
3737
long ky = (i - kd) / OW;

0 commit comments

Comments
 (0)