[Mlir-commits] [mlir] [mlir][vector] Update `CombineContractBroadcastMask` (PR #140050)

Andrzej WarzyƄski llvmlistbot at llvm.org
Mon May 19 00:59:25 PDT 2025


================
@@ -116,6 +156,39 @@ func.func @contract_broadcast_unit_dim_reduction(%arg0 : vector<8x4xi32>, %arg1
     return %result : vector<8x8xi32>
 }
 
+// -----
+
+// Same as above, but with a mask
+
+#map0 = affine_map<(d0, d1, d2, d3) -> (d0, d1, d3)>
+#map1 = affine_map<(d0, d1, d2, d3) -> (d0, d2, d3)>
+#map2 = affine_map<(d0, d1, d2, d3) -> (d1, d2)>
+
+// CHECK-DAG: #[[$map0:.*]] = affine_map<(d0, d1, d2) -> (d0, d2)>
+// CHECK-DAG: #[[$map1:.*]] = affine_map<(d0, d1, d2) -> (d1, d2)>
+// CHECK-DAG: #[[$map2:.*]] = affine_map<(d0, d1, d2) -> (d0, d1)>
----------------
banach-space wrote:

I agree with the suggestion (thanks!) and will update this accordingly.

Note that currently this file prefers lower-case: https://github.com/llvm/llvm-project/blob/main/mlir/test/Dialect/Vector/vector-reduce-to-contract.mlir#L3

Let me update all maps within this PR - just to avoid creating a dedicated PR. If you think that the noise level is too high, I am happy to extract that.

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


More information about the Mlir-commits mailing list