llvm-project
0daf20b3 - [mlir][vector] transpose(broadcast) -> broadcast canonicalization (#135096)

Commit
305 days ago
[mlir][vector] transpose(broadcast) -> broadcast canonicalization (#135096) Example seen in the 'real world': ``` %0 = vector.broadcast %arg0 : vector<1xi8> to vector<1x8xi8> %1 = vector.transpose %0, [1, 0] : vector<1x8xi8> to vector<8x1xi8> ``` This PR adds a canonicalizer that rewrites the above as ``` %1 = vector.broadcast %arg0 : vector<1xi8> to vector<8x1xi8> ``` It works by determining if a transpose is only shuffling contiguous broadcast dimensions.
Author
Parents
Loading