[Mlir-commits] [mlir] [mlir][vector] Add support for dropping inner unit dims for transfer_read/write with masks. (PR #188841)

Andrzej WarzyƄski llvmlistbot at llvm.org
Fri Mar 27 01:48:51 PDT 2026


================
@@ -266,6 +266,24 @@ func.func @contiguous_inner_most_dim_with_subview_2d_scalable_inner_dim(%src: me
 
 // -----
 
+func.func @contiguous_inner_most_masked_read(%src: memref<1x1x8x1xf32, strided<[3072, 8, 1, 1], offset: ?>>, %mask: vector<1x8x1xi1>) -> vector<1x8x1xf32>{
----------------
banach-space wrote:

[ultra-nit] For consistency with other [tests](https://github.com/llvm/llvm-project/blob/ed76cbccbb40da23f443ee147d697917c5101e9a/mlir/test/Dialect/Vector/vector-transfer-permutation-lowering.mlir?plain=1#L69), could you tweak the naming a bit? Thanks

NO MASK:
```mlir
vector.transfer_read %src[%c0, %c0, %c0, %c0], %pad : memref<1x1x8x1xf32, strided<[3072, 8, 1, 1], offset: ?>>, vector<1x8x1xf32>
```

WITH MASK:
```mlir
= vector.transfer_read %src[%c0, %c0, %c0, %c0], %pad, %mask {in_bounds = [true, true, true]} : memref<1x1x8x1xf32, strided<[3072, 8, 1, 1], offset: ?>>, vector<1x8x1xf32>
```

MASKED:
```mlir
vector.mask {
  vector.transfer_read %src[%c0, %c0, %c0, %c0], %pad : memref<1x1x8x1xf32, strided<[3072, 8, 1, 1], offset: ?>>, vector<1x8x1xf32>
}
```

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


More information about the Mlir-commits mailing list