[Mlir-commits] [mlir] [mlir][vector] Add support for multi-dim reduction vector distribution (PR #71193)

Lei Zhang llvmlistbot at llvm.org
Sat Nov 4 11:11:44 PDT 2023


================
@@ -494,6 +494,62 @@ func.func @warp_scf_for_multiple_yield(%arg0: index, %arg1: memref<?xf32>, %arg2
 
 // -----
 
+// CHECK-PROP-LABEL:   func @warp_scf_for_multi_reduce(
+//   CHECK-PROP-NOT:   vector.warp_execute_on_lane_0
+//       CHECK-PROP:   scf.for {{.*}} -> (vector<1x4xf32>) {        
+//       CHECK-PROP:     scf.for {{.*}} -> (vector<1x4xf32>) {
+//       CHECK-PROP:       vector.transfer_read {{.*}} : memref<2x32x40x384xf32>, vector<1x4xf32> 
+//       CHECK-PROP:     }
+//       CHECK-PROP:   }
+//       CHECK-PROP:   vector.reduction <add>
+//       CHECK-PROP:   gpu.shuffle
----------------
antiagainst wrote:

Could we use `CHECK-PROP-COUNT-*` to check the exact count?

Can we also check the second loop nest? Interested to know how we distribute it.

Another thing is that now we may eventually see subtle discrepency between how we distribute transfer read and the rest, given they are two code paths. Would be good to unify. Can happen in a next patch too.

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


More information about the Mlir-commits mailing list