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

Diego Caballero llvmlistbot at llvm.org
Fri Feb 16 07:40:56 PST 2024


================
@@ -38,8 +38,14 @@ 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> getPackUnPackInverseDestPerm(
+    std::variant<tensor::PackOp, tensor::UnPackOp> packOp);
----------------
dcaballe wrote:

I haven't seen uses of `std::variant` for similar cases in the project. Could a template work instead?

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


More information about the Mlir-commits mailing list