[Mlir-commits] [mlir] [mlir][linalg] Use maximumf with a finite neutral element in softmax decomposition (PR #213797)

Jianhui Li llvmlistbot at llvm.org
Sat Aug 15 14:23:33 PDT 2026


================
@@ -369,12 +369,12 @@ func.func @softmax(%arg0: tensor<2x16x32xf32>, %dst: tensor<2x16x32xf32>) -> ten
 // CHECK-LABEL:      func.func @softmax(
 // CHECK-SAME:           %[[ARG0:[a-zA-Z0-9_]+]]: tensor<2x16x32xf32>, %[[DST:[a-zA-Z0-9_]+]]: tensor<2x16x32xf32>) -> tensor<2x16x32xf32> {
 // CHECK-DAG:        %[[D1:.+]] = tensor.empty() : tensor<2x16xf32>
-// CHECK-DAG:        %[[CST:.+]] = arith.constant 0xFFC00000 : f32
+// CHECK-DAG:        %[[CST:.+]] = arith.constant -3.40282347E+38 : f32
----------------
Jianhui-Li wrote:

Just curious: why it is -3.40282347E+38, not 0xFF800000? 

https://github.com/llvm/llvm-project/pull/213797


More information about the Mlir-commits mailing list