[Mlir-commits] [mlir] [MLIR][Vector] Implement TransferOpReduceRank as MaskableOpRewritePattern (PR #92426)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Wed Jun 12 12:35:18 PDT 2024
================
@@ -187,3 +187,49 @@ module attributes {transform.with_named_sequence} {
transform.yield
}
}
+
+// -----
+
+
+// CHECK: #[[MAP:.*]] = affine_map<(d0, d1, d2, d3) -> (d1, 0, d3)>
+// CHECK: func.func @transfer_read_reduce_rank_scalable(
+// CHECK-SAME: %[[ARG_0:.*]]: memref<?x?x?x?xf32>) -> vector<8x[4]x2x3xf32> {
+// CHECK: %[[C0:.*]] = arith.constant 0 : index
+// CHECK: %[[TFR:.*]] = vector.transfer_read %arg0[%[[C0]], %[[C0]], %[[C0]], %[[C0]]]{{.*}} permutation_map = #[[MAP]]} : memref<?x?x?x?xf32>, vector<[4]x2x3xf32>
+// CHECK: %[[BC:.*]] = vector.broadcast %[[TFR]] : vector<[4]x2x3xf32> to vector<8x[4]x2x3xf32>
+// CHECK: return %[[BC]] : vector<8x[4]x2x3xf32>
+func.func @transfer_read_reduce_rank_scalable(%mem: memref<?x?x?x?xf32>) -> vector<8x[4]x2x3xf32> {
----------------
banach-space wrote:
How is this test different to `@permutation_with_mask_xfer_read_scalable`? Both seem to check for `vector.transfer_read` from `memref` into a scalable vector?
https://github.com/llvm/llvm-project/pull/92426
More information about the Mlir-commits
mailing list