Skip to content

Commit 38593bc

Browse files
authored
fix cut'n'paste error
1 parent 6be1307 commit 38593bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,7 +1271,7 @@ kernel void kernel_geglu_erf(
12711271
const float x0 = src0_row[i0];
12721272
const float x1 = src1_row[i0];
12731273

1274-
const float gelu_erf = 0.5f*x*(1.0f+erf_approx<float>(x*SQRT_2_INV));
1274+
const float gelu_erf = 0.5f*x0*(1.0f+erf_approx<float>(x0*SQRT_2_INV));
12751275

12761276
dst_row[i0] = gelu_erf*x1;
12771277
}
@@ -1293,7 +1293,7 @@ kernel void kernel_geglu_quick(
12931293
const float x0 = src0_row[i0];
12941294
const float x1 = src1_row[i0];
12951295

1296-
const float gelu_quick = x*(1.0f/(1.0f+exp(GELU_QUICK_COEF*x)));
1296+
const float gelu_quick = x0*(1.0f/(1.0f+exp(GELU_QUICK_COEF*x0)));
12971297

12981298
dst_row[i0] = gelu_quick*x1;
12991299
}

0 commit comments

Comments
 (0)