[Mlir-commits] [mlir] [mlir][ArithToAMDGPU] Add option for saturating truncation to fp8 (PR #74153)
Jakub Kuderski
llvmlistbot at llvm.org
Tue Jan 9 20:36:25 PST 2024
================
@@ -44,7 +44,10 @@ struct ExtfOnFloat8RewritePattern final
struct TruncfToFloat8RewritePattern final
: public OpRewritePattern<arith::TruncFOp> {
- using OpRewritePattern<arith::TruncFOp>::OpRewritePattern;
+ bool saturateFP8 = false;
+ TruncfToFloat8RewritePattern(MLIRContext *ctx, bool saturateFP8)
+ : OpRewritePattern<arith::TruncFOp>::OpRewritePattern(ctx),
----------------
kuhar wrote:
```suggestion
: OpRewritePattern::OpRewritePattern(ctx),
```
https://github.com/llvm/llvm-project/pull/74153
More information about the Mlir-commits
mailing list