[Mlir-commits] [mlir] [mlir][Linalg] Deprecate `linalg::tileToForallOp` and `linalg::tileToForallOpUsingTileSizes` (PR #91878)

Nicolas Vasilache llvmlistbot at llvm.org
Wed Jun 5 05:25:41 PDT 2024


https://github.com/nicolasvasilache requested changes to this pull request.

After deeper investigation, I see, the tests that change are not the ones with "num_threads", all changed tests are only related to the classical "tile_sizes" case...

Before this change, when tiling with tile sizes, we used to call:
```
return tileToForallOpImpl(b, op, numThreads,
                             /*nominalTileSizes=*/tileSizes, mapping,
                             /*omitTileOffsetBoundsCheck=*/true);
```

I.e. we explicitly omitted the affine.max because we statically know that tiling with tile sizes does not require it. This is the same reasoning for tiling with scf.for: we do not emit affine.max on the lower bound.

This change introduces affine.max in "regular tiling" with tile sizes and I believe this is redundant and unnecessary.  

@MaheshRavishankar coming back to you point about:
```
Re 3 : I dont think there is any extra divisions. Most of the lit tests stay the same. The only ones that changed are the dynamic shape tests which I think were originally wrong (You cant really avoid generating the max operation).
```

Can you explain why you think they were originally wrong?
My position is that you can avoid generating the max operation when tiling scf.forall with tile sizes for the same reason that you don't generate affine.max when tiling scf.for ..


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


More information about the Mlir-commits mailing list