Skip to content

Commit b55c194

Browse files
committed
ggml-metal : fix padding in timestep embedding kernel
This commit fixes the zero padding for odd dimensions in the timestep embedding kernel
1 parent 5db73a8 commit b55c194

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4167,7 +4167,7 @@ kernel void kernel_timestep_embedding_f32(
41674167
}
41684168

41694169
if (args.dim % 2 != 0 && tpitg.x == 0) {
4170-
embed_data[args.dim] = 0.f;
4170+
embed_data[2 * half_] = 0.f;
41714171
}
41724172
}
41734173

0 commit comments

Comments
 (0)