summaryrefslogtreecommitdiff
path: root/mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp
diff options
context:
space:
mode:
authorMatthias Springer <me@m-sp.org>2023-11-20 11:25:35 +0100
committerGitHub <noreply@github.com>2023-11-20 11:25:35 +0100
commit32c3decb773b0cc7fd1736fe1b47d889c8c0011c (patch)
treea894c63df4b2c3d61e400be2db4093984b793a74 /mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp
parentabcbca21cc2e8a2b256cd519df2b1559f29e8edd (diff)
[mlir][vector] Modernize `vector.transpose` op (#72594)
* Declare arguments/results with `let` statements. * Rename `transp` to `permutation`. * Change type of `transp` from `I64ArrayAttr` to `DenseI64ArrayAttr` (provides direct access to `ArrayRef<int64_t>` instead of `ArrayAttr`).
Diffstat (limited to 'mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp')
-rw-r--r--mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp b/mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp
index 1126c2c20758..429d1137b6f3 100644
--- a/mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp
+++ b/mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp
@@ -473,13 +473,8 @@ struct CombineTransferReadOpTranspose final
if (transferReadOp.getMask() || transferReadOp.hasOutOfBoundsDim())
return rewriter.notifyMatchFailure(op, "not inbounds transfer read");
- SmallVector<int64_t, 2> perm;
- op.getTransp(perm);
- SmallVector<unsigned, 2> permU;
- for (int64_t o : perm)
- permU.push_back(unsigned(o));
AffineMap permutationMap =
- AffineMap::getPermutationMap(permU, op.getContext());
+ AffineMap::getPermutationMap(op.getPermutation(), op.getContext());
AffineMap newMap =
permutationMap.compose(transferReadOp.getPermutationMap());