[Mlir-commits] [mlir] [mlir][arith][transforms] Adds Truncf f32 to f4e2m1 (PR #144157)
Krzysztof Drewniak
llvmlistbot at llvm.org
Tue Jun 17 12:20:57 PDT 2025
================
@@ -322,6 +334,74 @@ struct BFloat16TruncFOpConverter : public OpRewritePattern<arith::TruncFOp> {
}
};
+struct F4E2M1ExtFOpConverter : public OpRewritePattern<arith::ExtFOp> {
----------------
krzysz00 wrote:
Side comment ... we really could do with an `arith-rt` so we could link in useful library routines during passes like this one. Some of the floating point conversions are really pushing the limits of a rewrite pattern ... and then there's stuff like emulating 64-bit division on 32-bit targets, which is fundamentally a primitive we want when lowering to SPIR-V that can't easily be written out in a big C++ rewrite since it should be a function call
https://github.com/llvm/llvm-project/pull/144157
More information about the Mlir-commits
mailing list