From: Georgi Gerganov Date: Fri, 9 Jun 2023 08:11:04 +0000 (+0300) Subject: metal : fix build "tanhf" -> "tanh" X-Git-Tag: gguf-v0.4.0~659 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=b33dee282f5d8032b5f780152732dc45cbf2d349;p=pkg%2Fggml%2Fsources%2Fllama.cpp metal : fix build "tanhf" -> "tanh" --- diff --git a/ggml-metal.metal b/ggml-metal.metal index 745fe8ad..c94ef83f 100644 --- a/ggml-metal.metal +++ b/ggml-metal.metal @@ -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(