Skip to content

Commit 96b4425

Browse files
authored
[mlir][linalg][nfc] Clean-up leftover code post #149156 (#151334)
In #149156, I ensured that we no longer generate spurious `tensor.empty` ops when vectorizing `linalg.unpack`. This follow-up removes leftover code that is now redundant but was missed in the original PR and in #150602 that was also meant to clean-up left-over code. Note, this is removing code to compute "write-vector-sizes". Instead, these are fully inferred from previous Ops.
1 parent 180281b commit 96b4425

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1946,12 +1946,6 @@ vectorizeAsTensorUnpackOp(RewriterBase &rewriter, linalg::UnPackOp unpackOp,
19461946
vector::ShapeCastOp shapeCastOp = vector::ShapeCastOp::create(
19471947
rewriter, loc, vecCollapsedType, transposeOp->getResult(0));
19481948

1949-
// writeVectorSizes had to match the shapecast shape for dynamic sizes,
1950-
// otherwise the validator complains that the mask size is invalid.
1951-
SmallVector<int64_t> writeVectorSizes(
1952-
unpackOp.getDestType().hasStaticShape()
1953-
? vectorSizes
1954-
: shapeCastOp.getResultVectorType().getShape());
19551949
Operation *write = createWriteOrMaskedWrite(
19561950
rewriter, loc, shapeCastOp.getResult(), unpackOp.getDest(),
19571951
/*writeIndices=*/{}, useInBoundsInsteadOfMasking);

0 commit comments

Comments
 (0)