[Mlir-commits] [mlir] [mlir][linalg] Preserve cast semantics during generic to matmul (PR #174757)

Andrzej WarzyƄski llvmlistbot at llvm.org
Thu Jan 8 23:46:25 PST 2026


================
@@ -230,11 +289,19 @@ static FailureOr<LinalgOp> specializeLinalgContractions(RewriterBase &rewriter,
       (a == IndexMatchResult::Transposed && b == IndexMatchResult::Transposed))
     return failure();
 
+  // Get the cast attribute for the named matmul op (if any).
+  std::optional<TypeFn> castTy;
+
+  // If there were invalid cast ops found for matmul, bail out. Else determine
+  // the cast type for the named matmul op (if any).
+  if (!getAndAuditMatmulCastTy(genericOp, castTy))
+    return failure();
----------------
banach-space wrote:

[nit] NotifyMatchFailure, pls

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


More information about the Mlir-commits mailing list