Skip to content

Commit

Permalink
metal : fix build "tanhf" -> "tanh"
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov committed Jun 9, 2023
1 parent 92f44ff commit b33dee2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ggml-metal.metal
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit b33dee2

Please sign in to comment.