[Mlir-commits] [mlir] [mlir][linalg] Constrain tiling semi-affine maps (PR #212240)

Chuanqi Xu llvmlistbot at llvm.org
Thu Jul 30 00:09:50 PDT 2026


================
@@ -82,6 +82,79 @@ static LogicalResult inlinePayload(OpBuilder &b, LinalgOp linalgOp,
   return success();
 }
 
+/// Verify that tiling can be applied in presence of semi-affine maps.
+static LogicalResult
+validateTilingSemiAffineMaps(LinalgOp linalgOp, ArrayRef<OpFoldResult> offsets,
+                             ArrayRef<OpFoldResult> sizes) {
+  auto isTiledDim = [&](unsigned pos) {
+    return pos < offsets.size() && !isZeroInteger(offsets[pos]);
----------------
ChuanqiXu9 wrote:

I am not sure if this check is stable. Can we have loops which not starts as 0? Or we have normalize pass before so that we can be sure we won't meet such cases?

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


More information about the Mlir-commits mailing list