We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a1de8bd commit 7f12441Copy full SHA for 7f12441
ggml/src/ggml-sycl/tsembd.cpp
@@ -21,11 +21,12 @@ static void timestep_embedding_f32(
21
int j = item_ct1.get_local_id(2) + item_ct1.get_group(2) * item_ct1.get_local_range(2);
22
float * embed_data = (float *)((char *)dst + i*nb1);
23
24
- if (dim % 2 != 0 && j == ((dim + 1) / 2)) {
25
- embed_data[dim] = 0.f;
+ int half = dim / 2;
+
26
+ if (dim % 2 != 0 && j == half) {
27
+ embed_data[2 * half] = 0.f;
28
}
29
- int half = dim / 2;
30
if (j >= half) {
31
return;
32
0 commit comments