@@ -72,6 +72,7 @@ mlir::tensor::computeTransposedType(RankedTensorType rankedTensorType,
72
72
RTTBuilder (rankedTensorType).setShape (transposedShape);
73
73
return transposedTensorType;
74
74
}
75
+
75
76
// / The permutation can be obtained from two permutations:
76
77
// / a) Compute the permutation vector to move the last `numPackedDims` into
77
78
// / the `innerPosDims` of a shape of rank `rank`.
@@ -100,10 +101,6 @@ computePackUnPackPerm(int64_t rank, ArrayRef<int64_t> &innerDimsPos,
100
101
return packInverseDestPermutation;
101
102
}
102
103
103
- // / Shell function to compute the Destination Permutation of PackOp
104
- // / This function uses the helper function `computePackUnPackPerm` to get
105
- // / the permutation vector. Only major difference between UnPack and Pack is
106
- // / that packOp uses destination rank whereas unpack Uses source rank.
107
104
SmallVector<int64_t > mlir::tensor::getPackInverseDestPerm (PackOp packOp) {
108
105
109
106
PackingMetadata pMetadata;
@@ -115,19 +112,11 @@ SmallVector<int64_t> mlir::tensor::getPackInverseDestPerm(PackOp packOp) {
115
112
return packInvDestPerm;
116
113
}
117
114
118
- // / Shell function to compute the Source Permutation of unPackOp.
119
- // / This function, like the getPackInverseDestPerm uses the helper function
120
- // / computePackUnPackPerm` to get the permutation vector.
121
- // / Only major difference between UnPack and Pack is that packOp uses
122
- // / destination rank whereas unpack Uses source rank.
123
115
SmallVector<int64_t > mlir::tensor::getUnPackInverseSrcPerm (UnPackOp unpackOp) {
124
116
PackingMetadata metadata;
125
117
return mlir::tensor::getUnPackInverseSrcPerm (unpackOp, metadata);
126
118
}
127
119
128
- // / Shell function to compute the Source rank permutation for unpackOp
129
- // / Unpack requires some packing metadata data information, so created
130
- // / another function where this value is passed by reference.
131
120
SmallVector<int64_t >
132
121
mlir::tensor::getUnPackInverseSrcPerm (UnPackOp unpackOp,
133
122
PackingMetadata &metadata) {
0 commit comments