Skip to content

Commit 7be89bb

Browse files
authored
[MLIR] Fix typo of the word "pattern" in CAPI and docs (llvm#163780)
This includes the rename from `mlirOpRewritePattenCreate` to `mlirOpRewritePatternCreate` in CAPI, and other typo fixes in docs and code comments.
1 parent 059f2df commit 7be89bb

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

mlir/docs/Canonicalization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Some important things to think about w.r.t. canonicalization patterns:
5555
* It is always good to eliminate operations entirely when possible, e.g. by
5656
folding known identities (like "x + 0 = x").
5757

58-
* Pattens with expensive running time (i.e. have O(n) complexity) or
58+
* Patterns with expensive running time (i.e. have O(n) complexity) or
5959
complicated cost models don't belong to canonicalization: since the
6060
algorithm is executed iteratively until fixed-point we want patterns that
6161
execute quickly (in particular their matching phase).

mlir/include/mlir-c/Rewrite.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ typedef struct {
352352

353353
/// Create a rewrite pattern that matches the operation
354354
/// with the given rootName, corresponding to mlir::OpRewritePattern.
355-
MLIR_CAPI_EXPORTED MlirRewritePattern mlirOpRewritePattenCreate(
355+
MLIR_CAPI_EXPORTED MlirRewritePattern mlirOpRewritePatternCreate(
356356
MlirStringRef rootName, unsigned benefit, MlirContext context,
357357
MlirRewritePatternCallbacks callbacks, void *userData,
358358
size_t nGeneratedNames, MlirStringRef *generatedNames);

mlir/lib/Bindings/Python/Rewrite.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ class PyRewritePatternSet {
205205
nb::object res = f(opView, PyPatternRewriter(rewriter));
206206
return logicalResultFromObject(res);
207207
};
208-
MlirRewritePattern pattern = mlirOpRewritePattenCreate(
208+
MlirRewritePattern pattern = mlirOpRewritePatternCreate(
209209
rootName, benefit, ctx, callbacks, matchAndRewrite.ptr(),
210210
/* nGeneratedNames */ 0,
211211
/* generatedNames */ nullptr);

mlir/lib/CAPI/Transforms/Rewrite.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ class ExternalRewritePattern : public mlir::RewritePattern {
341341

342342
} // namespace mlir
343343

344-
MlirRewritePattern mlirOpRewritePattenCreate(
344+
MlirRewritePattern mlirOpRewritePatternCreate(
345345
MlirStringRef rootName, unsigned benefit, MlirContext context,
346346
MlirRewritePatternCallbacks callbacks, void *userData,
347347
size_t nGeneratedNames, MlirStringRef *generatedNames) {

mlir/lib/Dialect/MemRef/Transforms/EmulateWideInt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ struct EmulateWideIntPass final
121121
[&typeConverter](Operation *op) { return typeConverter.isLegal(op); });
122122

123123
RewritePatternSet patterns(ctx);
124-
// Add common pattenrs to support contants, functions, etc.
124+
// Add common patterns to support contants, functions, etc.
125125
arith::populateArithWideIntEmulationPatterns(typeConverter, patterns);
126126

127127
memref::populateMemRefWideIntEmulationPatterns(typeConverter, patterns);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ mlir::vector::isTranspose2DSlice(vector::TransposeOp op) {
9191

9292
// Check whether the two source vector dimensions that are greater than one
9393
// must be transposed with each other so that we can apply one of the 2-D
94-
// transpose pattens. Otherwise, these patterns are not applicable.
94+
// transpose patterns. Otherwise, these patterns are not applicable.
9595
if (!areDimsTransposedIn2DSlice(srcGtOneDims[0], srcGtOneDims[1],
9696
op.getPermutation()))
9797
return failure();

0 commit comments

Comments
 (0)