[Mlir-commits] [mlir] [mlir][vector] Fix typo in `vector.contract` mnemonic (NFC) (PR #173661)

Longsheng Mou llvmlistbot at llvm.org
Fri Dec 26 05:09:07 PST 2025


https://github.com/CoTinker created https://github.com/llvm/llvm-project/pull/173661

None

>From 946801cdacce1e9a621ef6fb726f3393144f9329 Mon Sep 17 00:00:00 2001
From: Longsheng Mou <longshengmou at gmail.com>
Date: Fri, 26 Dec 2025 21:05:12 +0800
Subject: [PATCH] [mlir][vector] Fix typo in `vector.contract` mnemonic

---
 mlir/include/mlir/Dialect/NVGPU/Utils/MMAUtils.h              | 2 +-
 .../mlir/Dialect/Vector/Transforms/VectorRewritePatterns.h    | 4 ++--
 mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp       | 2 +-
 mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp         | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/mlir/include/mlir/Dialect/NVGPU/Utils/MMAUtils.h b/mlir/include/mlir/Dialect/NVGPU/Utils/MMAUtils.h
index 10851c6173982..faeba0e128db4 100644
--- a/mlir/include/mlir/Dialect/NVGPU/Utils/MMAUtils.h
+++ b/mlir/include/mlir/Dialect/NVGPU/Utils/MMAUtils.h
@@ -37,7 +37,7 @@ struct WarpMatrixInfo {
 };
 
 /// If `op` is a `vector.transfer_write`, return the `WarpMatrixInfo` for the
-/// vector operand. If op is a `vector.transfer_read`, `vector.contraction`, or
+/// vector operand. If op is a `vector.transfer_read`, `vector.contract`, or
 /// `arith.constant`, return the `WarpMatrixInfo` corresponding to the result.
 /// Otherwise, return failure.
 FailureOr<WarpMatrixInfo> getWarpMatrixInfo(Operation *op);
diff --git a/mlir/include/mlir/Dialect/Vector/Transforms/VectorRewritePatterns.h b/mlir/include/mlir/Dialect/Vector/Transforms/VectorRewritePatterns.h
index 69438011d2287..13ad8151029f2 100644
--- a/mlir/include/mlir/Dialect/Vector/Transforms/VectorRewritePatterns.h
+++ b/mlir/include/mlir/Dialect/Vector/Transforms/VectorRewritePatterns.h
@@ -77,7 +77,7 @@ struct UnrollVectorOptions {
   }
 };
 
-/// Canonicalization of a `vector.contraction %a, %b, %c` with row-major matmul
+/// Canonicalization of a `vector.contract %a, %b, %c` with row-major matmul
 /// semantics to a contraction with MMT semantics (matrix matrix multiplication
 /// with the RHS transposed). This specific form is meant to have the vector
 /// operands are organized such that the reduction dimension is contiguous.
@@ -90,7 +90,7 @@ struct UnrollVectorOptions {
 ///                  kind = #vector.kind<add>} %a, %b, %c : ...
 /// ```
 ///
-///  The `constraint` predicate is used to decide which `vector.contraction` ops
+///  The `constraint` predicate is used to decide which `vector.contract` ops
 ///  to filter out.
 void populateVectorContractCanonicalizeMatmulToMMT(
     RewritePatternSet &patterns,
diff --git a/mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp b/mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp
index ad16b80a732b3..a0b7175337b8b 100644
--- a/mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp
+++ b/mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp
@@ -1718,7 +1718,7 @@ class DropInnerMostUnitDimsTransferWrite
   }
 };
 
-/// Canonicalization of a `vector.contraction %a, %b, %c` with row-major matmul
+/// Canonicalization of a `vector.contract %a, %b, %c` with row-major matmul
 /// semantics to a contraction suitable for MMT (matrix matrix multiplication
 /// with the RHS transposed) lowering.
 struct CanonicalizeContractMatmulToMMT final
diff --git a/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp b/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
index 2cbb5ab3067f2..db941454f8d8c 100644
--- a/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
+++ b/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
@@ -121,7 +121,7 @@ struct TestVectorContractionPrepareForMMTLowering
     return "test-vector-contraction-prepare-for-mmt-lowering";
   }
   StringRef getDescription() const final {
-    return "Test vector.contraction matmul canonicalization for MMT lowering.";
+    return "Test vector.contract matmul canonicalization for MMT lowering.";
   }
   TestVectorContractionPrepareForMMTLowering() = default;
 



More information about the Mlir-commits mailing list