[Mlir-commits] [mlir] [mlir][math] Add FP software implementation lowering pass: math-to-apfloat (PR #171221)
Maksim Levental
llvmlistbot at llvm.org
Fri Dec 12 09:51:25 PST 2025
================
@@ -32,11 +32,15 @@ namespace {
template <typename SourceOp, typename TargetOp>
using ConvertFastMath = arith::AttrConvertFastMathToLLVM<SourceOp, TargetOp>;
-template <typename SourceOp, typename TargetOp>
+template <typename SourceOp, typename TargetOp,
+ bool FailOnUnsupportedFP = false>
using ConvertFMFMathToLLVMPattern =
- VectorConvertToLLVMPattern<SourceOp, TargetOp, ConvertFastMath>;
+ VectorConvertToLLVMPattern<SourceOp, TargetOp, ConvertFastMath,
+ FailOnUnsupportedFP>;
-using AbsFOpLowering = ConvertFMFMathToLLVMPattern<math::AbsFOp, LLVM::FAbsOp>;
+using AbsFOpLowering =
+ ConvertFMFMathToLLVMPattern<math::AbsFOp, LLVM::FAbsOp,
+ /*FailOnUnsupportedFP=*/true>;
using CeilOpLowering = ConvertFMFMathToLLVMPattern<math::CeilOp, LLVM::FCeilOp>;
----------------
makslevental wrote:
shouldn't we just change `FailOnUnsupportedFP` to default to `true` then? other than the patterns/paths we've been adding nothing supports fp8 right?
https://github.com/llvm/llvm-project/pull/171221
More information about the Mlir-commits
mailing list