[Mlir-commits] [mlir] [mlir][vector] Update `castAwayContractionLeadingOneDim` to omit transposes solely on leading unit dims. (PR #85694)

Andrzej WarzyƄski llvmlistbot at llvm.org
Tue Mar 19 15:02:18 PDT 2024


================
@@ -399,13 +399,28 @@ mlir::vector::castAwayContractionLeadingOneDim(vector::ContractionOp contractOp,
           transposeResults.push_back(targetExpr);
         }
       }
+
+      // Check if the transpose effects outer unit dims only. Such transposes do
+      // not materially effect the underlying vector and can be omitted.
+      bool tranposeNonOuterUnitDims = false;
+      for (int64_t i = 0; i < (int64_t)perm.size(); ++i) {
----------------
banach-space wrote:

Please avoid C-style casts.

https://github.com/llvm/llvm-project/pull/85694


More information about the Mlir-commits mailing list