diff options
author | Benjamin Maxwell <benjamin.maxwell@arm.com> | 2024-06-27 15:47:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-27 15:47:00 +0100 |
commit | 34e34a03ac83b51e90f8788945f9668446e468f8 (patch) | |
tree | fa7f7ff32bbd5f31fac50198437a3a1715eefa45 /mlir/lib | |
parent | bb973785c9df1bf191ac4ff06ab1e7355dbd95c6 (diff) | |
download | llvm-34e34a03ac83b51e90f8788945f9668446e468f8.zip llvm-34e34a03ac83b51e90f8788945f9668446e468f8.tar.gz llvm-34e34a03ac83b51e90f8788945f9668446e468f8.tar.bz2 |
[mlir][linalg] Mark xfers as in-bounds when masking depthwise convs (#96771)
If this is not set the fact that the dynamic channel is in-bounds cannot
be inferred automatically (like it can for static sizes), which
eventually leads to it being marked as out-of-bounds (which prevents
some rewrites).
Diffstat (limited to 'mlir/lib')
-rw-r--r-- | mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp b/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp index 511835a..3a75d2a 100644 --- a/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp +++ b/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp @@ -3234,6 +3234,11 @@ struct Conv1DGenerator auto maskType = VectorType::get(maskShape, rewriter.getI1Type(), scalableDims); + SmallVector<bool> inBounds(maskShape.size(), true); + auto xferOp = cast<VectorTransferOpInterface>(opToMask); + xferOp->setAttr(xferOp.getInBoundsAttrName(), + rewriter.getBoolArrayAttr(inBounds)); + SmallVector<OpFoldResult> mixedDims = vector::getMixedSizesXfer( cast<LinalgOp>(op).hasPureTensorSemantics(), opToMask, rewriter); |