[Mlir-commits] [mlir] [mlir][vector] Drop innermost unit dims on transfer_write. (PR #78554)

Andrzej WarzyƄski llvmlistbot at llvm.org
Thu Jan 18 10:38:21 PST 2024


================
@@ -76,3 +76,24 @@ func.func @contiguous_inner_most_dim_out_of_bounds_2d(%arg0: memref<1x1xf32>) ->
 //  CHECK-NOT:   memref.subview
 //      CHECK:   %[[READ:.+]] = vector.transfer_read %[[SRC]]
 //      CHECK:   return %[[READ]] : vector<4x8xf32>
+
+// -----
+
+func.func @drop_inner_most_dim_for_transfer_write(%arg0: memref<1x512x16x1xf32, strided<[8192, 16, 1, 1], offset: ?>>, %arg1: vector<1x16x16x1xf32>, %arg2: index) {
----------------
banach-space wrote:

I'd add a few more tests:
* `memref` without strides - that would be a much simpler/shorter example,
* `memref` with unit strides (basically this test),
* `memref` with non-unit strides (effectively a negative test).

I might have another suggestion once I finish scanning the implementation. 

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


More information about the Mlir-commits mailing list