Skip to content

Commit 79b277d

Browse files
committed
rebase to the latest llvm
1 parent 6f1445c commit 79b277d

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

cmake/llvm-version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
763b96c86d81d51d0db430791a61fd1e8a406bce
1+
891ec2af45c02718c65f539cb6dad1758f079e73

include/gc/Dialect/Arith/Utils/EasyBuild.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,9 @@ inline EBUnsigned extend(Type type, const EBUnsigned &a) {
361361
}
362362

363363
inline EBFloatPoint extend(Type type, const EBFloatPoint &a) {
364+
arith::FastMathFlagsAttr fastMathAttr;
364365
return OperatorHandlers::create<EBFloatPoint, arith::ExtFOp>(a.builder, type,
365-
a);
366+
a, fastMathAttr);
366367
}
367368

368369
inline EBSigned trunc(Type type, const EBSigned &a) {

lib/gc/Transforms/DeepTileContractionNamedOp.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -497,10 +497,12 @@ generateOuterLoop(RewriterBase &b, linalg::LinalgOp linalgOp,
497497
auto tilingResult = linalgX::tileAllUsingForall(
498498
b, cast<PartialReductionOpInterface>(currentOp.getOperation()), {},
499499
tileSizes, newParallelDims, std::nullopt);
500-
if (failed(tilingResult))
500+
if (failed(tilingResult) &&
501+
tilingResult->parallelTiledOps.size() == 1UL)
501502
return failure();
502-
currentOp = dyn_cast<linalg::LinalgOp>(tilingResult->parallelTiledOp);
503-
if (tilingResult->mergeOp) {
503+
currentOp =
504+
dyn_cast<linalg::LinalgOp>(tilingResult->parallelTiledOps.back());
505+
if (!tilingResult->mergeOps.empty()) {
504506
for (const auto &fn : option.finalReduceCallBacks) {
505507
auto result = fn(b, currentOp.getLoc(), *tilingResult);
506508
if (succeeded(result)) {
@@ -672,7 +674,7 @@ struct deepTileMatmul : public OpInterfaceRewritePattern<linalg::LinalgOp> {
672674
initValue[0].getDefiningOp())
673675
.getDpsInits()[0]);
674676
}
675-
return dyn_cast<linalg::LinalgOp>(result.parallelTiledOp);
677+
return dyn_cast<linalg::LinalgOp>(result.parallelTiledOps.back());
676678
};
677679
option.finalReduceCallBacks.push_back(removeReduncantFill);
678680
}

lib/gc/Transforms/Tiling.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ static void calculateTileOffsetsAndSizes(
284284
OpBuilder::InsertionGuard g(b);
285285
b.setInsertionPointToStart(forallOp.getBody(0));
286286

287-
ValueRange threadIds = forallOp.getInductionVars();
287+
SmallVector<Value> threadIds = forallOp.getInductionVars();
288288
SmallVector<OpFoldResult> nonZeroNumThreads =
289289
llvm::to_vector(llvm::make_filter_range(numThreads, [](OpFoldResult ofr) {
290290
return !isConstantIntValue(ofr, 0);
@@ -755,8 +755,8 @@ FailureOr<linalg::ForallReductionTilingResult> tileReductionUsingForall(
755755
ForallReductionTilingResult results;
756756
results.initialValues = initTensors;
757757
results.loops = forallOp;
758-
results.parallelTiledOp = tiledOp;
759-
results.mergeOp = mergeOp;
758+
results.parallelTiledOps = {tiledOp};
759+
results.mergeOps = {mergeOp};
760760
return results;
761761
}
762762

@@ -1069,8 +1069,8 @@ FailureOr<linalg::ForallReductionTilingResult> tileAllUsingForall(
10691069
ForallReductionTilingResult results;
10701070
results.initialValues = initTensors;
10711071
results.loops = forallOp;
1072-
results.parallelTiledOp = tiledOp;
1073-
results.mergeOp = mergeOp;
1072+
results.parallelTiledOps = SmallVector<Operation *>{tiledOp};
1073+
results.mergeOps = SmallVector<Operation *>{mergeOp};
10741074
return results;
10751075
}
10761076

0 commit comments

Comments
 (0)