Skip to content

Commit 2789336

Browse files
committed
Fix for ambiguous overload in kernels/portable/cpu/op_gelu.cpp
This fix a error you get when using newer (more strict) compiler version Signed-off-by: Zingo Andersen <[email protected]> Change-Id: I2f64949e35ecd2cb3604c1579ea38a5d9d972118
1 parent b043e0d commit 2789336

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernels/portable/cpu/op_gelu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Tensor& gelu_out(
5151

5252
const CTYPE x_cubed = x * x * x;
5353
const CTYPE inner = kBeta * (x + kKappa * x_cubed);
54-
const CTYPE ret = 0.5 * x * (1 + std::tanh(inner));
54+
const CTYPE ret = 0.5 * x * (1.0 + std::tanh(inner));
5555

5656
return ret;
5757
},

0 commit comments

Comments
 (0)