Folding of transfer_write into transfer_read is already supported but
this requires the read and write to have the same permuation map.
After linalg vectorization it is common to have different ppermuation
map for write followed by read even though the cases could be
propagated.
This canonicalization handle cases where the permuation maps are
different but the data read and written match and replace the transfer
ops with broadcast and permuation
Details
Diff Detail
Event Timeline
mlir/lib/Dialect/Vector/IR/VectorOps.cpp | ||
---|---|---|
3288 | Can you please rephrase? I have trouble parsing this comment. | |
3291 | Seems like a good helper to add to the interface itself. | |
3341 | The while case is not tested, please add both a positive and a negative test. | |
3367 | typo | |
3373 | typo |
mlir/lib/Dialect/Vector/IR/VectorOps.cpp | ||
---|---|---|
3288 | Rephrased and moved into interface | |
3291 | Moved it to VectorTransferOpInterface | |
3341 | Good point, I removed the while loop as isDisjointTransferIndices seems to assume minor identity map. We would need to change it to use getTensorChunkSizeAccessed for it to work here |
Can you please rephrase? I have trouble parsing this comment.