[Mlir-commits] [mlir] [TOSA] FFT2D/RFFT2D accuracy increased (PR #88510)
Georgios Pinitas
llvmlistbot at llvm.org
Mon Apr 15 10:38:51 PDT 2024
================
@@ -2364,16 +2365,24 @@ struct RFFT2dConverter final : public OpRewritePattern<RFFT2dOp> {
Value sumImag = args[2];
// Indices for angle computation
- auto oy = createLinalgIndex(builder, loc, elementType, 1);
- auto ox = createLinalgIndex(builder, loc, elementType, 2);
- auto iy = createLinalgIndex(builder, loc, elementType, 3);
- auto ix = createLinalgIndex(builder, loc, elementType, 4);
-
- // angle = 2 * pi() * ((iy * oy) / H + (ix * ox) / W)
- auto iyXoy = builder.create<arith::MulFOp>(loc, iy, oy);
- auto ixXox = builder.create<arith::MulFOp>(loc, ix, ox);
- auto yComponent = builder.create<arith::DivFOp>(loc, iyXoy, constH);
- auto xComponent = builder.create<arith::DivFOp>(loc, ixXox, constW);
+ Value oy = builder.create<linalg::IndexOp>(loc, 1);
+ Value ox = builder.create<linalg::IndexOp>(loc, 2);
+ Value iy = builder.create<linalg::IndexOp>(loc, 3);
+ Value ix = builder.create<linalg::IndexOp>(loc, 4);
+
+ // float_t angle = 2 * pi() * ( ( (iy * oy) % H) / H + ( (ix * ox) % W ) /
----------------
GeorgeARM wrote:
Can you please write a comment with what you are doing here?
https://github.com/llvm/llvm-project/pull/88510
More information about the Mlir-commits
mailing list