Skip to content

Commit fbf4892

Browse files
nirvikbaruahweiya711
authored andcommitted
Removed extraneous prints
1 parent 6e41694 commit fbf4892

File tree

5 files changed

+3
-18
lines changed

5 files changed

+3
-18
lines changed

src/index_notation/index_notation.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2366,7 +2366,6 @@ bool isConcreteNotation(IndexStmt stmt, std::string* reason) {
23662366
for (auto& var : op->indexVars) {
23672367
// non underived variables may appear in temporaries, but we don't check these
23682368
if (!boundVars.contains(var) && provGraph.isUnderived(var) && (provGraph.isFullyDerived(var) || !provGraph.isRecoverable(var, definedVars))) {
2369-
// cout << "Variable: " << var << " Statement: " << stmt << endl;
23702369
*reason = "all variables in concrete notation must be bound by a "
23712370
"forall statement";
23722371
isConcrete = false;

src/index_notation/provenance_graph.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,7 @@ bool ProvenanceGraph::isAvailable(IndexVar indexVar, std::set<IndexVar> defined)
11211121
bool ProvenanceGraph::isRecoverable(taco::IndexVar indexVar, std::set<taco::IndexVar> defined) const {
11221122
// all children are either defined or recoverable from their children
11231123
// precompute relations are always recoverable since their children never appear in the same loop
1124-
if (!(childRelMap.at(indexVar).getRelType() == IndexVarRelType::PRECOMPUTE)) {
1124+
if (!(childRelMap.count(indexVar) && childRelMap.at(indexVar).getRelType() == IndexVarRelType::PRECOMPUTE)) {
11251125
for (const IndexVar& child : getChildren(indexVar)) {
11261126
if (!defined.count(child) && (isFullyDerived(child) || !isRecoverable(child, defined))) {
11271127
return false;

src/lower/iterator.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -521,15 +521,12 @@ Iterators::Iterators(IndexStmt stmt, const map<TensorVar, Expr>& tensorVars)
521521
{
522522
ProvenanceGraph provGraph = ProvenanceGraph(stmt);
523523
set<IndexVar> underivedAdded;
524-
525524
// Create dimension iterators
526525
match(stmt,
527526
function<void(const ForallNode*, Matcher*)>([&](auto n, auto m) {
528527
content->modeIterators.insert({n->indexVar, Iterator(n->indexVar, !provGraph.hasCoordBounds(n->indexVar) && provGraph.isCoordVariable(n->indexVar))});
529-
cout << "Adding following index var to iterators: " << n->indexVar << " for statement (" << n->stmt << ")" << endl;
530528
for (const IndexVar& underived : provGraph.getUnderivedAncestors(n->indexVar)) {
531529
if (!underivedAdded.count(underived)) {
532-
cout << "Adding following underived ancestor to iterators: " << underived << endl;
533530
content->modeIterators.insert({underived, underived});
534531
underivedAdded.insert(underived);
535532
}
@@ -565,8 +562,6 @@ Iterators::Iterators(IndexStmt stmt, const map<TensorVar, Expr>& tensorVars)
565562
for (auto& iterator : content->levelIterators) {
566563
content->modeAccesses.insert({iterator.second, iterator.first});
567564
}
568-
569-
// cout << "FINISHED ITERATORS BUILDING" << endl;
570565
}
571566

572567

@@ -676,8 +671,6 @@ ModeAccess Iterators::modeAccess(Iterator iterator) const
676671
Iterator Iterators::modeIterator(IndexVar indexVar) const
677672
{
678673
taco_iassert(content != nullptr);
679-
cout << "Searching for " << indexVar << " in "
680-
<< util::join(content->modeIterators) << endl;
681674
taco_iassert(util::contains(content->modeIterators, indexVar));
682675
return content->modeIterators.at(indexVar);
683676
}

src/lower/merge_lattice.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,9 +613,7 @@ MergeLattice MergeLattice::make(Forall forall, Iterators iterators, ProvenanceGr
613613

614614
vector<IndexVar> underivedAncestors = provGraph.getUnderivedAncestors(indexVar);
615615
for (auto ancestor : underivedAncestors) {
616-
// cout << "Is recoverable from merge lattice: " << ancestor << endl;
617616
if(!provGraph.isRecoverable(ancestor, definedIndexVars)) {
618-
// cout << "Is not recoverable for ancestor " << ancestor << endl;
619617
return MergeLattice({MergePoint({iterators.modeIterator(indexVar)}, {}, {})});
620618
}
621619
}

test/tests-scheduling.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ TEST(scheduling, lowerSparseMulSparse) {
276276
// codegen->compile(compute, true);
277277
}
278278

279-
TEST(scheduling, NIRVIK_TEST) {
279+
TEST(scheduling, precomputeIndependentIndexVars) {
280280
Tensor<double> A("A", {16}, Format{Dense});
281281
Tensor<double> B("B", {16}, Format{Dense});
282282
Tensor<double> C("C", {16}, Format{Dense});
@@ -312,7 +312,7 @@ TEST(scheduling, NIRVIK_TEST) {
312312
ASSERT_TENSOR_EQ(A, expected);
313313
}
314314

315-
TEST(scheduling, FAILED_TEST) {
315+
TEST(scheduling, precomputeIndependentIndexVarsSplit) {
316316
Tensor<double> A("A", {16}, Format{Dense});
317317
Tensor<double> B("B", {16}, Format{Dense});
318318
Tensor<double> C("C", {16}, Format{Dense});
@@ -347,11 +347,6 @@ TEST(scheduling, FAILED_TEST) {
347347
expected.assemble();
348348
expected.compute();
349349

350-
ir::IRPrinter irp = ir::IRPrinter(cout);
351-
ir::Stmt compute = lower(stmt, "compute", false, true);
352-
cout << "Imperative IR" << endl;
353-
irp.print(compute);
354-
355350
ASSERT_TENSOR_EQ(A, expected);
356351
}
357352

0 commit comments

Comments
 (0)