Skip to content

Commit d27b69b

Browse files
committed
Update logic to reflect name of flag.
The PR llvm#89119 renamed a flag, which inverted it's previous meaning, but the logic was not updated to reflact that. Fixed the logic to reflect the inversion of the meaning of the name.
1 parent 68da4d9 commit d27b69b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

mlir/include/mlir/Dialect/Vector/Utils/VectorUtils.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,16 +185,16 @@ bool isLinearizableVector(VectorType type);
185185
/// mask is created on the read, if use of mask is specified or the bounds on a
186186
/// dimension are different.
187187
///
188-
/// `useInBoundsInsteadOfMasking` if false, the inBoundsVal values are set
189-
/// properly, based on
188+
/// `useInBoundsInsteadOfMasking` if true, the inBoundsVal values are set
189+
/// properly, based on
190190
/// the rank dimensions of the source and destination tensors. And that is
191191
/// what determines if masking is done.
192192
///
193193
/// Note that the internal `vector::TransferReadOp` always read at indices zero
194194
/// for each dimension of the passed in tensor.
195195
Value createReadOrMaskedRead(OpBuilder &builder, Location loc, Value source,
196196
ArrayRef<int64_t> readShape, Value padValue,
197-
bool useInBoundsInsteadOfMasking = true);
197+
bool useInBoundsInsteadOfMasking = false);
198198

199199
/// Returns success if `inputVectorSizes` is a valid masking configuraion for
200200
/// given `shape`, i.e., it meets:

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1499,11 +1499,11 @@ vectorizeAsTensorPackOp(RewriterBase &rewriter, tensor::PackOp packOp,
14991499
// If the input vector sizes are not provided, then the vector sizes are
15001500
// determined by the result tensor shape. In case the vector sizes aren't
15011501
// provided, we update the inBounds attribute instead of masking.
1502-
bool useInBoundsInsteadOfMasking = true;
1502+
bool useInBoundsInsteadOfMasking = false;
15031503
if (inputVectorSizes.empty()) {
15041504
ArrayRef<int64_t> resultTensorShape = packOp.getDestType().getShape();
15051505
inputVectorSizes = resultTensorShape.take_front(packOp.getSourceRank());
1506-
useInBoundsInsteadOfMasking = false;
1506+
useInBoundsInsteadOfMasking = true;
15071507
}
15081508

15091509
// Create masked TransferReadOp.

mlir/lib/Dialect/Vector/Utils/VectorUtils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ Value vector::createReadOrMaskedRead(OpBuilder &builder, Location loc,
345345
int64_t readRank = readShape.size();
346346
auto zero = builder.create<arith::ConstantIndexOp>(loc, 0);
347347
SmallVector<bool> inBoundsVal(readRank, true);
348-
if (!useInBoundsInsteadOfMasking) {
348+
if (useInBoundsInsteadOfMasking) {
349349
// Update the inBounds attribute.
350350
for (unsigned i = 0; i < readRank; i++)
351351
inBoundsVal[i] = (sourceShape[i] == readShape[i]) &&

0 commit comments

Comments
 (0)