[Mlir-commits] [mlir] [mlir][SCF] Deprecate `linalg::tileToForallOp` and `linalg::tileToForallOpUsingTileSizes` (PR #91878)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri May 31 11:29:58 PDT 2024
================
@@ -241,17 +251,25 @@ getTileOffsetAndSizes(RewriterBase &rewriter, Location loc, ValueRange ivs,
SmallVector<OpFoldResult> offsets, sizes;
int materializedLoopNum = 0;
+ assert(
+ llvm::all_of(iterationDomain,
+ [](Range r) { return isConstantIntValue(r.stride, 1); }) &&
+ "the offset and tile size computation assumes stride 1 for all "
+ "dimensions of the iteration domain");
+
if (!numThreads.empty()) {
- AffineExpr d0, d1, s0, s1, s2;
+ AffineExpr d0, d1, s0, s1;
AffineExpr offsetExpr, residualTileSizeExpr;
bindDims(rewriter.getContext(), d0, d1);
- bindSymbols(rewriter.getContext(), s0, s1, s2);
- offsetExpr = d0 + d1 * s0 * s1;
- residualTileSizeExpr = s2 - (d0 + d1 * s0 * s1);
+ bindSymbols(rewriter.getContext(), s0, s1);
+ offsetExpr = d0 + d1 * s0;
+ residualTileSizeExpr = s1 - (d0 + d1 * s0);
----------------
MaheshRavishankar wrote:
There was some fly-by comment that we need to support non-unit strides in tiling, but I dont have a full context on it. Ill keep an eye out for this.
https://github.com/llvm/llvm-project/pull/91878
More information about the Mlir-commits
mailing list