pack(unpack(x)) -> x
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/Tensor/IR/TensorOps.cpp | ||
---|---|---|
3426–3427 | I think the check is not enough, we should probably look into the inner dims pos and inner tile sizes? E.g., we can not fold the below chain away: unpack NCnc -> NC pack NC -> cnCN The shape of NCnc and cnCN can be identical. E.g., when N=C=128 and inner_tile sizes are [8, 8]. |
mlir/lib/Dialect/Tensor/IR/TensorOps.cpp | ||
---|---|---|
3426–3427 | typo: pack NC -> CNcn more context: CNcn is not equivalent to NCnc because there are transpose involved. |
mlir/lib/Dialect/Tensor/IR/TensorOps.cpp | ||
---|---|---|
3426–3427 | Thanks for the comments. To clarify, do you mean outer_dims_perm instead of tile sizes? Tile sizes are taken into account looking at the type. |
mlir/lib/Dialect/Tensor/IR/TensorOps.cpp | ||
---|---|---|
3426–3427 | yes, I meant inner_dims_pos and outer_dims_perm! |
I think the check is not enough, we should probably look into the inner dims pos and inner tile sizes?
E.g., we can not fold the below chain away:
The shape of NCnc and cnCN can be identical. E.g., when N=C=128 and inner_tile sizes are [8, 8].