[Mlir-commits] [mlir] [mlir][vector] Add n-d deinterleave lowering (PR #94237)
Benjamin Maxwell
llvmlistbot at llvm.org
Wed Jun 5 08:20:47 PDT 2024
================
@@ -79,6 +79,67 @@ class UnrollInterleaveOp final : public OpRewritePattern<vector::InterleaveOp> {
int64_t targetRank = 1;
};
+/// A one-shot unrolling of vector.deinterleave to the `targetRank`.
+///
+/// Example:
+///
+/// ```mlir
+/// vector.deinterleave %a : vector<1x2x3x8xi64> -> vector<1x2x3x4xi64>
+/// ```
+/// Would be unrolled to:
+/// ```mlir
+/// %result = arith.constant dense<0> : vector<1x2x3x8xi64>
+/// %0 = vector.extract %a[0, 0, 0] ─┐
+/// : vector<4xi64> from vector<1x2x3x4xi64> | | - Repeated 6x for
+/// %1, %2 = vector.deinterleave %0 : | all leading
+/// positions
----------------
MacDue wrote:
Looks like something has gone wrong with the line wrapping here:
https://github.com/llvm/llvm-project/pull/94237
More information about the Mlir-commits
mailing list