[Mlir-commits] [mlir] [mlir][math] Reland 58ef9bec071383744fb703ff08df9806f25e4095 (PR #85436)
Kai Sasaki
llvmlistbot at llvm.org
Sat Mar 16 03:56:43 PDT 2024
================
@@ -683,12 +683,31 @@ func.func @cosh() {
return
}
+// -------------------------------------------------------------------------- //
+// Tanh.
+// -------------------------------------------------------------------------- //
+
+func.func @tanh_8xf32(%a : vector<8xf32>) {
+ %r = math.tanh %a : vector<8xf32>
+ vector.print %r : vector<8xf32>
+ return
+}
+
+func.func @tanh() {
+ // CHECK: -1, -0.761594, -0.291313, 0, 0.291313, 0.761594, 1, 1
+ %v3 = arith.constant dense<[0xff800000, -1.0, -0.3, 0.0, 0.3, 1.0, 10.0, 0x7f800000]> : vector<8xf32>
----------------
Lewuathe wrote:
Are you using 0xff800000 for the negative big value and 0x7f800000 for the positive big value? Correct?
https://github.com/llvm/llvm-project/pull/85436
More information about the Mlir-commits
mailing list