Skip to content

Commit fa9a935

Browse files
Merge pull request #93 from ggml-org/master
opencl: fix `im2col` when `KW!=KH` (ggml-org#14803)
2 parents 711550c + 38d3af1 commit fa9a935

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)