[Mlir-commits] [mlir] [mlir][memref] Use array notation instead of permutation map for memref.transpose (PR #67880)
Felix Schneider
llvmlistbot at llvm.org
Sun Oct 1 01:15:38 PDT 2023
ubfx wrote:
> A permutation map, on the other hand, has no such ambiguity by design.
I agree that the way the IR is printed (`(i, j) -> (j, i) : memref<...> to memref<...>`) heavily points to one interpretation. But isn't it still possible to interpret it the other way around, i.e. as a mapping of result dimensions to original dimensions? I think this is what happened in https://github.com/llvm/llvm-project/issues/65145.
And while I admit that `memref.collapse_shape` and `memref.expand_shape` aren't great arguments for the index notation because the rank change only allows for one interpretation, all of the other n-D transpose Ops also use a permutation array notation: `vector.transpose`, `tosa.transpose`, `linalg.transpose`.
https://github.com/llvm/llvm-project/pull/67880
More information about the Mlir-commits
mailing list