[PATCH] D76460: [mlir] [VectorOps] Introduce vector.transpose on 2-D vectors

Andy Davis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 20 10:17:23 PDT 2020


andydavis1 added a comment.

Thanks Aart. Yes, if its not too much work, I'd love to see this op take a permutation of dimensions of an N-D vector.

However, if you are concerned about having to support lowerings for all permutations, then how about removing the restriction on the operand being 2-D vectors, but limit the transpose op to picking a single pair of dimensions to transpose.

For example:

func @transpose(%arg0: vector<3x4x11x7xi32>) -> vector<3x4x7x11xi32> {

  %0 = vector.transpose %arg0, 2, 3 : vector<3x4x11x7xi32>
  return %0 : vector<3x4x7x11xi32>

}

Thanks!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76460/new/

https://reviews.llvm.org/D76460





More information about the llvm-commits mailing list