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 6be1307 commit 38593bcCopy full SHA for 38593bc
ggml/src/ggml-metal/ggml-metal.metal
@@ -1271,7 +1271,7 @@ kernel void kernel_geglu_erf(
1271
const float x0 = src0_row[i0];
1272
const float x1 = src1_row[i0];
1273
1274
- const float gelu_erf = 0.5f*x*(1.0f+erf_approx<float>(x*SQRT_2_INV));
+ const float gelu_erf = 0.5f*x0*(1.0f+erf_approx<float>(x0*SQRT_2_INV));
1275
1276
dst_row[i0] = gelu_erf*x1;
1277
}
@@ -1293,7 +1293,7 @@ kernel void kernel_geglu_quick(
1293
1294
1295
1296
- const float gelu_quick = x*(1.0f/(1.0f+exp(GELU_QUICK_COEF*x)));
+ const float gelu_quick = x0*(1.0f/(1.0f+exp(GELU_QUICK_COEF*x0)));
1297
1298
dst_row[i0] = gelu_quick*x1;
1299
0 commit comments