Explorar o código

metal : fix build "tanhf" -> "tanh"

Georgi Gerganov %!s(int64=2) %!d(string=hai) anos
pai
achega
b33dee282f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      ggml-metal.metal

+ 1 - 1
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(