Skip to content

Commit 1210d59

Browse files
[fixup] Comment fixes
1 parent 8d150a8 commit 1210d59

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ FailureOr<std::pair<int, int>> isTranspose2DSlice(vector::TransposeOp op);
5454
/// dimensions after ignoring a leading sequence of unit ones.
5555
///
5656
/// For `vectorType` to be a contiguous slice of `memrefType`
57-
/// a) the N trailing dimensions of the latter must be contiguous, and
58-
/// b) the trailing N dimensions of `vectorType` and `memrefType`,
59-
/// except the first of them, must match.
57+
/// a) the N trailing dimensions of `memrefType` must be contiguous, and
58+
/// b) the N-1 trailing dimensions of `vectorType` and `memrefType`
59+
/// must match.
6060
///
6161
/// Examples:
6262
///
@@ -69,15 +69,15 @@ FailureOr<std::pair<int, int>> isTranspose2DSlice(vector::TransposeOp op);
6969
/// Ex.4 contiguous slice, leading unit dimension of the vector ignored,
7070
/// 2 != 3 (allowed)
7171
/// vector<1x2x2xi32> from memref<5x4x3x2xi32>
72-
/// Ex.5. contiguous slice, leasing two unit dims of the vector ignored,
72+
/// Ex.5. contiguous slice, leading two unit dims of the vector ignored,
7373
/// 2 != 3 (allowed)
7474
/// vector<1x1x2x2xi32> from memref<5x4x3x2xi32>
7575
/// Ex.6. non-contiguous slice, 2 != 3, no leading sequence of unit dims
7676
/// vector<2x1x2x2xi32> from memref<5x4x3x2xi32>)
77-
/// Ex.7 contiguous slice, memref needs to be contiguous only on the last
77+
/// Ex.7 contiguous slice, memref needs to be contiguous only in the last
7878
/// dimension
7979
/// vector<1x1x2xi32> from memref<2x2x2xi32, strided<[8, 4, 1]>>
80-
/// Ex.8 non-contiguous slice, memref needs to be contiguous one the last
80+
/// Ex.8 non-contiguous slice, memref needs to be contiguous in the last
8181
/// two dimensions, and it isn't
8282
/// vector<1x2x2xi32> from memref<2x2x2xi32, strided<[8, 4, 1]>>
8383
bool isContiguousSlice(MemRefType memrefType, VectorType vectorType);

mlir/lib/Dialect/Vector/Transforms/VectorTransferOpTransforms.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,8 @@ static SmallVector<Value> getCollapsedIndices(RewriterBase &rewriter,
582582

583583
namespace {
584584

585-
/// Helper functon to return the index of the last dynamic dimension in `shape`.
585+
/// Helper function to return the index of the last dynamic dimension
586+
/// in `shape` or -1 if there are no dynamic dimensions.
586587
int64_t lastDynIndex(ArrayRef<int64_t> shape) {
587588
return static_cast<int64_t>(
588589
std::distance(

0 commit comments

Comments
 (0)