Skip to content

Commit f14c488

Browse files
committed
Add clarifying comment
1 parent 194f819 commit f14c488

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1089,7 +1089,7 @@ collapseOpIterationDims(LinalgType op,
10891089

10901090
struct LowerPackResult {
10911091
tensor::PadOp padOp;
1092-
Operation *expandShapeOp;
1092+
Operation *expandShapeOp; // `tensor::ExpandShapeOp` or `tensor::ReshapeOp`
10931093
linalg::TransposeOp transposeOp;
10941094
};
10951095

mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ FailureOr<LowerPackResult> linalg::lowerPack(RewriterBase &rewriter,
222222
OpBuilder::InsertionGuard g(rewriter);
223223
rewriter.setInsertionPoint(packOp);
224224

225-
// 1. Compute the permutation vector to shuffle packed shape into the shape.
225+
// 1. Compute the permutation vector to shuffle packed shape into the shape
226226
// before any outer or inner permutations have been applied. The permutation
227227
// can be obtained from two permutations:
228228
// a) Compute the permutation vector to move the last `numPackedDims` into
@@ -251,7 +251,7 @@ FailureOr<LowerPackResult> linalg::lowerPack(RewriterBase &rewriter,
251251
SmallVector<int64_t> packedToStripMinedShapePerm = innerPositionsPerm;
252252
applyPermutationToVector(packedToStripMinedShapePerm, outerPositionPerm);
253253

254-
// 2. Compute the stripMinedShape: this is the packed shape before any outer.
254+
// 2. Compute the stripMinedShape: this is the packed shape before any outer
255255
// or inner permutations have been applied.
256256
SmallVector<int64_t> stripMinedShape(packedTensorType.getShape());
257257
applyPermutationToVector(stripMinedShape, packedToStripMinedShapePerm);

0 commit comments

Comments
 (0)