Skip to content

Commit 1c95e2d

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

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)