[Mlir-commits] [mlir] [mlir][Vectorizer] Added support to Vectorize tensor.unpack (PR #76087)

Diego Caballero llvmlistbot at llvm.org
Fri Feb 16 18:45:08 PST 2024


================
@@ -38,7 +38,21 @@ computeTransposedType(RankedTensorType rankedTensorType,
 /// i.e. for a pack from an ABCD layout to an ABCDba:
 /// The packed shape would be ABCDba.
 /// The pre-permutation shape would be AaBbCD.
-SmallVector<int64_t> getPackInverseDestPermutation(PackOp packOp);
+SmallVector<int64_t> computePackUnPackPerm(int64_t rank,
+                                           ArrayRef<int64_t> &innerDimsPos,
+                                           ArrayRef<int64_t> &outerPerm,
+                                           PackingMetadata &packingMetadata);
+
+/// This function uses the helper function `computePackUnPackPerm` to get
+/// the permutation vector. Only major difference between UnPack and Pack is
+/// that packOp uses destination rank whereas unpack Uses source rank.
----------------
dcaballe wrote:

This doc looks like implementation details so perhaps we can move it to the cpp? I would move the doc from lines 35-40.

https://github.com/llvm/llvm-project/pull/76087


More information about the Mlir-commits mailing list