[Mlir-commits] [mlir] [mlir][linalg] Skip rank reduction for unsigned-cast contractions (PR #225993)

Federico Bruzzone llvmlistbot at llvm.org
Sun Sep 27 00:28:55 PDT 2026


================
@@ -175,6 +175,99 @@ func.func @batch_matmul_to_vecmat(%arg0: memref<1x1x?xf32>, %arg1: memref<1x?x?x
 
 // -----
 
+// linalg.vecmat has no cast attribute (it always uses signed casts), so a
+// matmul with an unsigned cast must not be rank-reduced into it.
----------------
FedericoBruzzone wrote:

That makes a lot of sense to me, thanks!

As for the issue/RFC, I think we can hold off for now. No one has needed this attribute so far, apparently. That said, if you’d like to work on it, feel free to go ahead. I could review that code.

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


More information about the Mlir-commits mailing list