Skip to content

Commit 2f77e82

Browse files
committed
fix type
1 parent 09661b9 commit 2f77e82

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

ggml/src/ggml-metal/ggml-metal.metal

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4155,28 +4155,28 @@ kernel void kernel_conv_transpose_2d(
41554155

41564156
float v = 0.0f;
41574157

4158-
for (int32_t in_c = 0; in_c<args.IC; in_c++){
4159-
for (int32_t kh = 0; kh<args.KH; kh++){
4158+
for (int64_t in_c = 0; in_c<args.IC; in_c++){
4159+
for (int64_t kh = 0; kh<args.KH; kh++){
41604160

4161-
int32_t in_y = out_y - kh;
4161+
int64_t in_y = out_y - kh;
41624162

41634163
if (in_y < 0 || in_y % args.s0) continue;
41644164

41654165
in_y /= args.s0;
41664166

41674167
if (in_y >= args.IH) continue;
41684168

4169-
for (int32_t kw = 0; kw<args.KW; kw++){
4170-
int32_t in_x = out_x - kw;
4169+
for (int64_t kw = 0; kw<args.KW; kw++){
4170+
int64_t in_x = out_x - kw;
41714171

41724172
if (in_x <0 || in_x % args.s0) continue;
41734173

41744174
in_x /= args.s0;
41754175

41764176
if (in_x >= args.IW) continue;
41774177

4178-
const int32_t input_idx = (args.IW * args.IH) * in_c + (args.IW) * in_y + in_x;
4179-
const int32_t kernel_idx = (args.KH * args.KW * args.OC) * in_c + (args.KH * args.KW) * out_c + (args.KW) * kh + kw;
4178+
const int64_t input_idx = (args.IW * args.IH) * in_c + (args.IW) * in_y + in_x;
4179+
const int64_t kernel_idx = (args.KH * args.KW * args.OC) * in_c + (args.KH * args.KW) * out_c + (args.KW) * kh + kw;
41804180

41814181
v += (float)src0[kernel_idx] * src1[input_idx];
41824182

0 commit comments

Comments
 (0)