[Mlir-commits] [mlir] [mlir][linalg] Introduce transpose semantic to 'linalg.matmul' ops. (PR #104783)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Oct 3 11:23:14 PDT 2024


================
@@ -1139,9 +1145,76 @@ int64_t LinalgOp::getIndexingMapIndex(OpOperand *opOperand) {
          operandNumber - start;
 }
 
+/// Returns true if the result AffineExpr of the \p explicitMap is same as \p
+/// defaultMap.
+static bool isValidResultDimExprs(AffineMap explictMap, AffineMap defaultMap) {
+  auto explicitRange = explictMap.getResults();
+  auto defaultRange = defaultMap.getResults();
+  DenseSet<AffineExpr> explicitSet(explicitRange.begin(), explicitRange.end());
+  DenseSet<AffineExpr> defaultSet(defaultRange.begin(), defaultRange.end());
+  llvm::set_union(explicitSet, defaultSet);
----------------
MaheshRavishankar wrote:

I dont follow this logic. Maybe this is more complicated that it needs to be.  Also `resSet` is defined below and not used. This logic seems like it can be very much simplified.

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


More information about the Mlir-commits mailing list