Skip to content

Commit 3375498

Browse files
Rebase fixes
Signed-off-by: MaheshRavishankar <[email protected]>
1 parent 876704f commit 3375498

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ computeContinuousTileSizes(OpBuilder &builder, TilingInterface op,
867867
unsigned dimension, OpFoldResult targetSize,
868868
bool emitAssertions);
869869

870-
/// Transformation information returned after reduction tiling.
870+
/// Transformation information returned after reduction tiling.
871871
struct ForallReductionTilingResult {
872872
/// The partial reduction tiled op generated.
873873
SmallVector<Operation *> parallelTiledOps;
@@ -1727,10 +1727,12 @@ void populateWinogradConv2DPatterns(RewritePatternSet &patterns, int64_t m,
17271727
void populateDecomposeWinogradOpsPatterns(RewritePatternSet &patterns);
17281728

17291729
/// Adds patterns that reduce the rank of named contraction ops that have
1730-
/// unit dimensions in the operand(s) by converting to a sequence of `collapse_shape`,
1731-
/// `<corresponding linalg named op>`, `expand_shape` (if on tensors). For example a
1732-
/// `linalg.batch_matmul` with unit batch size will convert to `linalg.matmul`
1733-
/// and a `linalg.matvec` with with unit spatial dim in lhs will convert to a `linalg.dot`.
1730+
/// unit dimensions in the operand(s) by converting to a sequence of
1731+
/// `collapse_shape`,
1732+
/// `<corresponding linalg named op>`, `expand_shape` (if on tensors). For
1733+
/// example a `linalg.batch_matmul` with unit batch size will convert to
1734+
/// `linalg.matmul` and a `linalg.matvec` with with unit spatial dim in lhs will
1735+
/// convert to a `linalg.dot`.
17341736
void populateContractionOpRankReducingPatterns(RewritePatternSet &patterns);
17351737

17361738
} // namespace linalg

mlir/include/mlir/Dialect/SCF/Utils/Utils.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ scf::ForallOp fuseIndependentSiblingForallLoops(scf::ForallOp target,
195195
scf::ForOp fuseIndependentSiblingForLoops(scf::ForOp target, scf::ForOp source,
196196
RewriterBase &rewriter);
197197

198-
/// Normalize an `scf.forall` operation. Returns `failure()`if normalization fails.
198+
/// Normalize an `scf.forall` operation. Returns `failure()`if normalization
199+
/// fails.
199200
// On `success()` returns the
200201
/// newly created operation with all uses of the original operation replaced
201202
/// with results of the new operation.

mlir/lib/Dialect/SCF/Utils/Utils.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,8 @@ static Value ceilDivPositive(OpBuilder &builder, Location loc, Value dividend,
294294
}
295295

296296
/// Returns the trip count of `forOp` if its' low bound, high bound and step are
297-
/// constants, or optional otherwise. Trip count is computed as ceilDiv(highBound
298-
/// - lowBound, step).
297+
/// constants, or optional otherwise. Trip count is computed as
298+
/// ceilDiv(highBound - lowBound, step).
299299
static std::optional<int64_t> getConstantTripCount(scf::ForOp forOp) {
300300
std::optional<int64_t> lbCstOp = getConstantIntValue(forOp.getLowerBound());
301301
std::optional<int64_t> ubCstOp = getConstantIntValue(forOp.getUpperBound());
@@ -1379,11 +1379,11 @@ FailureOr<scf::ForallOp> mlir::normalizeForallOp(RewriterBase &rewriter,
13791379

13801380
SmallVector<OpFoldResult> newLbs, newUbs, newSteps;
13811381
for (auto [lb, ub, step] : llvm::zip_equal(lbs, ubs, steps)) {
1382-
LoopParams normalizedLoopParams =
1382+
Range normalizedLoopParams =
13831383
emitNormalizedLoopBounds(rewriter, forallOp.getLoc(), lb, ub, step);
1384-
newLbs.push_back(normalizedLoopParams.lowerBound);
1385-
newUbs.push_back(normalizedLoopParams.upperBound);
1386-
newSteps.push_back(normalizedLoopParams.step);
1384+
newLbs.push_back(normalizedLoopParams.offset);
1385+
newUbs.push_back(normalizedLoopParams.size);
1386+
newSteps.push_back(normalizedLoopParams.stride);
13871387
}
13881388

13891389
auto normalizedForallOp = rewriter.create<scf::ForallOp>(

0 commit comments

Comments
 (0)