Repository navigation
Enable vector transfer flattening. - #8114
Conversation
MaheshRavishankar
left a comment
There was a problem hiding this comment.
Are we sure we want to add this for all backends? @antiagainst @ThomasRaoux ?
|
Note: the CI failures are because this relies on a MLIR commit that IREE hasn't sync'd to yet, but should be part of the next dependency update. |
More than happy to limit this to LLVMCPU if you can point out how to do that! Though I can see other similar patterns already enabled right there. |
Fine with it going in here unless Lei/Thomas say otherwise. |
Thanks! Anyway I won't be able to merge this before the next |
oh, but i hadn't seen your comments on discord about no longer needing that... thanks, looking into it. |
|
So it looks these patterns are doing something similar to |
This fixes the codegen for the 2d vector transfers that we need to do in matmul kernels targeting 2D (matrix) simd operations, for instance allowing PR iree-org#7778 to achieve nice codegen such as: ``` 11a14: ad 05 00 f1 subs x13, x13, #1 11a18: f8 66 c1 ac ldp q24, q25, [x23], iree-org#32 11a1c: 7a 6f c1 ac ldp q26, q27, [x27], iree-org#32 11a20: 41 e3 98 4f sdot v1.4s, v26.16b, v24.4b[0] 11a24: 60 e3 98 4f sdot v0.4s, v27.16b, v24.4b[0] 11a28: 43 e3 b8 4f sdot v3.4s, v26.16b, v24.4b[1] 11a2c: 62 e3 b8 4f sdot v2.4s, v27.16b, v24.4b[1] 11a30: 46 eb 98 4f sdot v6.4s, v26.16b, v24.4b[2] 11a34: 64 eb 98 4f sdot v4.4s, v27.16b, v24.4b[2] 11a38: 53 eb b8 4f sdot v19.4s, v26.16b, v24.4b[3] 11a3c: 70 eb b8 4f sdot v16.4s, v27.16b, v24.4b[3] 11a40: 54 e3 99 4f sdot v20.4s, v26.16b, v25.4b[0] 11a44: 71 e3 99 4f sdot v17.4s, v27.16b, v25.4b[0] 11a48: 57 e3 b9 4f sdot v23.4s, v26.16b, v25.4b[1] 11a4c: 76 e3 b9 4f sdot v22.4s, v27.16b, v25.4b[1] 11a50: 55 eb 99 4f sdot v21.4s, v26.16b, v25.4b[2] 11a54: 72 eb 99 4f sdot v18.4s, v27.16b, v25.4b[2] 11a58: 47 eb b9 4f sdot v7.4s, v26.16b, v25.4b[3] 11a5c: 65 eb b9 4f sdot v5.4s, v27.16b, v25.4b[3] 11a60: a1 fd ff 54 b.ne 0x11a14 <.text+0x11a8> ```
85e8f89 to
8a5e6ba
Compare
This fixes the codegen for the 2d vector transfers that we need to do
in matmul kernels targeting 2D (matrix) simd operations, for instance
allowing PR #7778 to achieve nice codegen such as: