[Mlir-commits] [mlir] [MLIR] computeSliceParameters: use full slice if affine exprs are non-monotonic (PR #118502)

Matthias Gehre llvmlistbot at llvm.org
Mon Dec 16 15:16:02 PST 2024


================
@@ -581,7 +581,11 @@ computeSliceParameters(OpBuilder &builder, Location loc, Value valueToTile,
   sliceParams.strides.reserve(rank);
   for (unsigned r = 0; r < rank; ++r) {
     LLVM_DEBUG(llvm::dbgs() << "computeSliceParameters: for dim#" << r);
-    if (!isTiled(map.getSubMap({r}), tileSizes)) {
+    auto m = map.getSubMap({r});
+    // The offset & size computation below only handles the case when
+    // the map is monotonically increasing, i.e. the min and max values are
+    // attained at the lower and upper bounds of the iteration domain.
+    if (!isTiled(m, tileSizes) || !m.isComponentWiseMonotonicallyIncreasing()) {
----------------
mgehre-amd wrote:

I realized that my check is too conservative (I actually want to tile affine_maps that contain `mods`) with safe tile sizes. I will abandon this PR.

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


More information about the Mlir-commits mailing list