Skip to content

Commit b975051

Browse files
committed
improve naming and fix typo
1 parent 3b1005d commit b975051

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,7 +1193,7 @@ static Value bitcastSubByteVectorToI8(PatternRewriter &rewriter, Location loc,
11931193
Value subByteVec) {
11941194
auto srcVecType = cast<VectorType>(subByteVec.getType());
11951195
int64_t srcBitwidth = srcVecType.getElementType().getIntOrFloatBitWidth();
1196-
assert(8 % srcBitwidth == 0 && "Invalid source bitwidth");
1196+
assert(8 % srcBitwidth == 0 && "Unsupported sub-byte type (not a divisor of i8)");
11971197
int64_t bitwidthFactor = 8 / srcBitwidth;
11981198
SmallVector<int64_t> vecShape(srcVecType.getShape());
11991199
// Adjust last dimension of the vector, so the total size remains the same.
@@ -1207,7 +1207,7 @@ static Value bitcastSubByteVectorToI8(PatternRewriter &rewriter, Location loc,
12071207
/// The `bitIdx` starts at 0 from the LSB and moves to the left.
12081208
///
12091209
/// Example for a single element:
1210-
/// extract numBits=2 starting at bitIdx=2
1210+
/// Extract numBits=2 starting at bitIdx=2
12111211
/// src = [0 | 1 | 0 | 1 | 1 | 1 | 1 | 0]
12121212
/// indices = [7 | 6 | 5 | 4 | 3 | 2 | 1 | 0]
12131213
/// target = [. . . . ^ ^ . .]
@@ -1244,7 +1244,7 @@ static Value extractNBitsFromVectorSigned(PatternRewriter &rewriter,
12441244
/// The `bitIdx` starts at 0 from the LSB and moves to the left.
12451245
///
12461246
/// Example for a single element:
1247-
/// extract numBits=2 starting at bitIdx=2
1247+
/// Extract numBits=2 starting at bitIdx=2
12481248
/// src = [0 | 1 | 0 | 1 | 1 | 0 | 1 | 0]
12491249
/// indices = [7 | 6 | 5 | 4 | 3 | 2 | 1 | 0]
12501250
/// target = [. . . . ^ ^ . .]

0 commit comments

Comments
 (0)