@@ -1548,13 +1548,27 @@ mlir::scf::tileAndFuseConsumerOfSlice(RewriterBase &rewriter,
1548
1548
newInitAppend = llvm::map_to_vector (
1549
1549
newExtractOps,
1550
1550
[](tensor::ExtractSliceOp op) -> Value { return op.getResult (); });
1551
+ for (auto init : newInitAppend) {
1552
+ llvm::dbgs () << " init: " << init << " \n " ;
1553
+ }
1551
1554
}
1552
1555
}
1553
1556
LoopLikeOpInterface newLoopOp;
1554
1557
// 4.d. Create a new loop with the new init values for this loop.
1555
1558
if (auto forOp = dyn_cast<scf::ForOp>(loop.getOperation ())) {
1556
1559
newOuts = llvm::to_vector (forOp.getInits ());
1560
+ llvm::dbgs () << " before append: \n " ;
1561
+ for (auto out : newOuts) {
1562
+ llvm::dbgs () << " newOut: " << out << " \n " ;
1563
+ }
1564
+ for (auto init : newInitAppend) {
1565
+ llvm::dbgs () << " init: " << init << " \n " ;
1566
+ }
1567
+ llvm::dbgs () << " newInitAppend begin: " << *newInitAppend.begin () << " \n " ;
1557
1568
newOuts.append (newInitAppend.begin (), newInitAppend.end ());
1569
+ for (auto out : newOuts) {
1570
+ llvm::dbgs () << " newOut: " << out << " \n " ;
1571
+ }
1558
1572
auto newLoop = rewriter.create <scf::ForOp>(
1559
1573
forOp.getLoc (), forOp.getLowerBound (), forOp.getUpperBound (),
1560
1574
forOp.getStep (), newOuts);
@@ -1580,6 +1594,8 @@ mlir::scf::tileAndFuseConsumerOfSlice(RewriterBase &rewriter,
1580
1594
rewriter.replaceOp (
1581
1595
loop, newLoopOp->getResults ().take_front (loop->getNumResults ()));
1582
1596
newOuterLoops.push_back (newLoopOp);
1597
+ llvm::dbgs () << " newLoop: " << *newLoopOp << " \n " ;
1598
+ llvm::dbgs () << " outerLoop: " << newOuterLoops.front () << " \n " ;
1583
1599
}
1584
1600
1585
1601
// 5.a. Reconstruct inner-most loop.
0 commit comments