[Mlir-commits] [mlir] [mlir][scf]: Avoid inserting affine.min when tiling dynamic operation sizes if possible (PR #113819)
Aviad Cohen
llvmlistbot at llvm.org
Sun Oct 27 23:29:25 PDT 2024
================
@@ -186,11 +186,35 @@ static void checkSafeToTileToForall(TilingInterface op,
}
}
+/// Returns true if `size` is dynamic multiplication of `stride`.
----------------
AviadCo wrote:
@MaheshRavishankar
you are right, my change adds dynamic support for `(ub - lb) % tilesize` where `lb` is zero, and ub is dynamicly defined by `possibly_dynamic_ub = possibly_dynamic_tilesize * possibly_dynamic_stride`.
Some background for this change - I am using split on dynamic operations (i.e. `linalg::generic`) where the I use `arith.divui` to calculate a tile which fits my cache and another part of `arith.remui` if the dynamic size won't be perfectly divided.
After the split, the first part size is defined by `arith.muli` where one of its operands is the tile size I am using to tile the operation - but the the `ub` is now considered dynamic although we can know the tile size divides it.
https://github.com/llvm/llvm-project/pull/113819
More information about the Mlir-commits
mailing list