[Mlir-commits] [mlir] [mlir][tosa][tosa-to-linalg] Add NaN Mode Lowering (PR #125668)

Georgios Pinitas llvmlistbot at llvm.org
Wed Feb 19 05:49:24 PST 2025


================
@@ -404,7 +449,34 @@ static Value createLinalgBodyCalculationForElementwiseOp(
         loc, elementTy, rewriter.getFloatAttr(elementTy, minApf));
     auto max = rewriter.create<arith::ConstantOp>(
         loc, elementTy, rewriter.getFloatAttr(elementTy, maxApf));
-    return clampFloatHelper(loc, args[0], min, max, rewriter);
+    auto result = clampFloatHelper(loc, args[0], min, max, rewriter);
+
+    const auto nanMode = getNanMode(op, rewriter);
----------------
GeorgeARM wrote:

line 60 and below. There is common logic, same checks but different handling depending on the operator.

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


More information about the Mlir-commits mailing list