[all-commits] [llvm/llvm-project] 21f1a6: [mlir][vector] Additional transpose folding (#138...
James Newling via All-commits
all-commits at lists.llvm.org
Wed May 14 14:56:57 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 21f1a616d60934953de3f304aafcad968e770b0a
https://github.com/llvm/llvm-project/commit/21f1a616d60934953de3f304aafcad968e770b0a
Author: James Newling <james.newling at gmail.com>
Date: 2025-05-14 (Wed, 14 May 2025)
Changed paths:
M mlir/lib/Dialect/Vector/IR/VectorOps.cpp
M mlir/test/Dialect/Vector/canonicalize.mlir
M mlir/test/Dialect/Vector/canonicalize/vector-transpose.mlir
M mlir/test/Dialect/Vector/vector-transpose-lowering.mlir
Log Message:
-----------
[mlir][vector] Additional transpose folding (#138347)
Fold transpose with unit-dimensions. Seen in the wild:
```
%0 = vector.transpose %arg, [0, 2, 1, 3] : vector<6x1x1x4xi8> to vector<6x1x1x4xi8>
```
This transpose can be folded because (1) it preserves the shape and (2)
the shuffled dims are unit extent.
Also addresses comment about static vs anonymous namespace:
https://github.com/llvm/llvm-project/pull/135841#discussion_r2071869067
---------
Signed-off-by: James Newling <james.newling at gmail.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list