Skip to content

Commit 76f79cf

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

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

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)