The patch updates the tiling pass to add the tile offsets to the indices returned by the linalg operations.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Note that the tile-indexed.mlir test is the counterpart to the tile-indexed-generic.mlir test.
Comment Actions
thanks!
Accepting conditioned on using affine.apply
mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp | ||
---|---|---|
244 | We have been using affine.apply ops for such purposes as they compose and canonicalize more nicely with other parts of the IR. Bonus points to write it in an idiomatic fashion, something like: AffineExpr i, j; bindDims(context, i, j); b.create<affine::ApplyOp>(indexOp.getLoc(), ArrayRef<AffineExpr>{i + j}, ValueRange{indexOp.getResult(), ivs[rangeIndex->second]}); |
We have been using affine.apply ops for such purposes as they compose and canonicalize more nicely with other parts of the IR.
You can use dim for both (i.e. d0 + d1).
Bonus points to write it in an idiomatic fashion, something like: