[Mlir-commits] [mlir] c81f14e - [mlir][arith] Fix typos in WIE. NFC.
Jakub Kuderski
llvmlistbot at llvm.org
Wed Mar 22 16:15:46 PDT 2023
Author: Jakub Kuderski
Date: 2023-03-22T19:15:12-04:00
New Revision: c81f14e5898c37c13e5b22485cf37cc124caf0c1
URL: https://github.com/llvm/llvm-project/commit/c81f14e5898c37c13e5b22485cf37cc124caf0c1
DIFF: https://github.com/llvm/llvm-project/commit/c81f14e5898c37c13e5b22485cf37cc124caf0c1.diff
LOG: [mlir][arith] Fix typos in WIE. NFC.
Added:
Modified:
mlir/include/mlir/Dialect/Arith/Transforms/WideIntEmulationConverter.h
mlir/lib/Dialect/Arith/Transforms/EmulateWideInt.cpp
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/Arith/Transforms/WideIntEmulationConverter.h b/mlir/include/mlir/Dialect/Arith/Transforms/WideIntEmulationConverter.h
index ea0ab14e9b8f1..5dbbfedcc70ee 100644
--- a/mlir/include/mlir/Dialect/Arith/Transforms/WideIntEmulationConverter.h
+++ b/mlir/include/mlir/Dialect/Arith/Transforms/WideIntEmulationConverter.h
@@ -16,7 +16,7 @@ namespace mlir::arith {
/// two halves and thus turning into supported ones, i.e., i2*N --> iN, where N
/// is the widest integer bitwidth supported by the target.
/// Currently, we only handle power-of-two integer types and support conversions
-/// of integers twice as wide as the maxium supported by the target. Wide
+/// of integers twice as wide as the maximum supported by the target. Wide
/// integers are represented as vectors, e.g., i64 --> vector<2xi32>, where the
/// first element is the low half of the original integer, and the second
/// element the high half.
diff --git a/mlir/lib/Dialect/Arith/Transforms/EmulateWideInt.cpp b/mlir/lib/Dialect/Arith/Transforms/EmulateWideInt.cpp
index 781ea3d3eca63..96a58459a37b9 100644
--- a/mlir/lib/Dialect/Arith/Transforms/EmulateWideInt.cpp
+++ b/mlir/lib/Dialect/Arith/Transforms/EmulateWideInt.cpp
@@ -43,7 +43,7 @@ static std::pair<APInt, APInt> getHalves(const APInt &value,
return {std::move(low), std::move(high)};
}
-/// Returns the type with the last (innermost) dimention reduced to x1.
+/// Returns the type with the last (innermost) dimension reduced to x1.
/// Scalarizes 1D vector inputs to match how we extract/insert vector values,
/// e.g.:
/// - vector<3x2xi16> --> vector<3x1xi16>
@@ -128,7 +128,7 @@ static Value dropTrailingX1Dim(ConversionPatternRewriter &rewriter,
if (!vecTy)
return input;
- // Shape cast to drop the last x1 dimention.
+ // Shape cast to drop the last x1 dimension.
ArrayRef<int64_t> shape = vecTy.getShape();
assert(shape.size() >= 2 && "Expected vector with at list two dims");
assert(shape.back() == 1 && "Expected the last vector dim to be x1");
@@ -177,13 +177,13 @@ static Value insertLastDimSlice(ConversionPatternRewriter &rewriter,
/// dimension.
/// When all `resultComponents` are scalars, the result type is `vector<NxT>`;
/// when `resultComponents` are `vector<...x1xT>`s, the result type is
-/// `vector<...xNxT>`, where `N` is the number of `resultComponenets`.
+/// `vector<...xNxT>`, where `N` is the number of `resultComponents`.
static Value constructResultVector(ConversionPatternRewriter &rewriter,
Location loc, VectorType resultType,
ValueRange resultComponents) {
llvm::ArrayRef<int64_t> resultShape = resultType.getShape();
(void)resultShape;
- assert(!resultShape.empty() && "Result expected to have dimentions");
+ assert(!resultShape.empty() && "Result expected to have dimensions");
assert(resultShape.back() == static_cast<int64_t>(resultComponents.size()) &&
"Wrong number of result components");
More information about the Mlir-commits
mailing list