]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
metal : fix build "tanhf" -> "tanh"
authorGeorgi Gerganov <redacted>
Fri, 9 Jun 2023 08:11:04 +0000 (11:11 +0300)
committerGeorgi Gerganov <redacted>
Fri, 9 Jun 2023 08:11:04 +0000 (11:11 +0300)
ggml-metal.metal

index 745fe8ad30cd7f74005a3edd13202532f60ba873..c94ef83f9e5e0f3d1816c1d6dd74eeb554bb26e3 100644 (file)
@@ -89,7 +89,7 @@ kernel void kernel_gelu(
     device       float * dst,
     uint tpig[[thread_position_in_grid]]) {
     float x = src0[tpig];
-    dst[tpig] = 0.5f*x*(1.0f + tanhf(SQRT_2_OVER_PI*x*(1.0f + GELU_COEF_A*x*x)));
+    dst[tpig] = 0.5f*x*(1.0f + tanh(SQRT_2_OVER_PI*x*(1.0f + GELU_COEF_A*x*x)));
 }
 
 kernel void kernel_soft_max(