[Mlir-commits] [mlir] [mlir] Fix typo (flattend => flattened) (PR #195780)
Kevin Boyette
llvmlistbot at llvm.org
Mon May 4 20:24:29 PDT 2026
https://github.com/KevinBoyette updated https://github.com/llvm/llvm-project/pull/195780
>From 18dc858f89cc458ec56c92b0841e77d56a5e9285 Mon Sep 17 00:00:00 2001
From: Kevin Boyette <kevinxboyette at gmail.com>
Date: Mon, 4 May 2026 23:17:42 -0400
Subject: [PATCH] [mlir] Fix typo (flattend => flattened)
---
mlir/include/mlir/IR/AffineExprVisitor.h | 8 ++++----
mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp | 8 ++++----
mlir/lib/IR/BuiltinAttributeInterfaces.cpp | 2 +-
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/mlir/include/mlir/IR/AffineExprVisitor.h b/mlir/include/mlir/IR/AffineExprVisitor.h
index 1826f5fd8ad35..ccf62fc80f748 100644
--- a/mlir/include/mlir/IR/AffineExprVisitor.h
+++ b/mlir/include/mlir/IR/AffineExprVisitor.h
@@ -354,11 +354,11 @@ class AffineExprVisitor<SubClass, LogicalResult>
class SimpleAffineExprFlattener
: public AffineExprVisitor<SimpleAffineExprFlattener, LogicalResult> {
public:
- // Flattend expression layout: [dims, symbols, locals, constant]
+ // Flattened expression layout: [dims, symbols, locals, constant]
// Stack that holds the LHS and RHS operands while visiting a binary op expr.
- // In future, consider adding a prepass to determine how big the SmallVector's
- // will be, and linearize this to std::vector<int64_t> to prevent
- // SmallVector moves on re-allocation.
+ // In the future, consider adding a prepass to determine how big the
+ // SmallVector's will be, and linearize this to std::vector<int64_t> to
+ // prevent SmallVector moves on re-allocation.
std::vector<SmallVector<int64_t, 8>> operandExprStack;
unsigned numDims;
diff --git a/mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp b/mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp
index c1d5794bdb82c..e92b109c2223e 100644
--- a/mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp
+++ b/mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp
@@ -794,19 +794,19 @@ SliceAttr SliceAttr::flatten() const {
SmallVector<int64_t> indices =
llvm::to_vector(llvm::seq<int64_t>(0, layoutAttr.getRank()));
- // get remaining dims (flattend) by applying slice ops with all slicedDims
+ // get remaining dims (flattened) by applying slice ops with all slicedDims
SmallVector<int64_t> remainingDims(indices);
for (auto dim : llvm::reverse(slicedDims))
remainingDims = XeGPUDialect::slice(llvm::ArrayRef<int64_t>(remainingDims),
dim.asArrayRef());
- // get flattend sliced dims by applying slice ops with the remaining dims
- SmallVector<int64_t> flattendDims = XeGPUDialect::slice(
+ // get flattened sliced dims by applying slice ops with the remaining dims
+ SmallVector<int64_t> flattenedDims = XeGPUDialect::slice(
llvm::ArrayRef<int64_t>(indices), llvm::ArrayRef<int64_t>(remainingDims));
return xegpu::SliceAttr::get(
getContext(), layoutAttr,
- DenseI64ArrayAttr::get(getContext(), flattendDims));
+ DenseI64ArrayAttr::get(getContext(), flattenedDims));
}
FailureOr<SmallVector<Value>>
diff --git a/mlir/lib/IR/BuiltinAttributeInterfaces.cpp b/mlir/lib/IR/BuiltinAttributeInterfaces.cpp
index 9e8ce4ca3a902..ebf44075479dc 100644
--- a/mlir/lib/IR/BuiltinAttributeInterfaces.cpp
+++ b/mlir/lib/IR/BuiltinAttributeInterfaces.cpp
@@ -57,7 +57,7 @@ uint64_t ElementsAttr::getFlattenedIndex(Type type, ArrayRef<uint64_t> index) {
assert(isValidIndex(shapeType, index) &&
"expected valid multi-dimensional index");
- // Reduce the provided multidimensional index into a flattended 1D row-major
+ // Reduce the provided multidimensional index into a flattened 1D row-major
// index.
auto rank = shapeType.getRank();
ArrayRef<int64_t> shape = shapeType.getShape();
More information about the Mlir-commits
mailing list